Skip to content

Commit

Permalink
Guard isNodeCreatedByPRE() with canChkNodeCreatedByPRE()
Browse files Browse the repository at this point in the history
Fix assertion failure in isNodeCreatedByPRE() by checking its
condition first and only calling isNodeCreatedByPRE() if the
condition passes

Signed-off-by: Dylan Tuttle <jdylantuttle@gmail.com>
  • Loading branch information
dylanjtuttle committed Jun 6, 2023
1 parent 86a16cc commit 46ae837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/optimizer/LoopVersioner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3444,7 +3444,7 @@ void TR_LoopVersioner::updateDefinitionsAndCollectProfiledExprs(TR::Node *parent
if ((valueInfo->getTopProbability() > MIN_PROFILED_FREQUENCY) &&
(valueInfo->getTotalFrequency() > 0) &&
!_containsCall &&
!node->getByteCodeInfo().doNotProfile() && !node->isNodeCreatedByPRE() &&
!node->getByteCodeInfo().doNotProfile() && node->canChkNodeCreatedByPRE() && !node->isNodeCreatedByPRE() &&
// Only collect nodes from unspecialized blocks to avoid specializing the same nodes twice
!block->isSpecialized())
{
Expand Down

0 comments on commit 46ae837

Please sign in to comment.