Skip to content

Commit

Permalink
JIT: fix def tree for CSE locals going into SSA (dotnet/coreclr#27301)
Browse files Browse the repository at this point in the history
When putting a new single-def CSE local into SSA, we need to set the def tree
to the LHS of the GT_ASG, not the GT_ASG.

Commit migrated from dotnet/coreclr@90e59be
  • Loading branch information
AndyAyersMS authored Oct 21, 2019
1 parent 3dbb655 commit cb6abee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/src/jit/optcse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,7 @@ class CSE_Heuristic

ssaVarDsc->m_vnPair = val->gtVNPair;
ssaVarDsc->m_defLoc.m_blk = blk;
ssaVarDsc->m_defLoc.m_tree = asg;
ssaVarDsc->m_defLoc.m_tree = asg->AsOp()->gtOp1;
}

/* Create a reference to the CSE temp */
Expand Down

0 comments on commit cb6abee

Please sign in to comment.