The "singlethread" fences that were used in this test were not enforcing
adding any waitcnt. Use "workgroup" fences instead in preparation for
the addition of memory model/waitcnt optimizations.
NFC.
Paths
| Differential D120587
[AMDGPU] Use workgroup fences in test waitcnt-vscnt.ll AbandonedPublic Authored by kerbowa on Feb 25 2022, 12:36 PM.
Details
Diff Detail
Event TimelineHerald added subscribers: t-tye, tpr, dstuttard and 3 others. · View Herald TranscriptFeb 25 2022, 12:36 PM kerbowa added a child revision: D120544: [AMDGPU] Omit unnecessary waitcnt before barriers.Feb 25 2022, 12:46 PM Comment Actions 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)? Comment Actions
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. Comment Actions
The easiest way is to use -mattr I guess. I recall this test was useful to verify that only a needed set of waits is produced.
Revision Contents
Diff 411500 llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
|