/// consumer %0 ... : memref<?x16xf32, affine_map<(i, j)->(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);
+
+/// Compute `lhs` `pred` `rhs`, where `pred` is one of the known floating point
+/// comparison predicates.
+bool applyCmpPredicate(CmpFPredicate predicate, const APFloat &lhs,
+ const APFloat &rhs);
} // end namespace mlir
#endif // MLIR_DIALECT_IR_STANDARDOPS_IR_OPS_H
// 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 mlir::applyCmpPredicate(CmpIPredicate predicate, const APInt &lhs,
+ const APInt &rhs) {
switch (predicate) {
case CmpIPredicate::eq:
return lhs.eq(rhs);
/// Compute `lhs` `pred` `rhs`, where `pred` is one of the known floating point
/// comparison predicates.
-static bool applyCmpPredicate(CmpFPredicate predicate, const APFloat &lhs,
- const APFloat &rhs) {
+bool mlir::applyCmpPredicate(CmpFPredicate predicate, const APFloat &lhs,
+ const APFloat &rhs) {
auto cmpResult = lhs.compare(rhs);
switch (predicate) {
case CmpFPredicate::AlwaysFalse: