Ignore:
Timestamp:
Jul 10, 2015, 9:30:08 AM (4 years ago)
Author:
cameron
Message:

Simplify of unit advance with IDISA dslli improves performance

File:
1 edited

Legend:

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

    r4653 r4655  
    152152}
    153153
     154Value * IDISA_Builder::mvmd_dslli(unsigned fw, Value * a, Value * b, unsigned shift) {
     155    unsigned field_count = mBitBlockSize/fw;
     156    Value * aVec = fwCast(fw, a);
     157    Value * bVec = fwCast(fw, b);
     158    std::vector<Constant*> Idxs;
     159    for (unsigned i = shift; i < field_count + shift; i++) {
     160        Idxs.push_back(llvm_builder->getInt32(i));
     161    }
     162    return bitBlockCast(llvm_builder->CreateShuffleVector(aVec, bVec, ConstantVector::get(Idxs)));
     163}
    154164
    155165
Note: See TracChangeset for help on using the changeset viewer.