Skip to content

Commit

Permalink
Handle an SPMI assert
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed May 19, 2023
1 parent e0eef4f commit 038796a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/coreclr/jit/simdashwintrinsic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ NamedIntrinsic SimdAsHWIntrinsicInfo::lookupId(Compiler* comp,

classId = lookupClassId(comp, argClassName, nullptr);

assert(classId != SimdAsHWIntrinsicClassId::Unknown);
if (classId == SimdAsHWIntrinsicClassId::Unknown)
{
return NI_Illegal;
}
assert(classId != SimdAsHWIntrinsicClassId::Vector);
}

Expand Down Expand Up @@ -155,9 +158,7 @@ SimdAsHWIntrinsicClassId SimdAsHWIntrinsicInfo::lookupClassId(Compiler* comp,
const char* className,
const char* enclosingClassName)
{
assert(className != nullptr);

if (enclosingClassName != nullptr)
if ((className == nullptr) || (enclosingClassName != nullptr))
{
return SimdAsHWIntrinsicClassId::Unknown;
}
Expand Down

0 comments on commit 038796a

Please sign in to comment.