Changeset 6083


Ignore:
Timestamp:
Jun 12, 2018, 8:03:52 AM (2 months ago)
Author:
cameron
Message:

PrintRegister? goes to stderr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r6076 r6083  
    1414#include <llvm/IR/TypeBuilder.h>
    1515#include <toolchain/toolchain.h>
     16#include <unistd.h>
    1617
    1718using namespace llvm;
     
    5859        IRBuilder<> builder(entry);
    5960        std::vector<Value *> args;
     61        args.push_back(getInt32(STDERR_FILENO));
    6062        args.push_back(GetString(out.str().c_str()));
    6163        Value * const name = &*(arg++);
     
    6971            args.push_back(builder.CreateZExt(builder.CreateExtractElement(value, builder.getInt32(i - 1)), builder.getInt32Ty()));
    7072        }
    71         builder.CreateCall(GetPrintf(), args);
     73        builder.CreateCall(GetDprintf(), args);
    7274        builder.CreateRetVoid();
    73 
    7475        printRegister = function;
    7576    }
     
    608609    Constant * selectorSplat = ConstantVector::getSplat(field_count, ConstantInt::get(getIntNTy(fw), field_count));
    609610    Value * selectMask = simd_eq(fw, simd_and(index_vector, selectorSplat), selectorSplat);
    610     Value * tbl = simd_and(index_vector, simd_not(selectorSplat));
    611     Value * rslt= simd_or(simd_and(mvmd_shuffle(fw, table0, index_vector), simd_not(selectMask)), simd_and(mvmd_shuffle(fw, table1, index_vector), selectMask));
     611    Value * idx = simd_and(index_vector, simd_not(selectorSplat));
     612    Value * rslt= simd_or(simd_and(mvmd_shuffle(fw, table0, idx), simd_not(selectMask)), simd_and(mvmd_shuffle(fw, table1, idx), selectMask));
    612613    return rslt;
    613614}
Note: See TracChangeset for help on using the changeset viewer.