Skip to content

Commit

Permalink
Merge pull request #6062 from a7ehuo/fix-vp-trace
Browse files Browse the repository at this point in the history
Fix accessing NULL lhs or rhs when printing VP in trace
  • Loading branch information
0xdaryl committed Jun 11, 2021
2 parents 7b68352 + 7226957 commit 4a8c53c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions compiler/optimizer/VPHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9735,10 +9735,16 @@ static TR::Node *constrainIfcmpeqne(OMR::ValuePropagation *vp, TR::Node *node, b

if (vp->trace())
{
traceMsg(vp->comp(), "P2O: Considering a candidate at %p. Object Constraint : ", node);
lhs->print(vp);
traceMsg(vp->comp(), " , Guard constraint : ");
rhs->print(vp);
if (lhs)
{
traceMsg(vp->comp(), "P2O: Considering a candidate at %p. Object Constraint : ", node);
lhs->print(vp);
}
if (rhs)
{
traceMsg(vp->comp(), " , Guard constraint : ");
rhs->print(vp);
}
traceMsg(vp->comp(), "\n");
}

Expand Down

0 comments on commit 4a8c53c

Please sign in to comment.