[llvm-branch-commits] [mlir] release/18.x: [ODS][NFC] Cast range.size() to int32_t in accumulation (#85629) (PR #86677)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 26 07:58:04 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: None (llvmbot)
<details>
<summary>Changes</summary>
Backport bce17034157fdfe4d898d30366c1eeca3442fa3d
Requested by: @<!-- -->EugeneZelenko
---
Full diff: https://github.com/llvm/llvm-project/pull/86677.diff
1 Files Affected:
- (modified) mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp (+1-1)
``````````diff
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 71326049af0579..7f748cfbd31ad4 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -3058,7 +3058,7 @@ void OpEmitter::genCodeForAddingArgAndRegionForBuilder(
body << llvm::formatv(
"static_cast<int32_t>(std::accumulate({0}.begin(), {0}.end(), 0, "
"[](int32_t curSum, ::mlir::ValueRange range) {{ return curSum + "
- "range.size(); }))",
+ "static_cast<int32_t>(range.size()); }))",
operandName);
} else {
body << "static_cast<int32_t>(" << getArgumentName(op, i) << ".size())";
``````````
</details>
https://github.com/llvm/llvm-project/pull/86677
More information about the llvm-branch-commits
mailing list