Changeset 4891
- Timestamp:
- Dec 13, 2015, 10:23:28 PM (3 years ago)
- 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 117 117 } 118 118 119 Value * 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 119 126 Value * IDISA_Builder::esimd_mergeh(unsigned fw, Value * a, Value * b) { 120 127 unsigned field_count = mBitBlockWidth/fw; -
icGREP/icgrep-devel/icgrep/IDISA/idisa_builder.h
r4881 r4891 58 58 Value * simd_min(unsigned fw, Value * a, Value * b); 59 59 Value * simd_umin(unsigned fw, Value * a, Value * b); 60 Value * simd_if(unsigned fw, Value * cond, Value * a, Value * b); 60 61 61 62 Value * simd_slli(unsigned fw, Value * a, unsigned shift); … … 84 85 Value * simd_xor(Value * a, Value * b); 85 86 Value * simd_not(Value * a); 87 Value * fwCast(unsigned fw, Value * a); 86 88 87 89 private: … … 95 97 96 98 VectorType * fwVectorType(unsigned fw); 97 Value * fwCast(unsigned fw, Value * a);98 99 }; 99 100
Note: See TracChangeset
for help on using the changeset viewer.