Anastasia added inline comments.
================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12412 // Cast the pointer to right type. - Value *Ptr = CGF.Builder.CreateBitCast(Ops[0], - llvm::PointerType::getUnqual(Ops[1]->getType())); + Value *Ptr = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( + Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType())); ---------------- I think the semantics of builtin functions is that they accept any address space. So you should preserve the address space from Ops[1]. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143472/new/ https://reviews.llvm.org/D143472 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits