From 07b3afc27304800f00975c8fd4836b319aaa8820 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Tue, 30 Apr 2019 19:00:44 -0700 Subject: Updating lookupNamedIntrinsic to no longer assert for an unexpected hwintrinsic method. (#24327) --- src/jit/importer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/jit/importer.cpp') diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index d49300118c..05eb086fdf 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -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 -- cgit v1.2.3