JIT: Skip Min/Max optimization when SSE2 is not enabled (#72991)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Thu, 28 Jul 2022 14:42:53 +0000 (16:42 +0200)
committerGitHub <noreply@github.com>
Thu, 28 Jul 2022 14:42:53 +0000 (16:42 +0200)
Fix #71928

src/coreclr/jit/importer.cpp

index 2346219..eb14d45 100644 (file)
@@ -4466,6 +4466,11 @@ GenTree* Compiler::impIntrinsic(GenTree*                newobjThis,
                     break;
                 }
 
+                if (!compOpportunisticallyDependsOn(InstructionSet_SSE2))
+                {
+                    break;
+                }
+
                 if (ni == NI_System_Math_Max)
                 {
                     // maxsd, maxss return op2 if both inputs are 0 of either sign