Skip to content

Commit e231b75

Browse files
JIT: Detect inconsistency in small profile weights for finally exits (#114447)
1 parent 9c8f428 commit e231b75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coreclr/jit/importer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12637,7 +12637,6 @@ void Compiler::impFixPredLists()
1263712637

1263812638
BasicBlock* const continuation = predBlock->Next();
1263912639
FlowEdge* const newEdge = fgAddRefPred(continuation, finallyBlock);
12640-
newEdge->setLikelihood(1.0 / predCount);
1264112640

1264212641
if (usingProfileWeights && (finallyWeight != BB_ZERO_WEIGHT))
1264312642
{
@@ -12679,7 +12678,8 @@ void Compiler::impFixPredLists()
1267912678
{
1268012679
BasicBlock* const callFinallyRet = callFinally->Next();
1268112680
callFinallyRet->setBBProfileWeight(callFinallyRet->computeIncomingWeight());
12682-
profileConsistent &= fgProfileWeightsEqual(callFinally->bbWeight, callFinallyRet->bbWeight);
12681+
profileConsistent &=
12682+
fgProfileWeightsConsistentOrSmall(callFinally->bbWeight, callFinallyRet->bbWeight);
1268312683
}
1268412684

1268512685
if (!profileConsistent)

0 commit comments

Comments
 (0)