diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2018-12-20 11:08:10 -0800 |
---|---|---|
committer | Carol Eidt <carol.eidt@microsoft.com> | 2019-01-03 07:47:52 -0800 |
commit | de287410d790bc93668d4d01a202494087af8885 (patch) | |
tree | d945c07956c114dd73d21840a130199ecc109861 /src/jit/compiler.cpp | |
parent | eff427c02a89e135c38a96032feb3c9a6a13cf5b (diff) | |
download | coreclr-de287410d790bc93668d4d01a202494087af8885.tar.gz coreclr-de287410d790bc93668d4d01a202494087af8885.tar.bz2 coreclr-de287410d790bc93668d4d01a202494087af8885.zip |
Fix desktop SIMD failures
Fix ISA checking to work with desktop.
Also fix Value Numbering jitdump to not assert for struct types without a handle.
Diffstat (limited to 'src/jit/compiler.cpp')
-rw-r--r-- | src/jit/compiler.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp index 8093a7defc..6813f6b787 100644 --- a/src/jit/compiler.cpp +++ b/src/jit/compiler.cpp @@ -2366,6 +2366,7 @@ void Compiler::compSetProcessor() if (!jitFlags.IsSet(JitFlags::JIT_FLAG_PREJIT)) { +#ifdef FEATURE_CORECLR if (JitConfig.EnableHWIntrinsic()) { opts.setSupportedISA(InstructionSet_Base); @@ -2478,6 +2479,29 @@ void Compiler::compSetProcessor() #endif // _TARGET_AMD64_ } } +#else // !FEATURE_CORECLR + // If this is not FEATURE_CORECLR, the only flags supported by the VM are AVX and AVX2. + // Furthermore, the only two configurations supported by the desktop JIT are SSE2 and AVX2, + // so if the latter is set, we also check all the in-between options. + // Note that the EnableSSE2 and EnableSSE flags are only checked by HW Intrinsic code, + // so the System.Numerics.Vector support doesn't depend on those flags. + // However, if any of these are disabled, we will not enable AVX2. + // + if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_AVX) && jitFlags.IsSet(JitFlags::JIT_FLAG_USE_AVX2) && + (JitConfig.EnableAVX2() != 0) && (JitConfig.EnableAVX() != 0) && (JitConfig.EnableSSE42() != 0) && + (JitConfig.EnableSSE41() != 0) && (JitConfig.EnableSSSE3() != 0) && (JitConfig.EnableSSE3() != 0) && + (JitConfig.EnableSSE2() != 0) && (JitConfig.EnableSSE() != 0) && (JitConfig.EnableSSE3_4() != 0)) + { + opts.setSupportedISA(InstructionSet_SSE); + opts.setSupportedISA(InstructionSet_SSE2); + opts.setSupportedISA(InstructionSet_SSE3); + opts.setSupportedISA(InstructionSet_SSSE3); + opts.setSupportedISA(InstructionSet_SSE41); + opts.setSupportedISA(InstructionSet_SSE42); + opts.setSupportedISA(InstructionSet_AVX); + opts.setSupportedISA(InstructionSet_AVX2); + } +#endif // !FEATURE_CORECLR } if (!compIsForInlining()) @@ -2490,7 +2514,8 @@ void Compiler::compSetProcessor() codeGen->getEmitter()->SetContains256bitAVX(false); } } -#endif +#endif // _TARGET_XARCH_ + #if defined(_TARGET_ARM64_) // There is no JitFlag for Base instructions handle manually opts.setSupportedISA(InstructionSet_Base); |