[llvm] [AMDGPU] Restrict promote alloca on pointers across address spaces (PR #119762)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 07:57:12 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.
----------------
arsenm wrote:

> %alloca is defined by addrcast, we can impart a reasonable conversion.

There are no conversions, and alloca is just the direct stack object reference. 

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


More information about the llvm-commits mailing list