Ignore:
Timestamp:
Feb 28, 2018, 3:58:31 PM (17 months ago)
Author:
cameron
Message:

Fix so that AVX builder does not use an AVX2 pmovmskb

File:
1 edited

Legend:

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

    r5871 r5884  
    2929            Value * a_as_ps = CreateBitCast(a, bitBlock_f32type);
    3030            return CreateCall(signmask_f32func, a_as_ps);
    31         } else if (fw == 8) {
    32             Value * signmask_f8func = Intrinsic::getDeclaration(getModule(), Intrinsic::x86_avx2_pmovmskb);
    33             Type * bitBlock_i8type = VectorType::get(getInt8Ty(), mBitBlockWidth/8);
    34             Value * a_as_ps = CreateBitCast(a, bitBlock_i8type);
    35             return CreateCall(signmask_f8func, a_as_ps);
    3631        }
    3732    } else if (mBitBlockWidth == 512) {
     
    246241    }
    247242}
     243   
     244Value * IDISA_AVX2_Builder::hsimd_signmask(unsigned fw, Value * a) {
     245    // AVX2 special cases
     246    if (mBitBlockWidth == 256) {
     247        if (fw == 8) {
     248            Value * signmask_f8func = Intrinsic::getDeclaration(getModule(), Intrinsic::x86_avx2_pmovmskb);
     249            Type * bitBlock_i8type = VectorType::get(getInt8Ty(), mBitBlockWidth/8);
     250            Value * a_as_ps = CreateBitCast(a, bitBlock_i8type);
     251            return CreateCall(signmask_f8func, a_as_ps);
     252        }
     253    }
     254    // Otherwise use default SSE logic.
     255    return IDISA_AVX_Builder::hsimd_signmask(fw, a);
     256}
    248257
    249258std::string IDISA_AVX512BW_Builder::getBuilderUniqueName() {
Note: See TracChangeset for help on using the changeset viewer.