Skip to content

Commit 038796a

Browse files
committed
Handle an SPMI assert
1 parent e0eef4f commit 038796a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/coreclr/jit/simdashwintrinsic.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ NamedIntrinsic SimdAsHWIntrinsicInfo::lookupId(Compiler* comp,
105105

106106
classId = lookupClassId(comp, argClassName, nullptr);
107107

108-
assert(classId != SimdAsHWIntrinsicClassId::Unknown);
108+
if (classId == SimdAsHWIntrinsicClassId::Unknown)
109+
{
110+
return NI_Illegal;
111+
}
109112
assert(classId != SimdAsHWIntrinsicClassId::Vector);
110113
}
111114

@@ -155,9 +158,7 @@ SimdAsHWIntrinsicClassId SimdAsHWIntrinsicInfo::lookupClassId(Compiler* comp,
155158
const char* className,
156159
const char* enclosingClassName)
157160
{
158-
assert(className != nullptr);
159-
160-
if (enclosingClassName != nullptr)
161+
if ((className == nullptr) || (enclosingClassName != nullptr))
161162
{
162163
return SimdAsHWIntrinsicClassId::Unknown;
163164
}

0 commit comments

Comments
 (0)