diff --git a/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h b/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h --- a/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h +++ b/mlir/include/mlir/Dialect/Linalg/Analysis/ConstraintsSet.h @@ -25,7 +25,7 @@ ConstraintsSet() : FlatAffineConstraints() {} /// Assuming `val` is defined by `val = affine.min map (operands)`, introduce - /// all the constraints `val >= expr_i(operands)`, where expr_i are all the + /// all the constraints `val <= expr_i(operands)`, where expr_i are all the /// results of `map`. // This API avoids taking a dependence on the AffineMinOp definition. LogicalResult composeMin(Value val, AffineMap map, ValueRange operands) { @@ -33,7 +33,7 @@ } /// Assuming `val` is defined by `val = affine.max map (operands)`, introduce - /// all the constraints `val <= expr_i(operands)`, where expr_i are all the + /// all the constraints `val >= expr_i(operands)`, where expr_i are all the /// results of `map`. // This API avoids taking a dependence on the AffineMaxOp definition. LogicalResult composeMax(Value val, AffineMap map, ValueRange operands) { diff --git a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp @@ -553,7 +553,7 @@ } /// Given a set of loops, assumed to be scf::ForOp, create a constraint set -/// containing the inequalities `iv - lb >= 0` and `-iv + ub >= 0` for each +/// containing the inequalities `iv - lb >= 0` and `-iv + ub - 1 >= 0` for each /// loop. static ConstraintsSet initLoopIvsAndBounds(ArrayRef loops) { ConstraintsSet constraints;