Changeset 4891


Ignore:
Timestamp:
Dec 13, 2015, 10:23:28 PM (2 years ago)
Author:
cameron
Message:

Initial check-in of s2p generation

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

Legend:

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

    r4881 r4891  
    117117}
    118118
     119Value * IDISA_Builder::simd_if(unsigned fw, Value * cond, Value * a, Value * b) {
     120    Value * aVec = fwCast(fw, a);
     121    Value * bVec = fwCast(fw, b);
     122    return mLLVMBuilder->CreateSelect(mLLVMBuilder->CreateICmpSLT(cond, mZeroInitializer), aVec, bVec);
     123}
     124
     125   
    119126Value * IDISA_Builder::esimd_mergeh(unsigned fw, Value * a, Value * b) {
    120127    unsigned field_count = mBitBlockWidth/fw;
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_builder.h

    r4881 r4891  
    5858    Value * simd_min(unsigned fw, Value * a, Value * b);
    5959    Value * simd_umin(unsigned fw, Value * a, Value * b);
     60    Value * simd_if(unsigned fw, Value * cond, Value * a, Value * b);
    6061   
    6162    Value * simd_slli(unsigned fw, Value * a, unsigned shift);
     
    8485    Value * simd_xor(Value * a, Value * b);
    8586    Value * simd_not(Value * a);
     87    Value * fwCast(unsigned fw, Value * a);
    8688   
    8789private:
     
    9597   
    9698    VectorType * fwVectorType(unsigned fw);
    97     Value * fwCast(unsigned fw, Value * a);
    9899};
    99100
Note: See TracChangeset for help on using the changeset viewer.