Ignore CORJIT_FLAG_VECTOR512_THROTTLING sometimes under stress (#87631)
authorBruce Forstall <brucefo@microsoft.com>
Thu, 15 Jun 2023 21:09:00 +0000 (14:09 -0700)
committerGitHub <noreply@github.com>
Thu, 15 Jun 2023 21:09:00 +0000 (14:09 -0700)
src/coreclr/jit/compiler.cpp

index a25a04787c5fa62e39dbe711c93ab6f4c1ee586c..4a1633b0835bfd21f58ebe45aedf24a756c3c3c5 100644 (file)
@@ -2305,8 +2305,14 @@ void Compiler::compSetProcessor()
             // default preferred vector width to 256-bits in some scenarios. Power
             // users can override this with `DOTNET_PreferredVectorBitWidth=512` to
             // allow using such instructions where hardware support is available.
+            //
+            // Under stress, sometimes leave the preferred vector width at 512, even if that means
+            // throttling. This helps with test coverage on test machines that might be older.
 
-            preferredVectorByteLength = 256 / 8;
+            if (!compStressCompile(STRESS_GENERIC_VARN, 20))
+            {
+                preferredVectorByteLength = 256 / 8;
+            }
         }
     }