Skip to content

Commit

Permalink
fix lvaStressLclFldCB (dotnet#14676)
Browse files Browse the repository at this point in the history
Don't create trees with the same ID.
  • Loading branch information
Sergey Andreenko authored Oct 24, 2017
1 parent f324495 commit d780f9a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/jit/lclvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7331,11 +7331,10 @@ Compiler::fgWalkResult Compiler::lvaStressLclFldCB(GenTreePtr* pTree, fgWalkData
/* Change addr(lclVar) to addr(lclVar)+padding */

noway_assert(oper == GT_ADDR);
GenTreePtr newAddr = new (pComp, GT_NONE) GenTreeOp(*tree->AsOp());
GenTreePtr paddingTree = pComp->gtNewIconNode(padding);
GenTreePtr newAddr = pComp->gtNewOperNode(GT_ADD, tree->gtType, tree, paddingTree);

tree->ChangeOper(GT_ADD);
tree->gtOp.gtOp1 = newAddr;
tree->gtOp.gtOp2 = pComp->gtNewIconNode(padding);
*pTree = newAddr;

lcl->gtType = TYP_BLK;
}
Expand Down

0 comments on commit d780f9a

Please sign in to comment.