From 47498ce4983e13585e65a0282ac43f9d5c8a46b3 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Mon, 18 May 2020 11:53:34 -0700 Subject: [PATCH] Don't handle IEquatable`1.Equals via SimdAsHWIntrinsic --- src/coreclr/src/jit/simdashwintrinsic.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/jit/simdashwintrinsic.cpp b/src/coreclr/src/jit/simdashwintrinsic.cpp index 3e6ff3d76eb0f..01829f5beff96 100644 --- a/src/coreclr/src/jit/simdashwintrinsic.cpp +++ b/src/coreclr/src/jit/simdashwintrinsic.cpp @@ -189,7 +189,13 @@ GenTree* Compiler::impSimdAsHWIntrinsic(NamedIntrinsic intrinsic, // We want to resolve and populate the handle cache for this type even // if it isn't the basis for anything carried on the node. baseType = getBaseTypeAndSizeOfSIMDType(clsHnd, &simdSize); - assert(simdSize != 0); + + if (simdSize == 0) + { + // We get here for a devirtualization of IEquatable`1.Equals + assert(!isSIMDClass(clsHnd)); + return nullptr; + } if (retType == TYP_STRUCT) {