[llvm] [AMDGPU] Restrict promote alloca on pointers across address spaces (PR #119762)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 13:25:10 PST 2024
================
@@ -796,6 +796,16 @@ bool AMDGPUPromoteAllocaImpl::tryPromoteAllocaToVector(AllocaInst &Alloca) {
if (!IsSimple)
return RejectUser(Inst, "not a simple load or store");
+ // If the access type is a pointer, reject the address spaces with
+ // different pointer sizes.
+ // store <2 x ptr> %arg, ptr addrspace(5) %alloca - Reject.
----------------
shiltian wrote:
I don't think this should be rejected. This is completely a valid code.
https://github.com/llvm/llvm-project/pull/119762
More information about the llvm-commits
mailing list