[Mlir-commits] [mlir] [mlir][IntRangeInference] Handle ceildivsi(INT_MIN, x > 1) as expected (PR #116284)

Ivan Butygin llvmlistbot at llvm.org
Thu Nov 14 14:17:54 PST 2024


================
@@ -249,6 +249,19 @@ func.func @ceil_divsi(%arg0 : index) -> i1 {
     func.return %10 : i1
 }
 
+// CHECK-LABEL: func @ceil_divsi_intmin_bug_115293
+// CHECK: %[[ret:.*]] = arith.constant true
+// CHECK: return %[[ret]]
+func.func @ceil_divsi_intmin_bug_115293() -> i1 {
+    %cIntMin_i64 = arith.constant -9223372036854775808 : i64
+    %cDenom_i64 = arith.constant 1189465982 : i64
+    %cRes_i64 = arith.constant 7754212542 : i64
----------------
Hardcode84 wrote:

General comment: this check doesn't look very reliable, as this folding can be result from both `int-range-optimizations` and just usual folding. We probably should use `with_bounds`  everywhere.

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


More information about the Mlir-commits mailing list