Disable the [Intrinsic] check for desktop SIMD
authorCarol Eidt <carol.eidt@microsoft.com>
Wed, 2 Jan 2019 20:34:57 +0000 (12:34 -0800)
committerCarol Eidt <carol.eidt@microsoft.com>
Thu, 3 Jan 2019 15:47:53 +0000 (07:47 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/c5a4a390e53cb30cc5b42f9dc4fb80c5ca579534

src/coreclr/src/jit/simd.cpp

index a302c63..4941f56 100644 (file)
@@ -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;