================
@@ -732,13 +737,20 @@ mlir::Value
CIRAttrToValue::visitCirAttr(cir::GlobalViewAttr globalAttr) {
}
if (auto ptrTy = mlir::dyn_cast<cir::PointerType>(globalAttr.getType())) {
+ auto llvmDstTy =
converter->convertType<mlir::LLVM::LLVMPointerType>(ptrTy);
+ unsigned dstAddrSpace = llvmDstTy.getAddressSpace();
+
+ if (sourceAddrSpace != dstAddrSpace) {
+ return mlir::LLVM::AddrSpaceCastOp::create(rewriter, parentOp->getLoc(),
----------------
andykaylor wrote:
What happens if the type and the address space are different?
https://github.com/llvm/llvm-project/pull/190197
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits