[llvm] [AMDGPU] introduce S_WAITCNT_LDS_DIRECT in the memory legalizer (PR #150887)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 28 04:06:02 PDT 2025
================
@@ -1170,6 +1170,16 @@ bool SIGfx6CacheControl::insertWait(MachineBasicBlock::iterator &MI,
Changed = true;
}
+ // On architectures that support direct loads to LDS, emit an unknown waitcnt
+ // at workgroup-scoped release operations that specify the LDS address space.
+ // SIInsertWaitcnts will later replace this with a vmcnt().
+ if (ST.hasVMemToLDSLoad() && isReleaseOrStronger(Order) &&
+ Scope == SIAtomicScope::WORKGROUP &&
+ any((SIAtomicAddrSpace)AddrSpace & SIAtomicAddrSpace::LDS)) {
----------------
ssahasra wrote:
Meh. Fixed it. Although I would rather have the rest of the file be consistent with this (highly recommended and correct) use of `any()`. In fact `BitmaskEnum` there should be able to provide a much clearer way to check for individual bits.
https://github.com/llvm/llvm-project/pull/150887
More information about the llvm-commits
mailing list