Skip to content

Commit

Permalink
Fix accessing NULL lhs or rhs when printing VP in trace
Browse files Browse the repository at this point in the history
Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
  • Loading branch information
a7ehuo committed Jun 10, 2021
1 parent 7b68352 commit 7226957
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 7226957

Please sign in to comment.