[Mlir-commits] [mlir] [mlir][emitc] Add EmitC lowering for arith.trunci, arith.extsi, arith.extui (PR #91491)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed May 22 06:02: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 a55127281b2ed5f24f848b9e5c70870ad170bc3f b413a9c6986cb80d7c66500f1f72797103ea8ccb -- mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp b/mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
index 496c197ce9..0be3d76f55 100644
--- a/mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
+++ b/mlir/lib/Conversion/ArithToEmitC/ArithToEmitC.cpp
@@ -136,8 +136,9 @@ public:
       return rewriter.notifyMatchFailure(op, "expected integer operand type");
 
     // Signed (sign-extending) casts from i1 are not supported.
-    if(operandType.isInteger(1) && !castToUnsigned)
-      return rewriter.notifyMatchFailure(op, "operation not supported on i1 type");
+    if (operandType.isInteger(1) && !castToUnsigned)
+      return rewriter.notifyMatchFailure(op,
+                                         "operation not supported on i1 type");
 
     // to-i1 conversions: arith semantics want truncation, whereas (bool)(v) is
     // equivalent to (v != 0). Implementing as (bool)(v & 0x01) gives

``````````

</details>


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


More information about the Mlir-commits mailing list