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 @@ -369,7 +369,7 @@ //TODO(tpopp): Move the code below and witnesses to a different file. def Shape_AnyOp : Shape_Op<"any", - [DeclareOpInterfaceMethods]> { + [NoSideEffect, DeclareOpInterfaceMethods]> { let summary = "Return any combination of the input shapes."; let description = [{ This operation takes multiple input shapes and returns some combination of @@ -389,7 +389,7 @@ let results = (outs Shape_ShapeType:$result); } -def Shape_AssumingAllOp : Shape_Op<"assuming_all", []> { +def Shape_AssumingAllOp : Shape_Op<"assuming_all", [NoSideEffect]> { let summary = "Return a logical AND of all witnesses."; let description = [{ Used to simplify constraints as any single failing precondition is enough