Skip to content

Commit

Permalink
Revert "Set DNER for all local fields (#77341)"
Browse files Browse the repository at this point in the history
This reverts commit 4e85471.
  • Loading branch information
kunalspathak committed Oct 30, 2022
1 parent 7f444a7 commit 5cfff11
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16166,6 +16166,10 @@ void Compiler::fgMorphLocalField(GenTree* tree, GenTree* parent)
}
else
{
// There is no existing field that has all the parts that we need
// So we must ensure that the struct lives in memory.
lvaSetVarDoNotEnregister(lclNum DEBUGARG(DoNotEnregisterReason::LocalField));

#ifdef DEBUG
// We can't convert this guy to a float because he really does have his
// address taken..
Expand All @@ -16174,12 +16178,6 @@ void Compiler::fgMorphLocalField(GenTree* tree, GenTree* parent)
}
}
}

// If we haven't replaced the field, make sure to set DNER on the local.
if (tree->OperIs(GT_LCL_FLD))
{
lvaSetVarDoNotEnregister(lclNum DEBUGARG(DoNotEnregisterReason::LocalField));
}
}

//------------------------------------------------------------------------
Expand Down

0 comments on commit 5cfff11

Please sign in to comment.