[llvm] [AMDGPU] Add DS loop wait optimization infrastructure (1/4) (PR #171942)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 02:37:01 PST 2025
================
@@ -0,0 +1,91 @@
+# REQUIRES: asserts
+# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 -run-pass=si-insert-waitcnts -amdgpu-waitcnt-loop-ds-opt=true -debug-only=si-insert-waitcnts -o /dev/null %s 2>&1 | FileCheck %s
+
+# Test for DS loop wait optimization eligibility check.
+# Verifies that the pass correctly identifies single-block loops with
+# sufficient DS loads (>=16) and WMMA instructions (>=8) as eligible
+# for optimization.
+#
+# CHECK: Loop DS Wait Opt: Loop at bb.1 - 16 DS loads, 8 WMMA/MFMA, {{[0-9]+}} total insts, eligible
+
+--- |
+ define amdgpu_kernel void @ds_loop_eligible() { ret void }
+...
+
----------------
arsenm wrote:
```suggestion
```
https://github.com/llvm/llvm-project/pull/171942
More information about the llvm-commits
mailing list