[Mlir-commits] [mlir] Expand the MemRefToEmitC pass - Adding scalars (PR #148055)
Jacques Pienaar
llvmlistbot at llvm.org
Fri Jul 11 13:17:03 PDT 2025
================
@@ -95,7 +97,13 @@ struct ConvertGlobal final : public OpConversionPattern<memref::GlobalOp> {
op.getLoc(), "global variable with alignment requirement is "
"currently not supported");
}
- auto resultTy = getTypeConverter()->convertType(op.getType());
+
+ Type resultTy;
+ if (type.getRank() == 0)
+ resultTy = getTypeConverter()->convertType(type.getElementType());
----------------
jpienaar wrote:
You should be able to just do
resultTy = getTypeConverter()->convertType(getElementTypeOrSelf(type));
https://github.com/llvm/llvm-project/pull/148055
More information about the Mlir-commits
mailing list