diff --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td --- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td +++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td @@ -748,6 +748,12 @@ let arguments = (ins Variadic:$inputs); let results = (outs Shape_WitnessType:$result); + // Only needed while tablegen is unable to generate this for ops with variadic + // arguments. + let builders = [ + OpBuilder<(ins "ValueRange":$inputs)>, + ]; + let assemblyFormat = "$inputs attr-dict"; let hasFolder = 1; diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp --- a/mlir/lib/Dialect/Shape/IR/Shape.cpp +++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp @@ -436,6 +436,11 @@ return success(); } +void AssumingAllOp::build(OpBuilder &b, OperationState &state, + ValueRange inputs) { + build(b, state, b.getType(), inputs); +} + //===----------------------------------------------------------------------===// // BroadcastOp //===----------------------------------------------------------------------===//