#endif // DEBUG
#ifdef FEATURE_SIMD
+
+#ifndef TARGET_ARM64
// Minimum bar for availing SIMD benefits is SSE2 on AMD64/x86.
featureSIMD = jitFlags->IsSet(JitFlags::JIT_FLAG_FEATURE_SIMD);
+#endif
+
setUsesSIMDTypes(false);
#endif // FEATURE_SIMD
#ifdef FEATURE_SIMD
+#ifndef TARGET_ARM64
// Should we support SIMD intrinsics?
bool featureSIMD;
+#endif
// Should we recognize SIMD types?
// We always do this on ARM64 to support HVA types.
// true iff the given instruction set is enabled via configuration (environment variables, etc.).
bool Compiler::compSupportsHWIntrinsic(CORINFO_InstructionSet isa)
{
- return compHWIntrinsicDependsOn(isa) && (featureSIMD || HWIntrinsicInfo::isScalarIsa(isa)) &&
+ return compHWIntrinsicDependsOn(isa) && (supportSIMDTypes() || HWIntrinsicInfo::isScalarIsa(isa)) &&
(
#ifdef DEBUG
JitConfig.EnableIncompleteISAClass() ||
var_types retType = JITtype2varType(sig->retType);
CorInfoType simdBaseJitType = CORINFO_TYPE_UNDEF;
- if ((retType == TYP_STRUCT) && featureSIMD)
+ if ((retType == TYP_STRUCT) && supportSIMDTypes())
{
unsigned int sizeBytes;
simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(sig->retTypeSigClass, &sizeBytes);
}
else
{
- assert(featureSIMD);
+ assert(supportSIMDTypes());
unsigned int sizeBytes;
simdBaseJitType = getBaseJitTypeAndSizeOfSIMDType(clsHnd, &sizeBytes);
assert(category != HW_Category_Scalar);
assert(!HWIntrinsicInfo::isScalarIsa(HWIntrinsicInfo::lookupIsa(intrinsic)));
- if (!featureSIMD || !IsBaselineSimdIsaSupported())
+ if (!supportSIMDTypes() || !IsBaselineSimdIsaSupported())
{
return nullptr;
}
}
#ifdef FEATURE_SIMD
- if (featureSIMD)
+ if (supportSIMDTypes())
{
call = impSIMDIntrinsic(opcode, newobjThis, clsHnd, methHnd, sig, mflags, pResolvedToken->token);
if (call != nullptr)
}
#ifdef FEATURE_SIMD
- if (featureSIMD && varTypeIsStruct(elemTyp) && structSizeMightRepresentSIMDType(elemSize))
+ if (supportSIMDTypes() && varTypeIsStruct(elemTyp) && structSizeMightRepresentSIMDType(elemSize))
{
// If this is a SIMD type, this is the point at which we lose the type information,
// so we need to set the correct type on the GT_IND.
CorInfoType* simdBaseJitType,
unsigned* sizeBytes)
{
- assert(featureSIMD);
+ assert(supportSIMDTypes());
assert(simdBaseJitType != nullptr);
assert(sizeBytes != nullptr);
void Compiler::impMarkContiguousSIMDFieldAssignments(Statement* stmt)
{
- if (!featureSIMD || opts.OptimizationDisabled())
+ if (!supportSIMDTypes() || opts.OptimizationDisabled())
{
return;
}
unsigned methodFlags,
int memberRef)
{
- assert(featureSIMD);
+ assert(supportSIMDTypes());
// Exit early if we are not in one of the SIMD types.
if (!isSIMDClass(clsHnd))
CORINFO_SIG_INFO* sig,
GenTree* newobjThis)
{
- if (!featureSIMD)
+ if (!supportSIMDTypes())
{
// We can't support SIMD intrinsics if the JIT doesn't support the feature
return nullptr;
{
var_types simdBaseType = JitType2PreciseVarType(simdBaseJitType);
- assert(featureSIMD);
+ assert(supportSIMDTypes());
assert(retType != TYP_UNKNOWN);
assert(varTypeIsArithmetic(simdBaseType));
assert(simdSize != 0);