From 3db2f866c8beb9d759176f76d21563df5ee7fcbd Mon Sep 17 00:00:00 2001 From: EgorBo Date: Wed, 24 May 2023 15:15:34 +0200 Subject: [PATCH] fix ISA outerloop tests --- src/coreclr/jit/hwintrinsicxarch.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/coreclr/jit/hwintrinsicxarch.cpp b/src/coreclr/jit/hwintrinsicxarch.cpp index 0ad8537a53f6a..45295c6d8935c 100644 --- a/src/coreclr/jit/hwintrinsicxarch.cpp +++ b/src/coreclr/jit/hwintrinsicxarch.cpp @@ -2565,18 +2565,23 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, { assert(sig->numArgs == 1); - op1 = impSIMDPopStack(); - #if defined(TARGET_X86) if (varTypeIsLong(simdBaseType)) { + if (!compExactlyDependsOn(InstructionSet_SSE41)) + { + // We need SSE41 to handle long, use software fallback + break; + } // Create a GetElement node which handles decomposition + op1 = impSIMDPopStack(); op2 = gtNewIconNode(0); retNode = gtNewSimdGetElementNode(retType, op1, op2, simdBaseJitType, simdSize); break; } #endif // TARGET_X86 + op1 = impSIMDPopStack(); retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, simdBaseJitType, simdSize); break; }