[Mlir-commits] [mlir] [MLIR] Fix crash in int-range-optimizations on type-mismatched IR (PR #183964)

Matthias Springer llvmlistbot at llvm.org
Sun Mar 1 00:49:25 PST 2026


================
@@ -148,3 +148,41 @@ func.func @analysis_crash(%arg0: i32, %arg1: tensor<128xi1>) -> tensor<128xi64>
   %2 = arith.extsi %1 : tensor<128xi32> to tensor<128xi64>
   return %2 : tensor<128xi64>
 }
+
+// -----
+
+// Regression test for https://github.com/llvm/llvm-project/issues/74234
+// Verifies no crash when interprocedural range propagation encounters a callee
+// whose return operand type differs from the function's declared return type,
+// causing a bit-width mismatch in the inferred ranges.
+
+// CHECK-LABEL: @issue74234_callee
+func.func private @issue74234_callee() -> index {
----------------
matthias-springer wrote:

Can this be reproduced with `i64`? (Test case may be a bit easier to understand because you can directly see the bitwidth on the type.)

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


More information about the Mlir-commits mailing list