diff --git a/src/coreclr/jit/fginline.cpp b/src/coreclr/jit/fginline.cpp index cbcadb2d30b47c..ae8119b51e0308 100644 --- a/src/coreclr/jit/fginline.cpp +++ b/src/coreclr/jit/fginline.cpp @@ -1535,17 +1535,6 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo) CallArg* arg = argInfo.arg; GenTree* argNode = arg->GetNode(); - // TODO-ARGS: This can probably be relaxed, the old comment was: - // argHasPutArg disqualifies the arg from a direct substitution because we don't have information about - // its user. For example: replace `LCL_VAR short` with `PUTARG_TYPE short->LCL_VAR int`, - // we should keep `PUTARG_TYPE` iff the user is a call that needs `short` and delete it otherwise. - // - // Today we no longer have this contextual PUTARG_TYPE and morph - // should properly handle substituting a TYP_INT node for a - // TYP_SHORT LCL_VAR (at least for a call arg). - bool argHasPutArg = !varTypeIsStruct(arg->GetSignatureType()) && - (genTypeSize(argNode) != genTypeSize(arg->GetSignatureType())); - assert(!argNode->OperIs(GT_RET_EXPR)); if (argInfo.argHasTmp) @@ -1566,8 +1555,7 @@ Statement* Compiler::fgInlinePrependStatements(InlineInfo* inlineInfo) GenTree* argSingleUseNode = argInfo.argBashTmpNode; - if ((argSingleUseNode != nullptr) && !(argSingleUseNode->gtFlags & GTF_VAR_CLONED) && argIsSingleDef && - !argHasPutArg) + if ((argSingleUseNode != nullptr) && !(argSingleUseNode->gtFlags & GTF_VAR_CLONED) && argIsSingleDef) { // Change the temp in-place to the actual argument. // We currently do not support this for struct arguments, so it must not be a GT_OBJ.