Skip to content

Commit e86119b

Browse files
committed
[mlir] Minor fixes after removing types from attributes
D130092 removed types from attributes. This patch fixes a minor issues what was exposed when integrating that change in IREE. An explicit cast is needed so that the template type of `makeArrayRef` is automatically deduced. Co-authored-by: Lei Zhang <[email protected]> Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D131604
1 parent f55a6fd commit e86119b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mlir/include/mlir/IR/OpBase.td

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,11 @@ class ElementCount<string name> :
22882288
class ElementType<string name> : StrFunc<"getElementTypeOrSelf($" # name # ")">;
22892289

22902290
class AllMatchPred<list<string> values> :
2291-
CPred<"::llvm::is_splat({" # !interleave(values, ", ") # "})">;
2291+
CPred<!if(!lt(!size(values), 2),
2292+
"true",
2293+
!foldl("(" # !head(values) # ")", !tail(values), acc, v,
2294+
acc # " == (" # v # ") && (" # v # ")")
2295+
# " == (" # !head(values) # ")")>;
22922296

22932297
class AllMatch<list<string> values, string summary> :
22942298
PredOpTrait<summary, AllMatchPred<values>>;

0 commit comments

Comments
 (0)