Don't turn off compCanUseSSE2 on x86 RyuJIT under jit stress. (dotnet/coreclr#8068)
authorSivarv <sivarv@microsoft.com>
Thu, 10 Nov 2016 03:53:24 +0000 (19:53 -0800)
committerJan Kotas <jkotas@microsoft.com>
Thu, 10 Nov 2016 03:53:24 +0000 (19:53 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/1d5c60807c9182290245c266c4f6daac47d2a4a7

src/coreclr/src/jit/compiler.cpp

index 74ba9f0..c5f8016 100644 (file)
@@ -2321,6 +2321,9 @@ void Compiler::compSetProcessor()
     if (opts.compUseCMOV)
         opts.compUseCMOV = !compStressCompile(STRESS_USE_CMOV, 50);
 
+// X86 RyuJIT requires SSE2 to be available and hence
+// don't turn off compCanUseSSE2 under stress.
+#ifdef LEGACY_BACKEND
     // Should we override the SSE2 setting
     enum
     {
@@ -2335,7 +2338,12 @@ void Compiler::compSetProcessor()
         opts.compCanUseSSE2 = true;
     else if (opts.compCanUseSSE2)
         opts.compCanUseSSE2 = !compStressCompile(STRESS_GENERIC_VARN, 50);
+#else  // !LEGACY_JITBACKEND
+    assert(opts.compCanUseSSE2);
+#endif // !LEGACY_JITBACKEND
+
 #endif // DEBUG
+
 #endif // _TARGET_X86_
 }