Ignore:
Timestamp:
Apr 19, 2018, 1:49:53 PM (15 months ago)
Author:
cameron
Message:

Fix for type error with AVX-512 packh/packl

File:
1 edited

Legend:

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

    r5979 r5980  
    274274        llvm::Value * mask = getInt32(-1);
    275275        llvm::Constant * shuffleMask = ConstantVector::get({Idxs, 64});
     276        llvm::Constant * src = UndefValue::get(VectorType::get(getInt8Ty(), 32));
    276277
    277278        a = fwCast(fw, a);
    278         a = IDISA_Builder::simd_srai(fw, a, fw/2);
    279         a = CreateCall(pmovfunc, {a, a, mask});
     279        a = IDISA_Builder::simd_srli(fw, a, fw/2);
     280        a = CreateCall(pmovfunc, {a, src, mask});
    280281        b = fwCast(fw, b);
    281         b = IDISA_Builder::simd_srai(fw, b, fw/2);
    282         b = CreateCall(pmovfunc, {b, b, mask});
     282        b = IDISA_Builder::simd_srli(fw, b, fw/2);
     283        b = CreateCall(pmovfunc, {b, src, mask});
    283284
    284285        llvm::Value * c = CreateShuffleVector(a, b, shuffleMask);
     
    286287        return c;
    287288    }
    288 return IDISA_Builder::hsimd_packh(fw, a, b);
     289    return IDISA_Builder::hsimd_packh(fw, a, b);
    289290}
    290291
     
    301302        llvm::Value * mask = getInt32(-1);
    302303        llvm::Constant * shuffleMask = ConstantVector::get({Idxs, 64});
    303 
     304        llvm::Constant * src = UndefValue::get(VectorType::get(getInt8Ty(), 32));
    304305        a = fwCast(fw, a);
    305         a = CreateCall(pmovfunc, {a, a, mask});
     306        a = CreateCall(pmovfunc, {a, src, mask});
    306307        b = fwCast(fw, b);
    307         b = CreateCall(pmovfunc, {b, b, mask});
     308        b = CreateCall(pmovfunc, {b, src, mask});
    308309
    309310        llvm::Value * c = CreateShuffleVector(a, b, shuffleMask);
     
    311312        return c;
    312313    }
    313 return IDISA_Builder::hsimd_packl(fw, a, b);
     314    return IDISA_Builder::hsimd_packl(fw, a, b);
    314315}
    315316
Note: See TracChangeset for help on using the changeset viewer.