Skip to content

Commit d6437e9

Browse files
authored
JIT: clear loop iter info after rebuilding loops for opt repeat (#95879)
This info gets computed when finding loops but is not used by the general optimizer (it only cares about loop structure, not iteration details). If we leave it built it can go stale. Fixes #95843.
1 parent 791109e commit d6437e9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/coreclr/jit/compiler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5898,7 +5898,9 @@ void Compiler::RecomputeLoopInfo()
58985898
fgComputeReachability();
58995899
optSetBlockWeights();
59005900
// Rebuild the loop tree annotations themselves
5901+
// But don't leave the iter info lying around.
59015902
optFindLoops();
5903+
optClearLoopIterInfo();
59025904

59035905
m_dfsTree = fgComputeDfs();
59045906
optFindNewLoops();

0 commit comments

Comments
 (0)