Changeset 4662 for icGREP


Ignore:
Timestamp:
Jul 13, 2015, 10:49:47 AM (4 years ago)
Author:
cameron
Message:

Add bitblock_any to IDISA, return signmask of N fields as iN

Location:
icGREP/icgrep-devel/icgrep/IDISA
Files:
2 edited

Legend:

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

    r4655 r4662  
    149149Value * IDISA_Builder::hsimd_signmask(unsigned fw, Value * a) {
    150150    Value * mask = llvm_builder->CreateICmpSLT(fwCast(fw, a), ConstantAggregateZero::get(fwVectorType(fw)));
    151     return mask;
     151    return llvm_builder->CreateBitCast(mask, llvm_builder->getIntNTy(mBitBlockSize/fw));
    152152}
    153153
     
    163163}
    164164
    165 
     165Value * IDISA_Builder::bitblock_any(Value * a) {
     166    Type * iBitBlock = llvm_builder->getIntNTy(mBitBlockSize);
     167    return llvm_builder->CreateICmpNE(llvm_builder->CreateBitCast(a, iBitBlock),  ConstantInt::get(iBitBlock, 0));
     168}
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_builder.h

    r4655 r4662  
    5050
    5151    Value * mvmd_dslli(unsigned fw, Value * a, Value * b, unsigned shift);
     52   
     53    Value * bitblock_any(Value * a);
     54
    5255
    5356private:
Note: See TracChangeset for help on using the changeset viewer.