[PATCH] D156671: [AMDGPU][SIInsertWaitcnts] Initialize the WaitcntBrackets for non-kernel functions
Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 06:00:08 PDT 2023
jmmartinez added a comment.
In D156671#4546409 <https://reviews.llvm.org/D156671#4546409>, @foad wrote:
> Please explain what this is for. Is it a bug fix? Do you have a test that shows the intended effect?
Hello,
The test that best depicts the issue is amd.endpgm.ll <https://reviews.llvm.org/differential/changeset/?ref=4373291>.
In this test there is a `test1` non-kernel function that inmediately does a call to `@llvm.amdgcn.endpgm`. On GFX11, I'd expect a `s_sendmsg` instruction before the `s_endpgm` for that function.
`SIInsertWaitcnt` inserts an `s_sendmsg` before each `s_endpgm` if the `VS_CNT` score is not 0 and if there is any pending scratch store operation; but when `SIInsertWaitcnt` initializes the `WaitcntBrackets` object for any function (entry or not) all the counters are set to 0.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156671/new/
https://reviews.llvm.org/D156671
More information about the llvm-commits
mailing list