Reset loop numbers in RecomputeLoopInfo (#56981)
authorSingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Fri, 6 Aug 2021 18:22:54 +0000 (21:22 +0300)
committerGitHub <noreply@github.com>
Fri, 6 Aug 2021 18:22:54 +0000 (11:22 -0700)
They become stale after optimizations.

src/coreclr/jit/compiler.cpp

index 20aafd4..2c35262 100644 (file)
@@ -5388,6 +5388,7 @@ void Compiler::RecomputeLoopInfo()
     for (BasicBlock* const block : Blocks())
     {
         block->bbFlags &= ~BBF_LOOP_FLAGS;
+        block->bbNatLoopNum = BasicBlock::NOT_IN_LOOP;
     }
     fgComputeReachability();
     // Rebuild the loop tree annotations themselves