[mlir] Add an IntNEQValue predicate
authorNicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Fri, 14 Jul 2023 14:56:50 +0000 (16:56 +0200)
committerNicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Fri, 14 Jul 2023 14:57:04 +0000 (16:57 +0200)
Differential Revision: https://reviews.llvm.org/D155298

mlir/include/mlir/IR/OpBase.td

index ddcf60c9071b8a3c9c98beb190a59dffb1e6eb9d..ad10fdb4255c0472464c6642bfe3022544f91a31 100644 (file)
@@ -1806,6 +1806,10 @@ class AllAttrOf<list<AttrConstraint> constraints> : AttrConstraint<
     !interleave(!foreach(con, constraints, con.summary), " and ")> {
 }
 
+class IntNEQValue<int n> : AttrConstraint<
+    CPred<"::llvm::cast<::mlir::IntegerAttr>($_self).getInt() != " # n>,
+    "whose minimum value is " # n>;
+
 class IntMinValue<int n> : AttrConstraint<
     CPred<"::llvm::cast<::mlir::IntegerAttr>($_self).getInt() >= " # n>,
     "whose minimum value is " # n>;