[llvm] [LoopInterchange] Ignore the cost-model, force interchange if legal (PR #148858)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 06:26:39 PDT 2025


================
@@ -0,0 +1,50 @@
+; RUN: opt < %s -passes=loop-interchange -pass-remarks-output=%t -disable-output -loop-interchange-profitabilities=ignore -S
+; RUN: FileCheck --input-file=%t %s
+
+; There should be no reason to interchange this, unless it is forced.
+;
+;     for (int i = 0; i<N; i++)
+;       for (int j = 0; j<N; j++)
+;         A[i][j] = 42;
+;
+; CHECK:      --- !Analysis
+; CHECK-NEXT: Pass:            loop-interchange
+; CHECK-NEXT: Name:            Dependence
+; CHECK-NEXT: Function:        f
+; CHECK-NEXT: Args:
+; CHECK-NEXT:   - String:          Computed dependence info, invoking the transform.
+; CHECK-NEXT: ...
----------------
kasuga-fj wrote:

I think we don't need to check unrelated remarks.

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


More information about the llvm-commits mailing list