Skip to content

Commit

Permalink
Adjust weights of blocks with profile inside loops in non-profiled me…
Browse files Browse the repository at this point in the history
…thods (#71659)
  • Loading branch information
EgorBo committed Jul 6, 2022
1 parent c785f36 commit f29ae44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void Compiler::optScaleLoopBlocks(BasicBlock* begBlk, BasicBlock* endBlk)
for (BasicBlock* const curBlk : BasicBlockRangeList(begBlk, endBlk))
{
// Don't change the block weight if it came from profile data.
if (curBlk->hasProfileWeight())
if (curBlk->hasProfileWeight() && fgHaveProfileData())
{
reportBlockWeight(curBlk, "; unchanged: has profile weight");
continue;
Expand Down

0 comments on commit f29ae44

Please sign in to comment.