[llvm] [LoopFusion] Extending SIV to handle separate loops (PR #146383)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 24 11:29:04 PDT 2025
================
@@ -0,0 +1,187 @@
+; 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 {
----------------
CongzheUalberta wrote:
I suggest to rename this function. This function is testing the case where accesses to `A` in the outer dimensions are different, hence in terms of the innermost dimension `k`, there is no dependency on the `k-level`.
https://github.com/llvm/llvm-project/pull/146383
More information about the llvm-commits
mailing list