[llvm] [AMDGPU][SIInsertWaitcnts] Set initial state for VS_CNT in non-kernel functions (PR #75436)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 04:59:27 PST 2023
================
@@ -55,6 +55,7 @@ define void @back_off_barrier_no_fence(ptr %in, ptr %out) #0 {
; GFX11-BACKOFF-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX11-BACKOFF-NEXT: flat_load_b32 v0, v[0:1]
; GFX11-BACKOFF-NEXT: s_waitcnt vmcnt(0) lgkmcnt(0)
+; GFX11-BACKOFF-NEXT: s_waitcnt_vscnt null, 0x0
----------------
jayfoad wrote:
I guess this is a bug fix. @kerbowa would you agree? The code in `generateWaitcntInstBefore` certainly looks like it's trying to wait for _all_ counters to be zero. So the bug was that previously, this pass wrongly assumed that vs_cnt would be zero on entry to a non-kernel function,
https://github.com/llvm/llvm-project/pull/75436
More information about the llvm-commits
mailing list