[llvm] [LoopFusion] Forget loop and block dispositions after latch merge (PR #166233)

Alireza Torabian via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 12:41:47 PST 2025


================
@@ -1796,14 +1796,15 @@ struct LoopFuser {
     // mergeLatch may remove the only block in FC1.
     SE.forgetLoop(FC1.L);
     SE.forgetLoop(FC0.L);
-    // Forget block dispositions as well, so that there are no dangling
-    // pointers to erased/free'ed blocks.
-    SE.forgetBlockAndLoopDispositions();
 
     // Move instructions from FC0.Latch to FC1.Latch.
     // Note: mergeLatch requires an updated DT.
     mergeLatch(FC0, FC1);
 
+    // Forget block dispositions as well, so that there are no dangling
+    // pointers to erased/free'ed blocks.
----------------
1997alireza wrote:

Applied.

https://github.com/llvm/llvm-project/pull/166233


More information about the llvm-commits mailing list