Skip to content

Commit

Permalink
Fix issue exposed by #37280
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolEidt committed Jun 10, 2020
1 parent cf4f3d5 commit 90f1990
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/coreclr/src/jit/liveness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1645,18 +1645,19 @@ bool Compiler::fgComputeLifeUntrackedLocal(VARSET_TP& life,

for (unsigned i = varDsc.lvFieldLclStart; i < varDsc.lvFieldLclStart + varDsc.lvFieldCnt; ++i)
{
LclVarDsc* fieldVarDsc = lvaGetDesc(i);
#if !defined(TARGET_64BIT)
if (!varTypeIsLong(lvaTable[i].lvType) || !lvaTable[i].lvPromoted)
if (!varTypeIsLong(fieldVarDsc->lvType) || !fieldVarDsc->lvPromoted)
#endif // !defined(TARGET_64BIT)
{
noway_assert(lvaTable[i].lvIsStructField);
noway_assert(fieldVarDsc->lvIsStructField);
}
if (lvaTable[i].lvTracked)
if (fieldVarDsc->lvTracked)
{
const unsigned varIndex = lvaTable[i].lvVarIndex;
const unsigned varIndex = fieldVarDsc->lvVarIndex;
noway_assert(varIndex < lvaTrackedCount);
VarSetOps::AddElemD(this, fieldSet, varIndex);
if (isDef && !VarSetOps::IsMember(this, life, varIndex))
if (isDef && lclVarNode->IsMultiRegLclVar() && !VarSetOps::IsMember(this, life, varIndex))
{
// Dead definition.
lclVarNode->AsLclVar()->SetLastUse(i - varDsc.lvFieldLclStart);
Expand Down

0 comments on commit 90f1990

Please sign in to comment.