[llvm] [AMDGPU] Remove scope check in SIInsertWaitcnts::generateWaitcntInstBefore (PR #157821)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 02:57:29 PDT 2025


================
@@ -1943,12 +1943,10 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(MachineInstr &MI,
         // LOAD_CNT is only relevant to vgpr or LDS.
         unsigned RegNo = FIRST_LDS_VGPR;
         // Only objects with alias scope info were added to LDSDMAScopes array.
-        // In the absense of the scope info we will not be able to disambiguate
-        // aliasing here. There is no need to try searching for a corresponding
-        // store slot. This is conservatively correct because in that case we
-        // will produce a wait using the first (general) LDS DMA wait slot which
-        // will wait on all of them anyway.
-        if (Ptr && Memop->getAAInfo() && Memop->getAAInfo().Scope) {
+        // AliasAnalysis query can determine aliasing even if Memop's Scope is
+        // missing. ScopedNoAlias allows for alias query on MemLoc without a
+        // scope.
----------------
arsenm wrote:

Comment doesn't make sense without the context of the previous comment, so just drop the whole thing. I don't understand the rationale of the original check, I'd just fully remove it 

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


More information about the llvm-commits mailing list