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 origin/main HEAD --extensions cpp --
mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
mlir/lib/ExecutionEngine/APFloatWrappers.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
b/mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
index 230abb51e..d274e7255 100644
--- a/mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
+++ b/mlir/lib/Conversion/ArithToAPFloat/ArithToAPFloat.cpp
@@ -470,19 +470,19 @@ struct NegFOpToAPFloatConversion final :
OpRewritePattern<arith::NegFOp> {
auto floatTy = cast<FloatType>(op.getOperand().getType());
auto intWType = rewriter.getIntegerType(floatTy.getWidth());
Value operandBits = arith::ExtUIOp::create(
- rewriter, loc, i64Type, arith::BitcastOp::create(rewriter, loc,
intWType, op.getOperand()));
+ rewriter, loc, i64Type,
+ arith::BitcastOp::create(rewriter, loc, intWType, op.getOperand()));
// Call APFloat function.
Value semValue = getSemanticsValue(rewriter, loc, floatTy);
SmallVector<Value> params = {semValue, operandBits};
- Value negatedBits =
- func::CallOp::create(rewriter, loc, TypeRange(i64Type),
- SymbolRefAttr::get(*fn), params)
- ->getResult(0);
+ Value negatedBits = func::CallOp::create(rewriter, loc, TypeRange(i64Type),
+ SymbolRefAttr::get(*fn), params)
+ ->getResult(0);
// Truncate result to the original width.
- Value truncatedBits = arith::TruncIOp::create(rewriter, loc, intWType,
- negatedBits);
+ Value truncatedBits =
+ arith::TruncIOp::create(rewriter, loc, intWType, negatedBits);
Value result =
arith::BitcastOp::create(rewriter, loc, floatTy, truncatedBits);
rewriter.replaceOp(op, result);
diff --git a/mlir/lib/ExecutionEngine/APFloatWrappers.cpp
b/mlir/lib/ExecutionEngine/APFloatWrappers.cpp
index f2d5254be..8618c2402 100644
--- a/mlir/lib/ExecutionEngine/APFloatWrappers.cpp
+++ b/mlir/lib/ExecutionEngine/APFloatWrappers.cpp
@@ -143,7 +143,8 @@ MLIR_APFLOAT_WRAPPERS_EXPORT int8_t
_mlir_apfloat_compare(int32_t semantics,
return static_cast<int8_t>(x.compare(y));
}
-MLIR_APFLOAT_WRAPPERS_EXPORT uint64_t _mlir_apfloat_neg(int32_t semantics,
uint64_t a) {
+MLIR_APFLOAT_WRAPPERS_EXPORT uint64_t _mlir_apfloat_neg(int32_t semantics,
+ uint64_t a) {
const llvm::fltSemantics &sem = llvm::APFloatBase::EnumToSemantics(
static_cast<llvm::APFloatBase::Semantics>(semantics));
unsigned bitWidth = llvm::APFloatBase::semanticsSizeInBits(sem);
``````````
</details>
https://github.com/llvm/llvm-project/pull/169759
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits