================
@@ -154,11 +154,20 @@ llvm::Value 
*CodeGen::emitRoundPointerUpToAlignment(CodeGenFunction &CGF,
                                                     llvm::Value *Ptr,
                                                     CharUnits Align) {
   // OverflowArgArea = (OverflowArgArea + Align - 1) & -Align;
+  Ptr = CGF.Builder.CreateAddrSpaceCast(Ptr, CGF.AllocaInt8PtrTy,
+                                        Ptr->getName() + ".addrcast");
----------------
JonChesterfield wrote:

This might not be the right place for it - amdgpu passes a pointer in 
addrspace(5) which then hits an assert with the current implementation. The 
va_* intrinsics specify an address space now which should permit a cleaner 
answer, though I'm seeing p0 used from clang for targets where it shouldn't be. 
That's on the WIP part.

https://github.com/llvm/llvm-project/pull/89007
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to