[llvm] [AMDGPU] Do not treat LDSDMA as VALU in several passes (PR #212866)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 23:52:59 PDT 2026


================
@@ -0,0 +1,37 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6
+# LDSDMA must not be treated as VALU by amdgpu-wait-sgpr-hazards. A VALU writes
+# an SGPR that the LDSDMA then reads (its saddr). If the LDSDMA counted as a VALU
+# reader, the pass would insert an S_WAITCNT_DEPCTR .VaSdst_0 before it; it must
+# not. This hazard pass only performs a full scan on gfx12 (not gfx11/gfx1250),
+# so the test targets gfx1200 and runs the pass on its own.
+# RUN: llc -mtriple=amdgpu12.00 -run-pass amdgpu-wait-sgpr-hazards -o - %s | FileCheck %s
----------------
arsenm wrote:

```suggestion
# RUN: llc -mtriple=amdgpu12.00 -run-pass=amdgpu-wait-sgpr-hazards -o - %s | FileCheck %s
```

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


More information about the llvm-commits mailing list