From 3adc7a2e83dbbdaaf38269ac4d3085a78bd89aab Mon Sep 17 00:00:00 2001 From: Carol Eidt Date: Wed, 2 Jan 2019 12:34:57 -0800 Subject: [PATCH] Disable the [Intrinsic] check for desktop SIMD Commit migrated from https://github.com/dotnet/coreclr/commit/c5a4a390e53cb30cc5b42f9dc4fb80c5ca579534 --- src/coreclr/src/jit/simd.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/jit/simd.cpp b/src/coreclr/src/jit/simd.cpp index a302c63..4941f56 100644 --- a/src/coreclr/src/jit/simd.cpp +++ b/src/coreclr/src/jit/simd.cpp @@ -2354,13 +2354,20 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode, { assert(featureSIMD); - // Exit early if we are either not in one of the SIMD types or if the method - // is not a JIT Intrinsic (which requires the [Intrinsic] attribute). - if (!isSIMDClass(clsHnd) || ((methodFlags & CORINFO_FLG_JIT_INTRINSIC) == 0)) + // Exit early if we are not in one of the SIMD types. + if (!isSIMDClass(clsHnd)) { return nullptr; } +#ifdef FEATURE_CORECLR + // For coreclr, we also exit early if the method is not a JIT Intrinsic (which requires the [Intrinsic] attribute). + if ((methodFlags & CORINFO_FLG_JIT_INTRINSIC) == 0) + { + return nullptr; + } +#endif // FEATURE_CORECLR + // Get base type and intrinsic Id var_types baseType = TYP_UNKNOWN; unsigned size = 0; -- 2.7.4