Skip to content

Commit

Permalink
Do not avoid LCL_FLDs for indirectly accessed locals (dotnet#77980)
Browse files Browse the repository at this point in the history
They will have to be DNERed anyway.
  • Loading branch information
SingleAccretion authored Dec 15, 2022
1 parent dad39c7 commit ca873ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/coreclr/jit/morphblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,10 @@ void MorphCopyBlockHelper::MorphStructCases()
//
bool requiresCopyBlock = false;

// If either src or dest is a reg-sized non-field-addressed struct, keep the copyBlock.
if ((m_dstVarDsc != nullptr && m_dstVarDsc->lvRegStruct) || (m_srcVarDsc != nullptr && m_srcVarDsc->lvRegStruct))
// If either src or dest is a reg-sized non-field-addressed struct, keep the copyBlock;
// this will avoid having to DNER the enregisterable local when creating LCL_FLD nodes.
if ((m_dst->OperIs(GT_LCL_VAR) && m_dstVarDsc->lvRegStruct) ||
(m_src->OperIs(GT_LCL_VAR) && m_srcVarDsc->lvRegStruct))
{
requiresCopyBlock = true;
}
Expand Down

0 comments on commit ca873ea

Please sign in to comment.