Skip to content

Commit

Permalink
Simplify impAssignStruct
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion committed Dec 9, 2022
1 parent 8a6f6bf commit a00a3f7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,18 +934,11 @@ GenTree* Compiler::impAssignStruct(GenTree* dest,
assert(varTypeIsStruct(dest) && (dest->OperIsLocal() || dest->OperIsIndir() || dest->OperIs(GT_FIELD)));

assert(dest->TypeGet() == src->TypeGet());
// TODO-1stClassStructs: delete the "!IND" condition once "IND<struct>" nodes are no more.
if (dest->TypeIs(TYP_STRUCT) && !src->gtEffectiveVal()->OperIs(GT_IND))
if (dest->TypeIs(TYP_STRUCT))
{
assert(ClassLayout::AreCompatible(dest->GetLayout(this), src->GetLayout(this)));
}

if (dest->OperIs(GT_FIELD) && dest->TypeIs(TYP_STRUCT))
{
// TODO-ADDR: delete this once FIELD<struct> nodes are transformed into OBJs (not INDs).
dest = gtNewObjNode(dest->GetLayout(this), gtNewOperNode(GT_ADDR, TYP_BYREF, dest));
}

DebugInfo usedDI = di;
if (!usedDI.IsValid())
{
Expand Down

0 comments on commit a00a3f7

Please sign in to comment.