Ignore:
Timestamp:
Apr 19, 2018, 1:17:43 PM (13 months ago)
Author:
cameron
Message:

mvmd_slli override for AVX-512 in support of u8u16

File:
1 edited

Legend:

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

    r5977 r5979  
    482482Value * IDISA_Builder::mvmd_slli(unsigned fw, Value * a, unsigned shift) {
    483483    if (fw < 8) report_fatal_error("Unsupported field width: mvmd_slli " + std::to_string(fw));
    484     const auto field_count = mBitBlockWidth / fw;
    485     return mvmd_dslli(fw, a, Constant::getNullValue(fwVectorType(fw)), field_count - shift);
     484    Value * shifted = mvmd_dslli(fw, a, Constant::getNullValue(fwVectorType(fw)), shift);
     485    return shifted;
    486486}
    487487
    488488Value * IDISA_Builder::mvmd_srli(unsigned fw, Value * a, unsigned shift) {
    489489    if (fw < 8) report_fatal_error("Unsupported field width: mvmd_srli " + std::to_string(fw));
    490     return mvmd_dslli(fw, Constant::getNullValue(fwVectorType(fw)), a, shift);
     490    const auto field_count = mBitBlockWidth / fw;
     491    return mvmd_dslli(fw, Constant::getNullValue(fwVectorType(fw)), a, field_count - shift);
    491492}
    492493
     
    496497    Constant * Idxs[field_count];
    497498    for (unsigned i = 0; i < field_count; i++) {
    498         Idxs[i] = getInt32(i + shift);
     499        Idxs[i] = getInt32(i + field_count - shift);
    499500    }
    500501    return CreateShuffleVector(fwCast(fw, b), fwCast(fw, a), ConstantVector::get({Idxs, field_count}));
Note: See TracChangeset for help on using the changeset viewer.