diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 6b7d47e207241..a8e4f3191b68e 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -8696,25 +8696,33 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX uint32_t getMaxVectorByteLength() const { #if defined(FEATURE_HW_INTRINSICS) && defined(TARGET_XARCH) - if (compOpportunisticallyDependsOn(InstructionSet_AVX)) + if (compOpportunisticallyDependsOn(InstructionSet_AVX512F)) { - if (compOpportunisticallyDependsOn(InstructionSet_AVX512F)) - { - return ZMM_REGSIZE_BYTES; - } - else - { - return YMM_REGSIZE_BYTES; - } + return ZMM_REGSIZE_BYTES; } - else + else if (compOpportunisticallyDependsOn(InstructionSet_AVX)) + { + return YMM_REGSIZE_BYTES; + } + else if (compOpportunisticallyDependsOn(InstructionSet_SSE)) { - assert(compIsaSupportedDebugOnly(InstructionSet_SSE)); return XMM_REGSIZE_BYTES; } + else + { + assert((JitConfig.EnableHWIntrinsic() == 0) || (JitConfig.EnableSSE() == 0)); + return 0; + } #elif defined(TARGET_ARM64) - assert(compIsaSupportedDebugOnly(InstructionSet_AdvSimd)); - return FP_REGSIZE_BYTES; + if (compOpportunisticallyDependsOn(InstructionSet_AdvSimd)) + { + return FP_REGSIZE_BYTES; + } + else + { + assert((JitConfig.EnableHWIntrinsic() == 0) || (JitConfig.EnableArm64AdvSimd() == 0)); + return 0; + } #else assert(!"getMaxVectorByteLength() unimplemented on target arch"); unreached();