Ignore:
Timestamp:
Dec 15, 2018, 12:40:07 PM (4 months ago)
Author:
cameron
Message:

Verifying availability of BMI2 instructions

File:
1 edited

Legend:

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

    r6184 r6234  
    2222    , IDISA_SSE2_Builder(C, vectorWidth, laneWidth)
    2323    {
    24 
    2524    }
    2625
     
    3029
    3130    ~IDISA_AVX_Builder() {}
    32 
    3331};
    3432
     
    3937    : IDISA_Builder(C, AVX_width, vectorWidth, laneWidth)
    4038    , IDISA_AVX_Builder(C, vectorWidth, laneWidth) {
    41 
     39        llvm::StringMap<bool> features;
     40        hasBMI2 = llvm::sys::getHostCPUFeatures(features) && features.lookup("bmi2");
    4241    }
    4342
     
    6160
    6261    ~IDISA_AVX2_Builder() {}
     62protected:
     63    bool hasBMI2;
    6364};
    6465
Note: See TracChangeset for help on using the changeset viewer.