[llvm] [LoopFusion] Extending SIV to handle separate loops (PR #146383)

Alireza Torabian via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 09:06:33 PDT 2025


================
@@ -0,0 +1,185 @@
+; RUN: opt -S -passes=loop-fusion -da-disable-delinearization-checks < %s | FileCheck %s
+
+; The two inner loops have no dependency and are allowed to be fused as in the
+; outer loops, different levels are accessed to.
+
+; C Code
+;
+;;  for (long int i = 0; i < n; i++) {
+;;    for (long int j = 0; j < n; j++) {
+;;      for (long int k = 0; k < n; k++) {
+;;        A[i][j][k] = i;
+;;      }
+;;      for (long int k = 0; k < n; k++) {
+;;        temp = A[i + 3][j + 2][k + 1];
+
+define void @backward_dep0(i64 %n, ptr %A) nounwind uwtable ssp {
----------------
1997alireza wrote:

Fixed.

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


More information about the llvm-commits mailing list