[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


================
@@ -2381,6 +2416,15 @@ bool SIGfx12CacheControl::enableVolatileAndOrNonTemporal(
   return Changed;
 }
 
+bool SIGfx12CacheControl::expandSystemScopeStore(
+    MachineBasicBlock::iterator &MI) const {
+  MachineOperand *CPol = TII->getNamedOperand(*MI, OpName::cpol);
+  if (!CPol || ((CPol->getImm() & CPol::SCOPE) != CPol::SCOPE_SYS))
+    return false;
----------------
jayfoad wrote:

Returning early no longer makes this code any shorter or clearer.

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


More information about the llvm-commits mailing list