[Mlir-commits] [mlir] Expand the MemRefToEmitC pass - Adding scalars (PR #148055)

Jaden Angella llvmlistbot at llvm.org
Mon Jul 14 10:43:45 PDT 2025


================
@@ -132,7 +144,17 @@ struct ConvertGetGlobal final
   matchAndRewrite(memref::GetGlobalOp op, OpAdaptor operands,
                   ConversionPatternRewriter &rewriter) const override {
 
-    auto resultTy = getTypeConverter()->convertType(op.getType());
+    MemRefType type = op.getType();
+    Type resultTy;
+    if (type.getRank() == 0)
+      resultTy = emitc::LValueType::get(
----------------
Jaddyen wrote:

Thanks for pointing this out. I've updated the conversion to reflect this.

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


More information about the Mlir-commits mailing list