aco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 25 Aug 2022 19:04:01 +0000 (20:04 +0100)
committerMarge Bot <emma+marge@anholt.net>
Fri, 30 Sep 2022 11:44:38 +0000 (11:44 +0000)
commit2bd16256a6a8f830dc43aa7224879d11edb9583a
tree34664005a4923eb1324b37d235784bbae4f3eca1
parentbfb12a3b6a274a798145bb05b7a20cb29cdbe40f
aco: fix VMEMtoScalarWriteHazard s_waitcnt mitigation

It doesn't make sense for a "s_waitcnt vmcnt(0)" to affect a store or DS
instruction.

LLVM checks for "s_waitcnt vmcnt(0) lgkmcnt(0) expcnt(0)" but ignores
s_waitcnt_vscnt (which I assume is a bug).

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: bcf94bb933e ("aco: properly recognize that s_waitcnt mitigates VMEMtoScalarWriteHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
src/amd/compiler/README-ISA.md
src/amd/compiler/aco_insert_NOPs.cpp