Skip to content

Commit

Permalink
Retrieve the appropriate node in case of copyReload
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Mar 15, 2022
1 parent 29bb02b commit 9cb8989
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coreclr/jit/sideeffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ AliasSet::NodeInfo::NodeInfo(Compiler* compiler, GenTree* node)
GenTree* retBufArgNode = node->AsCall()->GetLclRetBufArgNode();
if (retBufArgNode != nullptr)
{
// If a copy/reload is inserted by LSRA, retrieve the returnBuffer
if (retBufArgNode->IsCopyOrReload())
{
retBufArgNode = retBufArgNode->AsCopyOrReload()->gtGetOp1();
}

m_flags |= ALIAS_WRITES_LCL_VAR;
m_lclNum = retBufArgNode->AsLclVarCommon()->GetLclNum();
m_lclOffs = retBufArgNode->AsLclVarCommon()->GetLclOffs();
Expand Down

0 comments on commit 9cb8989

Please sign in to comment.