[AMDGPU] Remove unnecessary s_waitcnt between VMEM loads
authorJay Foad <jay.foad@amd.com>
Thu, 30 Apr 2020 09:51:09 +0000 (10:51 +0100)
committerJay Foad <jay.foad@amd.com>
Fri, 1 May 2020 09:10:23 +0000 (10:10 +0100)
commit5f7ea85e789d5b5f3f463e538a28c040e373620b
treef508b047fc95dca8d3711ef7799ac7e4663959b3
parented7479b63553f0cb00d9e954fa3fadd4a1e389e1
[AMDGPU] Remove unnecessary s_waitcnt between VMEM loads

VMEM loads of the same type (sampler vs no sampler) are guaranteed to
write their result registers in order, so there is no need for an
s_waitcnt even if they write to overlapping vgprs.

Differential Revision: https://reviews.llvm.org/D79176
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
llvm/test/CodeGen/AMDGPU/mubuf-legalize-operands.ll
llvm/test/CodeGen/AMDGPU/shl.ll
llvm/test/CodeGen/AMDGPU/wait.ll
llvm/test/CodeGen/AMDGPU/waitcnt-vmem-waw.mir [new file with mode: 0644]