Updating lookupNamedIntrinsic to no longer assert for an unexpected hwintrinsic metho...
authorTanner Gooding <tagoo@outlook.com>
Wed, 1 May 2019 02:00:44 +0000 (19:00 -0700)
committerGitHub <noreply@github.com>
Wed, 1 May 2019 02:00:44 +0000 (19:00 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/07b3afc27304800f00975c8fd4836b319aaa8820

src/coreclr/src/jit/importer.cpp

index d493001..05eb086 100644 (file)
@@ -4347,11 +4347,14 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
 #else // !defined(_TARGET_XARCH_) && !defined(_TARGET_ARM64_)
 #error Unsupported platform
 #endif // !defined(_TARGET_XARCH_) && !defined(_TARGET_ARM64_)
-        else
+        else if (strcmp(methodName, "get_IsSupported") == 0)
         {
-            assert(strcmp(methodName, "get_IsSupported") == 0);
             return NI_IsSupported_False;
         }
+        else
+        {
+            return gtIsRecursiveCall(method) ? NI_Throw_PlatformNotSupportedException : NI_Illegal;
+        }
     }
 #endif // FEATURE_HW_INTRINSICS