[Mlir-commits] [mlir] [mlir][llvm] Add icmp folder (PR #65343)
Markus Böck
llvmlistbot at llvm.org
Tue Sep 5 12:27:17 PDT 2023
================
@@ -175,6 +175,42 @@ ParseResult FCmpOp::parse(OpAsmParser &parser, OperationState &result) {
return parseCmpOp<FCmpPredicate>(parser, result);
}
+/// Returns a scalar or vector boolean attribute of the given type.
+static Attribute getBoolAttribute(Type type, MLIRContext *ctx, bool value) {
+ auto boolAttr = BoolAttr::get(ctx, value);
+ ShapedType shapedType = llvm::dyn_cast_or_null<ShapedType>(type);
----------------
zero9178 wrote:
```suggestion
ShapedType shapedType = dyn_cast<ShapedType>(type);
```
https://github.com/llvm/llvm-project/pull/65343
More information about the Mlir-commits
mailing list