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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 06:23:59 PST 2024


================
@@ -2364,6 +2396,9 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal(
   if (IsVolatile) {
     Changed |= setScope(MI, AMDGPU::CPol::SCOPE_SYS);
 
+    if (Op == SIMemOp::STORE)
+      Changed |= insertWaitsBeforeSystemScopeStore(MI);
----------------
jayfoad wrote:

It is a bit messy that we need this extra call to insertWaitsBeforeSystemScopeStore here, because the call to insertWait below modifies MI so it no longer refers to the store. But I guess it is OK.

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


More information about the llvm-commits mailing list