[clang] [CIR] Wire AMDGPU into the call-convention lowering pass (PR #220197)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 03:56:53 PDT 2026


================
@@ -379,8 +379,11 @@ static mlir::Type abiTypeToCIR(const llvm::abi::Type *ty, MLIRContext *ctx) {
       .Case([&](const llvm::abi::FloatType *fltTy) {
         return cir::getFloatingPointType(*fltTy->getSemantics(), ctx);
       })
-      .Case([&](const llvm::abi::PointerType *) {
-        return cir::PointerType::get(cir::VoidType::get(ctx));
+      .Case([&](const llvm::abi::PointerType *ptrTy) {
+        mlir::ptr::MemorySpaceAttrInterface addrSpace;
+        if (unsigned as = ptrTy->getAddrSpace())
+          addrSpace = cir::TargetAddressSpaceAttr::get(ctx, as);
+        return cir::PointerType::get(cir::VoidType::get(ctx), addrSpace);
----------------
skc7 wrote:

Checked this and this change fails the build. There's no `PointerType` builder that takes an unsigned.

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


More information about the cfe-commits mailing list