[clang] [CIR] Address Space support for GlobalOps (PR #179082)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 15:01:51 PDT 2026


================
@@ -700,7 +736,6 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName, mlir::Type ty,
   }
 
   if (entry) {
-    assert(!cir::MissingFeatures::addressSpace());
----------------
andykaylor wrote:

The thing that was missing here is this (from classic codegen):

```
    if (Entry->getValueType() == Ty && Entry->getAddressSpace() == TargetAS)
      return Entry;
```
I think we still want something like that to avoid falling through, unless the type check on line 709 covers it.

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


More information about the cfe-commits mailing list