[llvm-branch-commits] [llvm] [AMDGPU][SIMemoryLegalizer] Lower single-wave workgroup scope to wavefront in absence of LDSDMA (PR #224065)
Sameer Sahasrabuddhe via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 5 01:59:15 PDT 2026
================
@@ -824,9 +831,15 @@ SIAtomicAddrSpace SIMemOpAccess::toSIAtomicAddrSpace(unsigned AS) const {
return SIAtomicAddrSpace::OTHER;
}
+// TODO: Consider moving single-wave workgroup->wavefront scope relaxation to an
----------------
ssahasra wrote:
I can see how "scope demotion" feels like it is losing the user's intent. But the compiler is a part of the implementation, and it should not worry about such things. I don't really see a difference between this and reducing an arithmetic operation to a bitwise operation. The user _intended_ to divide by two, but the implementation replaced it with a shift in the IR under the right conditions. When we demote workgroup scope to wavefront, we are really fusing information about the launch into the IR, and then optimizing that IR.
But I am okay to leave this for later. There is no reason to block this PR.
https://github.com/llvm/llvm-project/pull/224065
More information about the llvm-branch-commits
mailing list