[llvm] [AMDGPU] Gate runtime unroll of LDS loops instead of overriding it (PR #222853)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 04:03:39 PDT 2026
================
@@ -0,0 +1,34 @@
+; RUN: opt -mtriple=amdgpu9.50-amd-amdhsa -passes=loop-unroll -S %s \
+; RUN: | FileCheck %s --check-prefixes=CHECK,DEFAULT
+; RUN: opt -mtriple=amdgpu9.50-amd-amdhsa -passes=loop-unroll \
+; RUN: -amdgpu-unroll-runtime-local=false -S %s | FileCheck %s --check-prefixes=CHECK,NOLOCAL
+
+; A convergent MFMA K-loop reading LDS (addrspace(3)) with a runtime trip
+; count, modeled on a triton bf16 GEMM inner loop. By default it is runtime
+; unrolled; with -amdgpu-unroll-runtime-local off the LDS loop is not.
+
+ at global_smem = external addrspace(3) global [0 x i8], align 16
+
+; CHECK-LABEL: @gemm_k_loop(
+; DEFAULT: loop.epil:
+; NOLOCAL-NOT: loop.epil
----------------
arsenm wrote:
Same
https://github.com/llvm/llvm-project/pull/222853
More information about the llvm-commits
mailing list