[PATCH] D140537: AMDGPU/SIInsertWait: Skip dummy tied source

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 16:37:59 PST 2023


ruiling added a comment.

In D140537#4035672 <https://reviews.llvm.org/D140537#4035672>, @foad wrote:

> I like this but it would be nice to have tests showing the effect on DS, FLAT and SCRATCH instructions.

I have pointed out some tests that will hit the code path added in this patch, but for DS and FLAT instructions, there will be no change in generated assembly as there is still a Write-After-Write dependency there.



================
Comment at: llvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll:25
 ; FLATSCR-NEXT:    s_mov_b32 s0, 0
-; FLATSCR-NEXT:    s_waitcnt vmcnt(0)
 ; FLATSCR-NEXT:    scratch_load_short_d16_hi v0, off, s0
 ; FLATSCR-NEXT:    s_waitcnt vmcnt(0)
----------------
This shows the effect on scratch_load_d16.


================
Comment at: llvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll:204
 ; GFX10-NEXT:    s_waitcnt lgkmcnt(0)
 ; GFX10-NEXT:    ds_read_u16_d16_hi v0, v1
 ; GFX10-NEXT:    s_waitcnt lgkmcnt(0)
----------------
This is the test for ds_read_xxx_d16, but the patch won't change the generated code because there is always a WAW dependency.


================
Comment at: llvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll:364
 ; GCN-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)
 ; GCN-NEXT:    flat_load_short_d16_hi v0, v[1:2]
 ; GCN-NEXT:    s_waitcnt vmcnt(0) lgkmcnt(0)
----------------
This will test for the flat_load_xxx_d16, but like ds_load, there is no change in the generated code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140537



More information about the llvm-commits mailing list