================
@@ -2538,8 +2538,9 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl
&gd, unsigned builtinID,
mlir::Value addr = cir::FrameAddrOp::create(
builder, loc, allocaInt8PtrTy,
builder.getConstAPInt(loc, builder.getUInt32Ty(), level));
- return RValue::get(
- builder.createCast(loc, cir::CastKind::bitcast, addr, voidPtrTy));
+ addr = builder.createBitcast(
+ addr, builder.getVoidPtrTy(getCIRAllocaAddressSpace()));
+ return RValue::get(performAddrSpaceCast(addr, convertType(e->getType())));
----------------
steffenlarsen wrote:
Looks right to me. Should we maybe do a wider sweep to see if there are other
builtins that use `AllocaInt8PtrTy` in OGCG?
https://github.com/llvm/llvm-project/pull/233724
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits