[llvm] [LoopInterchange] Motivating example for interchange. NFC. (PR #171631)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 07:27:50 PST 2025
================
@@ -0,0 +1,155 @@
+; RUN: opt < %s -passes=loop-interchange -cache-line-size=64 -pass-remarks='loop-interchange' -pass-remarks-missed='loop-interchange' -pass-remarks-output=%t -disable-output -S
+; RUN: FileCheck --input-file=%t %s
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
+
+; This is a reduced test case for the example in "large-nested-6d.ll". For a
+; full description of the purpose this test and its complexities, see that file.
+;
+; This reproducer contains the perfectly nested sub part of that bigger loop
+; nest:
+;
+; for i=1 to NX
+; for j=1 to NY
+; for IL=1 to NX
+; load GlobC(i,IL,L)
+; load GlobG(i,IL,L)
+; load GlobE(i,IL,L)
+; load GlobI(i,IL,L)
+; for JL=1 to NY
+; load GlobD(j,JL,M)
+; load GlobH(j,JL,M)
+; load GlobF(j,JL,M)
+; load GlobJ(j,JL,M)
+; store GlobL(NY*i+j,NY*IL+JL)
+; End
+; End
+; End
+; End
+;
+; This reproducer is useful to focus on only on the 2nd challenge: the data
+; dependence analysis problem, and not worry about the rest of loop nest
+; structure.
----------------
sebpop wrote:
Thanks for reducing the testcase even further and focusing on only one aspect of the interchange at a time.
https://github.com/llvm/llvm-project/pull/171631
More information about the llvm-commits
mailing list