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 @@ -63,6 +63,8 @@ let arguments = (ins Shape_SizeType:$lhs, Shape_SizeType:$rhs); let results = (outs Shape_SizeType:$result); + + let assemblyFormat = "$lhs `,` $rhs attr-dict"; } def Shape_BroadcastOp : Shape_Op<"broadcast", []> { diff --git a/mlir/test/Dialect/Shape/ops.mlir b/mlir/test/Dialect/Shape/ops.mlir --- a/mlir/test/Dialect/Shape/ops.mlir +++ b/mlir/test/Dialect/Shape/ops.mlir @@ -9,7 +9,7 @@ %init = shape.const_size 0 %num_elements = shape.reduce(%shape, %init) -> !shape.size { ^bb0(%index: index, %dim: !shape.size, %lci: !shape.size): - %acc = "shape.add"(%lci, %dim) : (!shape.size, !shape.size) -> !shape.size + %acc = shape.add %lci, %dim shape.yield %acc : !shape.size } return %num_elements : !shape.size