[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #68932)
Jay Foad via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 21 05:17:22 PST 2023
================
@@ -1708,6 +1710,13 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction &MF,
}
++Iter;
+ if (ST->isPreciseMemoryEnabled() && Inst.mayLoadOrStore()) {
+ auto builder =
+ BuildMI(Block, Iter, DebugLoc(), TII->get(AMDGPU::S_WAITCNT))
+ .addImm(0);
----------------
jayfoad wrote:
On GFX10+ VMEM stores should have S_WAITCNT_VSCNT 0 as well as (or instead of) this.
https://github.com/llvm/llvm-project/pull/68932
More information about the cfe-commits
mailing list