[Mlir-commits] [mlir] 42d48d0 - antiagainst's fix

Diego Caballero llvmlistbot at llvm.org
Mon Aug 15 11:06:52 PDT 2022


Author: Diego Caballero
Date: 2022-08-15T17:57:38Z
New Revision: 42d48d09666279bdd05d70ff7c353466ae79711a

URL: https://github.com/llvm/llvm-project/commit/42d48d09666279bdd05d70ff7c353466ae79711a
DIFF: https://github.com/llvm/llvm-project/commit/42d48d09666279bdd05d70ff7c353466ae79711a.diff

LOG: antiagainst's fix

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 9e2b7ab062643..7a4606da93bbc 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -2288,7 +2288,11 @@ class ElementCount<string name> :
 class ElementType<string name> : StrFunc<"getElementTypeOrSelf($" # name # ")">;
 
 class AllMatchPred<list<string> values> :
-    CPred<"::llvm::is_splat({" # !interleave(values, ", ") # "})">;
+  CPred<!if(!lt(!size(values), 2),
+            "true",
+            !foldl("(" # !head(values) # ")", !tail(values), acc, v,
+                   acc # " == (" # v # ") && (" # v # ")")
+              # " == (" # !head(values) # ")")>;
 
 class AllMatch<list<string> values, string summary> :
     PredOpTrait<summary, AllMatchPred<values>>;


        


More information about the Mlir-commits mailing list