[Mlir-commits] [mlir] [mlir] Fix integer comparison warning (PR #144794)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 18 14:09:14 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-core

Author: Diego Caballero (dcaballe)

<details>
<summary>Changes</summary>

Introduced by https://github.com/llvm/llvm-project/pull/141457

---
Full diff: https://github.com/llvm/llvm-project/pull/144794.diff


1 Files Affected:

- (modified) mlir/include/mlir/IR/OpBase.td (+1-1) 


``````````diff
diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td
index b3fabe409806f..43ef28624fb19 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -566,7 +566,7 @@ class ShapedTypeMatchesElementCountAndTypes<string shapedArg,
     PredOpTrait<"shaped type '" # shapedArg # "' matches '" # elementsArg # "' "
                 "element count and types",
         And<[CPred<ElementCount<shapedArg>.result # " == "
-                     "$" # elementsArg # ".getTypes().size()">,
+                     "static_cast<int64_t>($" # elementsArg # ".getTypes().size())">,
              CPred<"::llvm::all_of($" # elementsArg # ".getTypes(), "
                      "[&](::mlir::Type t) { return t == "
                        # ElementType<shapedArg>.result # "; })">]>> {

``````````

</details>


https://github.com/llvm/llvm-project/pull/144794


More information about the Mlir-commits mailing list