[llvm] [LoopFusion] Cleanup control flow before Fusion (PR #226289)

Ehsan Amiri via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 11:04:54 PDT 2026


================
@@ -503,6 +586,11 @@ struct LoopFuser {
                       << "\n");
     bool Changed = false;
 
+    // Canonicalize the CFG around loop guards before looking for candidates,
+    // so that guarded loops are recognized as such and as adjacent.
+    for (Loop *L : LI.getLoopsInPreorder())
----------------
amehsan wrote:

Done

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


More information about the llvm-commits mailing list