Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 2 additions & 27 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20838,33 +20838,8 @@ GenTree* Compiler::impInlineFetchArg(unsigned lclNum, InlArgInfo* inlArgInfo, In
// TODO-1stClassStructs: We currently do not reuse an existing lclVar
// if it is a struct, because it requires some additional handling.

bool substitute = false;
switch (argNode->OperGet())
{
#ifdef FEATURE_HW_INTRINSICS
case GT_HWINTRINSIC:
{
// Enable for all parameterless (=invariant) hw intrinsics such as
// Vector128<>.Zero and Vector256<>.AllBitSets. We might consider
// doing that for Vector.Create(cns) as well.
if (argNode->AsHWIntrinsic()->GetOperandCount() == 0)
{
substitute = true;
}
break;
}
#endif

// TODO: Enable substitution for CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE (typeof(T))
// but in order to benefit from that, we need to move various "typeof + IsValueType"
// optimizations from importer to morph.

default:
break;
}

if (substitute || (!varTypeIsStruct(lclTyp) && !argInfo.argHasSideEff && !argInfo.argHasGlobRef &&
!argInfo.argHasCallerLocalRef))
if ((!varTypeIsStruct(lclTyp) && !argInfo.argHasSideEff && !argInfo.argHasGlobRef &&
!argInfo.argHasCallerLocalRef))
{
/* Get a *LARGE* LCL_VAR node */
op1 = gtNewLclLNode(tmpNum, genActualType(lclTyp) DEBUGARG(lclNum));
Expand Down