[llvm] [LoopFusion] Forget loop and block dispositions after latch merge (PR #166233)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 4 10:46:42 PST 2025
================
@@ -0,0 +1,65 @@
+; REQUIRES: asserts
+; RUN: opt -passes=loop-fusion -disable-output -stats < %s 2>&1 | FileCheck -check-prefix=STAT %s
+; STAT: 1 loop-fusion - Loops fused
+
+; C Code
+;
+;; for (int i = 0; i < 100; ++i)
+;; Array[i][i] = -i;
+;; for (int row = 0; row < 100; ++row)
+;; for (int col = 0; col < 100; ++col)
+;; if (col != row)
----------------
CongzheUalberta wrote:
if you get rid of the `if (col!=row)` condition, the two loops should still be legal to fuse. In that case are you able to reproduce the crash? If yes then you can add it as another test.
https://github.com/llvm/llvm-project/pull/166233
More information about the llvm-commits
mailing list