[llvm] [AMDGPU] Optimize LDS DMA soft waitcnt (PR #138802)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Thu May 8 01:43:52 PDT 2025


================
@@ -1608,6 +1608,7 @@ let OtherPredicates = [HasImageInsts] in {
   def S_WAIT_DSCNT_soft : SOPP_Pseudo <"s_soft_wait_dscnt", (ins s16imm:$simm16), "$simm16">;
   def S_WAIT_KMCNT_soft : SOPP_Pseudo <"s_soft_wait_kmcnt", (ins s16imm:$simm16), "$simm16">;
 }
+def S_WAITCNT_VMCNT_LDS_DMA_soft : SOPP_Pseudo <"s_soft_waitcnt" , (ins SWaitCnt:$simm16), "$simm16">;
----------------
Pierre-vh wrote:

I would like to see the follow-up patch in which SIMemoryLegalizer emits those before this lands, can you create a stacked PR with the MemoryLegalizer changes @kerbowa ?
I don't understand why we need these now, and why it's needed for correctness

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


More information about the llvm-commits mailing list