Skip to content

Commit 5a5d379

Browse files
authored
Remove forward-sub for hw intrinsics during inlining (#62883)
1 parent e151f26 commit 5a5d379

File tree

1 file changed

+2
-27
lines changed

1 file changed

+2
-27
lines changed

src/coreclr/jit/importer.cpp

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20789,33 +20789,8 @@ GenTree* Compiler::impInlineFetchArg(unsigned lclNum, InlArgInfo* inlArgInfo, In
2078920789
// TODO-1stClassStructs: We currently do not reuse an existing lclVar
2079020790
// if it is a struct, because it requires some additional handling.
2079120791

20792-
bool substitute = false;
20793-
switch (argNode->OperGet())
20794-
{
20795-
#ifdef FEATURE_HW_INTRINSICS
20796-
case GT_HWINTRINSIC:
20797-
{
20798-
// Enable for all parameterless (=invariant) hw intrinsics such as
20799-
// Vector128<>.Zero and Vector256<>.AllBitSets. We might consider
20800-
// doing that for Vector.Create(cns) as well.
20801-
if (argNode->AsHWIntrinsic()->GetOperandCount() == 0)
20802-
{
20803-
substitute = true;
20804-
}
20805-
break;
20806-
}
20807-
#endif
20808-
20809-
// TODO: Enable substitution for CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE (typeof(T))
20810-
// but in order to benefit from that, we need to move various "typeof + IsValueType"
20811-
// optimizations from importer to morph.
20812-
20813-
default:
20814-
break;
20815-
}
20816-
20817-
if (substitute || (!varTypeIsStruct(lclTyp) && !argInfo.argHasSideEff && !argInfo.argHasGlobRef &&
20818-
!argInfo.argHasCallerLocalRef))
20792+
if ((!varTypeIsStruct(lclTyp) && !argInfo.argHasSideEff && !argInfo.argHasGlobRef &&
20793+
!argInfo.argHasCallerLocalRef))
2081920794
{
2082020795
/* Get a *LARGE* LCL_VAR node */
2082120796
op1 = gtNewLclLNode(tmpNum, genActualType(lclTyp) DEBUGARG(lclNum));

0 commit comments

Comments
 (0)