From a5e67bd53ff6ba7c231b1d41c6d010aab59b4d9e Mon Sep 17 00:00:00 2001 From: EgorBo Date: Thu, 16 Dec 2021 04:54:17 +0300 Subject: [PATCH] Remove forward-sub for hw intrinsics during inlining --- src/coreclr/jit/importer.cpp | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index 3519ac6f7b650..6ff5048af9647 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -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));