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

Gil Rapaport llvmlistbot at llvm.org
Tue Jun 30 06:28:30 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;
+
----------------
aniragil wrote:

in the the two checks above indices.empty() is used, any specific reason to use shape.empty() here?

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


More information about the Mlir-commits mailing list