[Mlir-commits] [mlir] [mlir][tosa] Use roundeven in TOSA cast splat constant op folding (PR #99484)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jul 18 05:48:10 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7e6a73959ae97b1f9476a90290a492ba90cb950d c5b4b37d0e0dcadbc7a2e1635946df806fe58851 --extensions cpp -- mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
index f4d4df5fd0..da9a93feac 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
@@ -764,7 +764,8 @@ OpFoldResult CastOp::fold(FoldAdaptor adaptor) {
llvm::cast<IntegerType>(outETy).getIntOrFloatBitWidth(), unsign);
auto floatVal = operand.getSplatValue<APFloat>();
bool exact;
- floatVal.convertToInteger(intVal, llvm::RoundingMode::NearestTiesToEven, &exact);
+ floatVal.convertToInteger(intVal, llvm::RoundingMode::NearestTiesToEven,
+ &exact);
return SplatElementsAttr::get(outTy, intVal);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/99484
More information about the Mlir-commits
mailing list