return false;
}
#else
- // We have a retail config switch that can disable AVX/FMA/AVX2 instructions
- if ((isa == InstructionSet_AVX) || (isa == InstructionSet_FMA) || (isa == InstructionSet_AVX2))
- {
- return JitConfig.EnableAVX() != 0;
- }
- else
+ // We have a retail config switch that can disable instruction sets reliant on the VEX encoding
+ switch (isa)
{
- return true;
+ case InstructionSet_AVX:
+ case InstructionSet_FMA:
+ case InstructionSet_AVX2:
+ case InstructionSet_BMI1:
+ case InstructionSet_BMI2:
+ return JitConfig.EnableAVX() != 0;
+
+ default:
+ return true;
}
#endif
}
opts.setSupportedISA(InstructionSet_AES);
}
}
- if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_BMI1))
- {
- if (configEnableISA(InstructionSet_BMI1))
- {
- opts.setSupportedISA(InstructionSet_BMI1);
- }
- }
- if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_BMI2))
- {
- if (configEnableISA(InstructionSet_BMI2))
- {
- opts.setSupportedISA(InstructionSet_BMI2);
- }
- }
if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_LZCNT))
{
if (configEnableISA(InstructionSet_LZCNT))
}
}
- // There are currently two sets of flags that control AVX, FMA, and AVX2 support:
+ // There are currently two sets of flags that control instruction sets that require the VEX encoding:
// These are the general EnableAVX flag and the individual ISA flags. We need to
// check both for any given isa.
if (JitConfig.EnableAVX())
opts.setSupportedISA(InstructionSet_AVX2);
}
}
+ if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_BMI1))
+ {
+ if (configEnableISA(InstructionSet_BMI1))
+ {
+ opts.setSupportedISA(InstructionSet_BMI1);
+ }
+ }
+ if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_BMI2))
+ {
+ if (configEnableISA(InstructionSet_BMI2))
+ {
+ opts.setSupportedISA(InstructionSet_BMI2);
+ }
+ }
}
}
GenTree* op1,
GenTree* op2,
NamedIntrinsic hwIntrinsicID);
- GenTreeHWIntrinsic* gtNewScalarHWIntrinsicNode(var_types type,
- GenTree* op1,
- GenTree* op2,
- GenTree* op3,
- NamedIntrinsic hwIntrinsicID);
+ GenTreeHWIntrinsic* gtNewScalarHWIntrinsicNode(
+ var_types type, GenTree* op1, GenTree* op2, GenTree* op3, NamedIntrinsic hwIntrinsicID);
GenTree* gtNewMustThrowException(unsigned helper, var_types type, CORINFO_CLASS_HANDLE clsHnd);
CORINFO_CLASS_HANDLE gtGetStructHandleForHWSIMD(var_types simdType, var_types simdBaseType);
#endif // FEATURE_HW_INTRINSICS
return new (this, GT_HWIntrinsic) GenTreeHWIntrinsic(type, op1, op2, hwIntrinsicID, TYP_UNKNOWN, 0);
}
-GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode(var_types type,
- GenTree* op1,
- GenTree* op2,
- GenTree* op3,
- NamedIntrinsic hwIntrinsicID)
+GenTreeHWIntrinsic* Compiler::gtNewScalarHWIntrinsicNode(
+ var_types type, GenTree* op1, GenTree* op2, GenTree* op3, NamedIntrinsic hwIntrinsicID)
{
SetOpLclRelatedToSIMDIntrinsic(op1);
SetOpLclRelatedToSIMDIntrinsic(op2);
{
assert(sig->numArgs == 2);
- GenTree* op2 = impPopStack().val;
- GenTree* op1 = impPopStack().val;
+ GenTree* op2 = impPopStack().val;
+ GenTree* op1 = impPopStack().val;
return gtNewScalarHWIntrinsicNode(callType, op1, op2, intrinsic);
}