[Mlir-commits] [mlir] [mlir][arith] Fix SelectOp unsafe int range inference with unfinalized range case (PR #173716)
Krzysztof Drewniak
llvmlistbot at llvm.org
Tue Dec 30 09:15:22 PST 2025
================
@@ -329,7 +329,13 @@ void arith::SelectOp::inferResultRangesFromOptional(
setResultRange(getResult(), trueCase);
return;
}
- setResultRange(getResult(), IntegerValueRange::join(trueCase, falseCase));
+
+ // When one of the ranges is uninitialized, set the whole range to max
+ // otherwise the result will ignore the uninitialized range.
+ if (trueCase.isUninitialized() || falseCase.isUninitialized())
----------------
krzysz00 wrote:
I'm not sure this half of the patch should be in there
https://github.com/llvm/llvm-project/pull/173716
More information about the Mlir-commits
mailing list