[Mlir-commits] [mlir] [mlir][arith] Fix overflow bug in arith::CeilDivSIOp::fold (PR #90947)

Kai Sasaki llvmlistbot at llvm.org
Fri May 3 04:03:00 PDT 2024


================
@@ -701,22 +701,34 @@ OpFoldResult arith::CeilDivSIOp::fold(FoldAdaptor adaptor) {
           // Both positive, return ceil(a, b).
           return signedCeilNonnegInputs(a, b, overflowOrDiv0);
         }
+
+        bool overflowNegA = false;
+        bool overflowNegB = false;
----------------
Lewuathe wrote:

The name should have `OrDiv0` at the end more precisely?

```suggestion
        bool overflowNegBOrDiv0 = false;
```

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


More information about the Mlir-commits mailing list