Changeset 6057


Ignore:
Timestamp:
May 23, 2018, 1:07:47 PM (3 months ago)
Author:
cameron
Message:

mvmd_shuffle<64> for SSE2

File:
1 edited

Legend:

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

    r6055 r6057  
    159159        Constant * idx[2] = {ConstantInt::get(getInt32Ty(), 1), ConstantInt::get(getInt32Ty(), 0)};
    160160        Value * exchanged = CreateShuffleVector(a, UndefValue::get(fwVectorType(fw)), ConstantVector::get({idx, 2}));
    161         // bits that change if we the value in a needs to be exchanged.
     161        // bits that change if the value in a needs to be exchanged.
    162162        Value * changed = simd_xor(a, exchanged);
    163163        // Now create a mask to select between original and exchanged values.
    164164        Constant * xchg[2] = {ConstantInt::get(getInt64Ty(), 1), ConstantInt::get(getInt64Ty(), 0)};
    165         Value * exchange_mask = simd_eq(fw, shuffle_table, ConstantVector::get({xchg, 2}));
     165        Value * xchg_vec = ConstantVector::get({xchg, 2});
     166        Constant * oneSplat = ConstantVector::getSplat(2, ConstantInt::get(getInt64Ty(), 1));
     167        Value * exchange_mask = simd_eq(fw, simd_and(shuffle_table, oneSplat), xchg_vec);
    166168        Value * rslt = simd_xor(simd_and(changed, exchange_mask), a);
    167169        return rslt;
Note: See TracChangeset for help on using the changeset viewer.