[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:56 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 {
+ %c30 = arith.constant 30 : index
+ %2 = builtin.unrealized_conversion_cast %c30 : index to i32
+ llvm.return %2 : i32
----------------
matthias-springer wrote:
This is not the first time, we run into an issue like this...
https://github.com/llvm/llvm-project/pull/183964
More information about the Mlir-commits
mailing list