[AMDGPU] Fix DGEMM hazard for GFX90a
authorVang Thao <Vang.Thao@amd.com>
Wed, 27 Jul 2022 21:17:31 +0000 (14:17 -0700)
committerVang Thao <Vang.Thao@amd.com>
Mon, 1 Aug 2022 18:56:22 +0000 (11:56 -0700)
commit7fc52d7c8b114ea57003a30b9acca92a9797d274
tree64b2bbf1b7cb7ae14fec8d747684524cc39454ba
parent9bab358e39225a657be829962d7f9532b492ca93
[AMDGPU] Fix DGEMM hazard for GFX90a

For VALU write and memory (VM, L/DS, FLAT) instructions, SQ would insert
wait-states to avoid data hazard. However when there is a DGEMM instruction
in-between them, SQ incorrectly disables the wait-states thus the data hazard
needs to be handled with this workaround.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D130677
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
llvm/test/CodeGen/AMDGPU/mai-hazards-gfx90a.mir
llvm/test/CodeGen/AMDGPU/mai-hazards-gfx940.mir