[llvm] [LoopInterchange] Fix test phi-ordering.ll (NFC) (PR #181989)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 19 14:06:08 PST 2026


================
@@ -1,55 +1,57 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
 ; RUN: opt < %s -passes=loop-interchange -cache-line-size=64 -verify-dom-info -verify-loop-info -verify-scev -verify-loop-lcssa -loop-interchange-threshold=0 -S 2>&1 | FileCheck %s
-;; Checks the order of the inner phi nodes does not cause havoc.
-;; The inner loop has a reduction into c. The IV is not the first phi.
 
 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
 
-
+; Checks the order of the inner phi nodes does not cause havoc.
+; The inner loop has a reduction into C. The IV is not the first phi.
+;
+; for (i = 0; i < 90; i++)
+;   for (j = 0; j < 90; j++) {
+;     red = C[i][j];
+;     for (k = 1; k < 90; k++) {
+;       red += A[i][k];
+;     }
+;     C[i][j] = red;
+;   }
+;
+; NOTE: Currently inner-only reductions are not supported by loop-interchange,
+; so no transformation will be performed.
----------------
CongzheUalberta wrote:

Having a test case where "no transformation will be performed" does not make lots of sense.

If the functionality does not hold anymore, I think the test case should be removed. 

Even if you want to keep it for whatever purpose (e.g., to restore inner-only reduction in the future), the test should have appropriate `CHECK` lines to check that with an "XFAIL: *", in order to clearly indicate the intent of the test.

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


More information about the llvm-commits mailing list