Skip to content

Commit

Permalink
Fold TYP_STRUCT indirect access to promoted locals (#71584)
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion committed Aug 23, 2022
1 parent 96ad4fa commit 2a2ebf9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/coreclr/jit/lclmorph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,17 +993,17 @@ class LocalAddressVisitor final : public GenTreeVisitor<LocalAddressVisitor>
return IndirTransform::None;
}

if (varDsc->lvPromoted)
{
// TODO-ADDR: For now we ignore promoted variables, they require additional
// changes in subsequent phases.
return IndirTransform::None;
}

// As we are only handling non-promoted STRUCT locals right now, the only
// possible transformation for non-STRUCT indirect uses is LCL_FLD.
if (!varTypeIsStruct(indir))
{
if (varDsc->lvPromoted)
{
// TODO-ADDR: support promoted locals here by moving the promotion morphing
// from pre-order to post-order.
return IndirTransform::None;
}

// As we are only handling non-promoted STRUCT locals right now, the only
// possible transformation for non-STRUCT indirect uses is LCL_FLD.
assert(varDsc->TypeGet() == TYP_STRUCT);
return IndirTransform::LclFld;
}
Expand Down

0 comments on commit 2a2ebf9

Please sign in to comment.