[llvm] AMDGPU/GFX12: Insert waitcnts before stores with scope_sys (PR #82996)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 05:59:18 PST 2024


================
@@ -2467,6 +2501,10 @@ bool SIMemoryLegalizer::expandStore(const SIMemOpInfo &MOI,
   Changed |= CC->enableVolatileAndOrNonTemporal(
       MI, MOI.getInstrAddrSpace(), SIMemOp::STORE, MOI.isVolatile(),
       MOI.isNonTemporal());
+
+  // GFX12 specific, scope(desired coherence domain in cache hierarchy) is
+  // instruction field, do not confuse it with atomic scope.
+  Changed |= CC->expandSystemScopeStore(MI);
----------------
Pierre-vh wrote:

I don't see why it wouldn't be needed on a store release? store release already waits, but it doesn't (explicitly) wait for all the counters we need to wait on for `expandSystemScopeStore`



https://github.com/llvm/llvm-project/pull/82996


More information about the llvm-commits mailing list