diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h --- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h +++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h @@ -339,6 +339,12 @@ /// consumer %0 ... : memref(16 * i + j)>> /// ``` bool canFoldIntoConsumerOp(MemRefCastOp castOp); + +// Compute `lhs` `pred` `rhs`, where `pred` is one of the known integer +// comparison predicates. +bool applyCmpPredicate(CmpIPredicate predicate, const APInt &lhs, + const APInt &rhs); + } // end namespace mlir #endif // MLIR_DIALECT_IR_STANDARDOPS_IR_OPS_H diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp --- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp @@ -784,8 +784,8 @@ // Compute `lhs` `pred` `rhs`, where `pred` is one of the known integer // comparison predicates. -static bool applyCmpPredicate(CmpIPredicate predicate, const APInt &lhs, - const APInt &rhs) { +bool applyCmpPredicate(CmpIPredicate predicate, const APInt &lhs, + const APInt &rhs) { switch (predicate) { case CmpIPredicate::eq: return lhs.eq(rhs);