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

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 09:29:36 PST 2025


================
@@ -0,0 +1,62 @@
+; 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)
+;;              Array[row][col] = row + col;
+
----------------
CongzheUalberta wrote:

I would suggest you to add the reason why this test case is added, i.e., something like `Loop fusion should not crash because of ...`.

Also, you can rename this test case to "PR164082".

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


More information about the llvm-commits mailing list