Changeset 6007


Ignore:
Timestamp:
May 1, 2018, 2:15:07 PM (6 months ago)
Author:
cameron
Message:

mvmd_compress initial check-in

Location:
icGREP/icgrep-devel/icgrep/IR_Gen
Files:
4 edited

Legend:

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

    r5980 r6007  
    341341}
    342342
     343llvm::Value * IDISA_AVX512F_Builder::mvmd_compress(unsigned fw, llvm::Value * a, llvm::Value * select_mask) {
     344   
     345    if (mBitBlockWidth == 512 && fw == 32) {
     346        Value * compressFunc = Intrinsic::getDeclaration(getModule(), Intrinsic::x86_avx512_mask_compress_d_512);
     347        return CreateCall(compressFunc, {fwCast(32, a), fwCast(32, allZeroes()), select_mask});
     348    }
     349    if (mBitBlockWidth == 512 && fw == 64) {
     350        Value * compressFunc = Intrinsic::getDeclaration(getModule(), Intrinsic::x86_avx512_mask_compress_q_512);
     351        return CreateCall(compressFunc, {fwCast(64, a), fwCast(64, allZeroes()), select_mask});
     352    }
     353    return IDISA_Builder::mvmd_compress(fw, a, select_mask);
     354}
     355
    343356Value * IDISA_AVX512F_Builder:: mvmd_slli(unsigned fw, llvm::Value * a, unsigned shift) {
    344357    if (shift == 0) return a;
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_avx_builder.h

    r5979 r6007  
    6969    llvm::Value * mvmd_slli(unsigned fw, llvm::Value * a, unsigned shift) override;
    7070    llvm::Value * hsimd_signmask(unsigned fw, llvm::Value * a) override;
     71    virtual llvm::Value * mvmd_compress(unsigned fw, llvm::Value * a, llvm::Value * select_mask) override;
    7172
    7273    ~IDISA_AVX512F_Builder() {
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r5985 r6007  
    512512    }
    513513    return CreateShuffleVector(fwCast(fw, b), fwCast(fw, a), ConstantVector::get({Idxs, field_count}));
     514}
     515
     516llvm::Value * IDISA_Builder::mvmd_compress(unsigned fw, llvm::Value * a, llvm::Value * select_mask) {
     517    report_fatal_error("Unsupported field width: mvmd_compress " + std::to_string(fw));
    514518}
    515519
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.h

    r5985 r6007  
    149149    virtual llvm::Value * mvmd_srli(unsigned fw, llvm::Value * a, unsigned shift);
    150150    virtual llvm::Value * mvmd_dslli(unsigned fw, llvm::Value * a, llvm::Value * b, unsigned shift);
    151    
     151    virtual llvm::Value * mvmd_compress(unsigned fw, llvm::Value * a, llvm::Value * select_mask);
     152
    152153   
    153154    virtual llvm::Value * bitblock_any(llvm::Value * a);
Note: See TracChangeset for help on using the changeset viewer.