[Mlir-commits] [mlir] [MLIR] Fix crash in int-range-optimizations on type-mismatched IR (PR #183964)
Mehdi Amini
llvmlistbot at llvm.org
Sun Mar 1 04:04: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
----------------
joker-eph wrote:
```
********************
Failed Tests (16):
MLIR :: Conversion/FuncToLLVM/func-memref-return.mlir
MLIR :: Conversion/GPUToNVVM/gpu-to-nvvm-32b.mlir
MLIR :: Conversion/GPUToNVVM/gpu-to-nvvm.mlir
MLIR :: Dialect/EmitC/invalid_types.mlir
MLIR :: Dialect/LLVMIR/invalid.mlir
MLIR :: Dialect/LLVMIR/nvvm.mlir
MLIR :: Dialect/Linalg/invalid.mlir
MLIR :: Dialect/NVGPU/invalid.mlir
MLIR :: Dialect/SparseTensor/invalid.mlir
MLIR :: Dialect/Tosa/invalid.mlir
MLIR :: Dialect/Vector/invalid.mlir
MLIR :: Transforms/print-op-graph.mlir
MLIR :: Transforms/test-dialect-conversion-pdll.mlir
MLIR :: Transforms/test-legalizer.mlir
MLIR :: Transforms/test-merge-blocks.mlir
MLIR :: Transforms/test-pattern-selective-replacement.mlir
```
It's possible all of these are tests to update though...
https://github.com/llvm/llvm-project/pull/183964
More information about the Mlir-commits
mailing list