[Mlir-commits] [mlir] [MLIR][Arith] Add rounding mode attribute to `truncf` (PR #86152)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Mar 28 10:15:02 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 77cbc9bf601861ed92e36f7833422e31c22dd159 3b756e4555397cfcfd11b262613875dc0a82d9cd -- mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h mlir/lib/Conversion/ArithCommon/AttrToLLVMConverter.cpp mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp mlir/lib/Dialect/Arith/IR/ArithOps.cpp mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h b/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
index 87643be741..0891e2ba7b 100644
--- a/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
+++ b/mlir/include/mlir/Conversion/ArithCommon/AttrToLLVMConverter.h
@@ -112,8 +112,7 @@ class AttrConverterConstrainedFPToLLVM {
                 "LLVM::FPExceptionBehaviorOpInterface");
 
 public:
-  AttrConverterConstrainedFPToLLVM(
-      SourceOp srcOp) {
+  AttrConverterConstrainedFPToLLVM(SourceOp srcOp) {
     // Copy the source attributes.
     convertedAttr = NamedAttrList{srcOp->getAttrs()};
 
diff --git a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
index 95c3d4795e..128dd041ee 100644
--- a/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+++ b/mlir/lib/Dialect/Arith/IR/ArithOps.cpp
@@ -1424,7 +1424,7 @@ OpFoldResult arith::TruncFOp::fold(FoldAdaptor adaptor) {
         FailureOr<APFloat> result;
         if (std::optional<RoundingMode> roundingMode = getRoundingmode()) {
           llvm::RoundingMode llvmRoundingMode =
-            convertArithRoundingModeToLLVMIR(*roundingMode);
+              convertArithRoundingModeToLLVMIR(*roundingMode);
           result = convertFloatValue(a, targetSemantics, llvmRoundingMode);
         } else {
           result = convertFloatValue(a, targetSemantics);

``````````

</details>


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


More information about the Mlir-commits mailing list