Skip to content

Commit

Permalink
Precedence of BaseTypeFromFirstArg, BaseTypeFromSecondArg over "retur…
Browse files Browse the repository at this point in the history
…n type being a struct" in HWIntrinsicInfo::lookupSimdSize in hwintrinsic.cpp
  • Loading branch information
echesakov committed Feb 19, 2020
1 parent ad52b4f commit 7391ecd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/coreclr/src/jit/hwintrinsic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,20 +247,20 @@ unsigned HWIntrinsicInfo::lookupSimdSize(Compiler* comp, NamedIntrinsic id, CORI

CORINFO_CLASS_HANDLE typeHnd = nullptr;

if (JITtype2varType(sig->retType) == TYP_STRUCT)
{
typeHnd = sig->retTypeSigClass;
}
else if (HWIntrinsicInfo::BaseTypeFromFirstArg(id))
if (HWIntrinsicInfo::BaseTypeFromFirstArg(id))
{
typeHnd = comp->info.compCompHnd->getArgClass(sig, sig->args);
}
else
else if (HWIntrinsicInfo::BaseTypeFromSecondArg(id))
{
assert(HWIntrinsicInfo::BaseTypeFromSecondArg(id));
CORINFO_ARG_LIST_HANDLE secondArg = comp->info.compCompHnd->getArgNext(sig->args);
typeHnd = comp->info.compCompHnd->getArgClass(sig, secondArg);
}
else
{
assert(JITtype2varType(sig->retType) == TYP_STRUCT);
typeHnd = sig->retTypeSigClass;
}

unsigned simdSize = 0;
var_types baseType = comp->getBaseTypeAndSizeOfSIMDType(typeHnd, &simdSize);
Expand Down

0 comments on commit 7391ecd

Please sign in to comment.