[AMDGPU] Fix incorrect hazard mitigation
authorStephen Thomas <Stephen.Thomas@amd.com>
Tue, 4 Jul 2023 10:43:09 +0000 (11:43 +0100)
committerStephen Thomas <Stephen.Thomas@amd.com>
Tue, 4 Jul 2023 13:42:51 +0000 (14:42 +0100)
commit2dfb4b56fe3c233b4f278a6d17b4ec5780007a8f
tree73ef8dc44495d104ece62a9f81d501f56c7a0f9e
parent1e35e93e30c25bf67d3038f3e227dc6be729743d
[AMDGPU] Fix incorrect hazard mitigation

GCNHazardRecognizer::fixVcmpxExecWARHazard() mitigates a specific hazard
by inserting a wait on sa_sdst==0 if such a wait isn't already present.
Unfortunately, the check for an existing wait incorrectly checks for one
that doesn't actually care about sa_sdst itself, but requires that no
other counters are waited for.

Once the check is performed correctly, a lit test needs to be updated,
since it is currently testing for the incorrect behaviour.

Differential Revision: https://reviews.llvm.org/D154438
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
llvm/test/CodeGen/AMDGPU/vcmpx-exec-war-hazard.mir