[Mlir-commits] [mlir] [mlir][InferIntRangeCommon] Fix Division by Zero Crash (PR #151637)
Krzysztof Drewniak
llvmlistbot at llvm.org
Sun Aug 17 11:11:57 PDT 2025
================
@@ -290,8 +290,7 @@ static ConstantIntRanges inferDivURange(const ConstantIntRanges &lhs,
DivisionFixupFn fixup) {
const APInt &lhsMin = lhs.umin(), &lhsMax = lhs.umax(), &rhsMin = rhs.umin(),
&rhsMax = rhs.umax();
-
- if (!rhsMin.isZero()) {
+ if (!rhsMin.isZero() && !rhsMax.isZero()) {
----------------
krzysz00 wrote:
This condition should be strictly redundant - can you debug why you have this case?
https://github.com/llvm/llvm-project/pull/151637
More information about the Mlir-commits
mailing list