diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td index b8009a818aa0..7f3839a02b2f 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td @@ -1083,9 +1083,11 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> { Operation::operand_range res{ getOperation()->getOperands().begin() + getNumShapedOperands(), getOperation()->getOperands().end()}; - for (Type t : TypeRange{res}) + for (Type t : TypeRange{res}) { + (void)t; assert((t.isSignlessIntOrIndexOrFloat() || t.template isa()) &&"expected scalar or vector type"); + } return res; }