[clang] [CIR] Upstream `AddressSpace` support for `PointerType` (PR #161028)

David Rivera via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 30 11:38:04 PDT 2025


================
@@ -2298,14 +2298,23 @@ mlir::LogicalResult CIRToLLVMSelectOpLowering::matchAndRewrite(
   return mlir::success();
 }
 
+static unsigned
+getTargetAddrSpaceFromCIRAddrSpace(cir::AddressSpace addrSpace) {
----------------
RiverDave wrote:

Can you be a bit more specific? Besides numerical addresses to which I've added tests for in this PR. offload addresses cannot be lowered to LLVM since we seem to be dependend on `cir::lowerModule` which we haven't upstreamed yet. therefore we hit an assertion in this function. I could target that in a different PR.

https://github.com/llvm/llvm-project/pull/161028


More information about the cfe-commits mailing list