Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5074,11 +5074,12 @@ bool Compiler::optInvertWhileLoop(BasicBlock* block)
//
if (allProfileWeightsAreValid)
{
// Update the weight for bTest
// Update the weight for bTest. Normally, this reduces the weight of the bTest, except in odd
// cases of stress modes with inconsistent weights.
//
JITDUMP("Reducing profile weight of " FMT_BB " from " FMT_WT " to " FMT_WT "\n", bTest->bbNum, weightTest,
weightNext);
bTest->bbWeight = weightNext;
bTest->inheritWeight(block->bbNext);

// Determine the new edge weights.
//
Expand Down