[PATCH] D120544: [AMDGPU] Omit unnecessary waitcnt before barriers

Austin Kerbow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 12:48:29 PST 2022


kerbowa marked an inline comment as done.
kerbowa added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/waitcnt-preexisting-vscnt.mir:38
     ; GFX10: GLOBAL_STORE_DWORD $vgpr0_vgpr1, $vgpr2, 0, 0, implicit $exec
-    ; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 0
+    ; GFX10: S_WAITCNT_VSCNT undef $sgpr_null, 1
     ; GFX10: S_BARRIER
----------------
foad wrote:
> Isn't this "waitcnt 1" redundant, since we have just done a "waitcnt 0" and then issued one store? Or am I completely misunderstanding?
You are right the waitcnt is redundant, but this is testing waitcnt which are inserted by the memory legalizer pass that are left "as is". This test will change when we attempt to optimize this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120544/new/

https://reviews.llvm.org/D120544



More information about the llvm-commits mailing list