[llvm] [LoopInterchange] Fix test phi-ordering.ll (NFC) (PR #181989)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 19:48:20 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:
I agree that it makes sense to keep the test as long as it checks that an incorrect optimization is not applied.
What I'm asking is to make the intent of this test clear. What is the incorrect optimization you want to detect? Is it inner-only reduction, or something else? There are many loop interchange tests that you can refer to that checks that an incorrect optimization is not applied, e.g., `currentLimitation.ll`, `inner-indvar-depend-on-outer-indvar.ll`, `interchange-no-deps.ll`, etc.
https://github.com/llvm/llvm-project/pull/181989
More information about the llvm-commits
mailing list