[Mlir-commits] [mlir] 5e877ca - [mlir] Add an IntNEQValue predicate

Nicolas Vasilache llvmlistbot at llvm.org
Fri Jul 14 07:58:19 PDT 2023


Author: Nicolas Vasilache
Date: 2023-07-14T16:57:04+02:00
New Revision: 5e877caf4d66cc21236f68dee6757104f6461d0f

URL: https://github.com/llvm/llvm-project/commit/5e877caf4d66cc21236f68dee6757104f6461d0f
DIFF: https://github.com/llvm/llvm-project/commit/5e877caf4d66cc21236f68dee6757104f6461d0f.diff

LOG: [mlir] Add an IntNEQValue predicate

Differential Revision: https://reviews.llvm.org/D155298

Added: 
    

Modified: 
    mlir/include/mlir/IR/OpBase.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td
index ddcf60c9071b8a..ad10fdb4255c04 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -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>;


        


More information about the Mlir-commits mailing list