Skip to content

Commit

Permalink
Merge pull request #16392 from rmnattas/p-missingLabel-fix
Browse files Browse the repository at this point in the history
Check sequence boundary before generating next sequence transition
  • Loading branch information
ymanton committed Dec 4, 2022
2 parents d1e10d8 + 0a09957 commit e58fc3a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions runtime/compiler/p/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4090,15 +4090,14 @@ TR::Register *J9::Power::TreeEvaluator::VMinstanceOfEvaluator(TR::Node *node, TR
break;
}

genInstanceOfTransitionToNextSequence(node, iter, nextSequenceLabel, doneLabel, cr0Reg, resultReg, initialResult, oppositeResultLabel, profiledClassIsInstanceOf, cg);

--numSequencesRemaining;
++iter;

if (*iter != HelperCall)
if (--numSequencesRemaining > 0)
{
generateLabelInstruction(cg, TR::InstOpCode::label, node, nextSequenceLabel);
nextSequenceLabel = generateLabelSymbol(cg);
genInstanceOfTransitionToNextSequence(node, iter, nextSequenceLabel, doneLabel, cr0Reg, resultReg, initialResult, oppositeResultLabel, profiledClassIsInstanceOf, cg);
if (*++iter != HelperCall)
{
generateLabelInstruction(cg, TR::InstOpCode::label, node, nextSequenceLabel);
nextSequenceLabel = generateLabelSymbol(cg);
}
}
}

Expand Down

0 comments on commit e58fc3a

Please sign in to comment.