[llvm] [AMDGPU] Add hazard workarounds to insertIndirectBranch (PR #109127)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 03:36:07 PDT 2024
================
@@ -42,6 +44,71 @@ define amdgpu_kernel void @uniform_conditional_max_short_forward_branch(ptr addr
; GCN-NEXT: buffer_store_dword v0, off, s[4:7], 0
; GCN-NEXT: s_waitcnt vmcnt(0)
; GCN-NEXT: s_endpgm
+;
+; GFX11-LABEL: uniform_conditional_max_short_forward_branch:
+; GFX11: ; %bb.0: ; %bb
+; GFX11-NEXT: s_load_b32 s0, s[2:3], 0x2c
+; GFX11-NEXT: s_waitcnt lgkmcnt(0)
+; GFX11-NEXT: s_cmp_eq_u32 s0, 0
+; GFX11-NEXT: s_cbranch_scc0 .LBB0_1
+; GFX11-NEXT: ; %bb.3: ; %bb
+; GFX11-NEXT: s_getpc_b64 s[4:5]
+; GFX11-NEXT: .Lpost_getpc0:
+; GFX11-NEXT: s_waitcnt_depctr 0xfffe
+; GFX11-NEXT: s_add_u32 s4, s4, (.LBB0_2-.Lpost_getpc0)&4294967295
+; GFX11-NEXT: s_waitcnt_depctr 0xfffe
----------------
arsenm wrote:
I don't know this hazard. The entire branch sequence is pure SALU, so is this about instructions after the branch? Can you consider the branch target?
https://github.com/llvm/llvm-project/pull/109127
More information about the llvm-commits
mailing list