[clang] [llvm] [WIP] Expand variadic functions in IR (PR #89007)
Jon Chesterfield via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 16 17:59:02 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list