[Mlir-commits] [mlir] [mlir][Interface] Allow scalar operands and require ranked shaped operands in IndexingMapOpInterface (PR #179072)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 17 15:09:35 PST 2026


================
@@ -14,6 +14,36 @@ namespace mlir {
 #include "mlir/Interfaces/IndexingMapOpInterface.cpp.inc"
 } // namespace mlir
 
+static LogicalResult verifyIndexingMapOperandType(Operation *op, Type t,
+                                                  unsigned operandNumber) {
+  // Scalars are allowed (treated as rank-0). verifyImpl checks the rank.
+  if (!isa<ShapedType>(t) && !isa<VectorType>(t))
----------------
MaheshRavishankar wrote:

The best way to check for a scalar would be to use `IsIntFloatOrIndex(t)` I think? Maybe change it here and in the check below?

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


More information about the Mlir-commits mailing list