[Mlir-commits] [mlir] [mlir][EmitC] Add rank-0 MemRef conversion (PR #205774)

ioana ghiban llvmlistbot at llvm.org
Wed Jul 1 05:59:31 PDT 2026


================
@@ -165,6 +180,9 @@ static Value computeRowMajorLinearIndex(ImplicitLocOpBuilder &builder,
           ? emitc::ConstantOp::create(builder, idxType, builder.getIndexAttr(0))
           : indices[0];
 
+  if (shape.empty())
+    return linearIndex;
+
----------------
ioghiban wrote:

will use `indices` instead, for consistency

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


More information about the Mlir-commits mailing list