[Mlir-commits] [mlir] [mlir][arith] Add overflow flags support to arith ops (PR #78376)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jan 16 17:54:58 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 854aa9112df253bcad4db6f21ea9b2fbca4ed83e...c2033ade77ed55cabde9b4568e6e0259166693a7 mlir/test/python/dialects/arith_llvm.py mlir/test/python/ir/diagnostic_handler.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- dialects/arith_llvm.py	2024-01-17 01:47:05.000000 +0000
+++ dialects/arith_llvm.py	2024-01-17 01:54:50.168321 +0000
@@ -18,11 +18,8 @@
 def testOverflowFlags():
     with Context() as ctx, Location.unknown():
         module = Module.create()
         with InsertionPoint(module.body):
             a = arith.ConstantOp(value=42, result=IntegerType.get_signless(32))
-            r = arith.AddIOp(
-                a, a, overflowFlags=arith.IntegerOverflowFlags.nsw
-            )
+            r = arith.AddIOp(a, a, overflowFlags=arith.IntegerOverflowFlags.nsw)
             # CHECK: arith.addi {{.*}}, {{.*}} overflow<nsw> : i32
             print(r)
-

``````````

</details>


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


More information about the Mlir-commits mailing list