Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Nov 2, 2024
1 parent 1f2f4ad commit d9354f2
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,22 @@ bool Compiler::impGetLclVal(GenTreeLclVar* tree, GenTree** val)

Compiler* comp = this;

auto setCompForLcl = [&comp](unsigned lclNum) {
if (comp->compIsForInlining())
{
for (unsigned i = 0; i < comp->impInlineInfo->argCnt; i++)
{
if (comp->impInlineInfo->inlArgInfo[i].argTmpNum == lclNum)
{
comp = comp->impInlineInfo->InlinerCompiler;
break;
}
}
}
};

setCompForLcl(tree->GetLclNum());

JITDUMP("\n");

while (true)
Expand All @@ -631,17 +647,7 @@ bool Compiler::impGetLclVal(GenTreeLclVar* tree, GenTree** val)
}
else if (gtVal->OperIs(GT_LCL_VAR))
{
if (comp->compIsForInlining())
{
for (unsigned i = 0; i < comp->impInlineInfo->argCnt; i++)
{
if (comp->impInlineInfo->inlArgInfo[i].argTmpNum == gtVal->AsLclVar()->GetLclNum())
{
comp = comp->impInlineInfo->InlinerCompiler;
break;
}
}
}
setCompForLcl(gtVal->AsLclVar()->GetLclNum());
tree = gtVal->AsLclVar();
continue;
}
Expand Down

0 comments on commit d9354f2

Please sign in to comment.