[llvm] AMDGPU: Stop promoting allocas with addrspacecast users (PR #104051)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 14:13:53 PDT 2024


yxsamliu wrote:

I verified that the PR fixed the issue revealed by https://github.com/llvm/llvm-project/commit/7a68449a82ab1c1ab005caa72c1d986ca5deca36

The attributor pass of the callee happens before the promote-alloca pass of the caller due to SCC order. The callee still sees the pointer to the callee as private pointer so cast it to private. However, the caller promotes the alloca to LDS, disregarding what the callee may do with the pointer. With the PR, the caller no longer does the promotion, so the private addr base in s[0-3] is kept.

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


More information about the llvm-commits mailing list