[PATCH] D120587: [AMDGPU] Use workgroup fences in test waitcnt-vscnt.ll

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


kerbowa added a comment.

In D120587#3346419 <https://reviews.llvm.org/D120587#3346419>, @rampitec wrote:

> It does not seem to do what it did before. For example it used to test that only a vmcnt is produced or only a vscnt. Maybe duplicate these tests instead to create a _workgroup versions (like existing barrier_vmcnt_vscnt_flat_workgroup)?

Yes, it doesn't test this anymore as it is until we optimize these fences which we will do soon. The problem is that the test was relying on the unique feature of barriers that will only insert the wait before if there are outstanding events of that type. With the child patch for "BackOffBarriers" feature, this doesn't work anymore. The "singlethread" fences should be removed regardless because they don't enforce any synchronization. So I don't think duplicating makes sense.

One option is to keep the tests as they were but to add `-mattr=-back-off-barrier` to the test.

Otherwise, we need another way to test that a waitcnt_vscnt is inserted only if there are outstanding events. We cannot use fences for this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120587



More information about the llvm-commits mailing list