[llvm] [AMDGPU] Avoid unneeded waitcounts before spill stores (PR #108303)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 02:02:21 PDT 2024


================
@@ -901,7 +901,7 @@ void WaitcntBrackets::updateByEvent(const SIInstrInfo *TII,
     }
   } else /* LGKM_CNT || EXP_CNT || VS_CNT || NUM_INST_CNTS */ {
     // Match the score to the destination registers.
-    for (unsigned I = 0, E = Inst.getNumOperands(); I != E; ++I) {
+    for (unsigned I = 0, E = Inst.getNumExplicitOperands(); I != E; ++I) {
----------------
rampitec wrote:

I.e., in reality we can load and store a vgpr, agpr and an ordinary sgpr, but no special registers. The case may be if an s## is used as an alias to a special sgpr, but the compiler does not do it. And if we cannot load or store it then there is no need to wait for such a load or store. This is my current understanding at least.

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


More information about the llvm-commits mailing list