[Mlir-commits] [mlir] [mlir] fix IntegerRangeAnalysis::staticallyNonNegative (PR #134003)

Krzysztof Drewniak llvmlistbot at llvm.org
Tue Apr 8 09:34:45 PDT 2025


================
@@ -43,6 +43,9 @@ LogicalResult staticallyNonNegative(DataFlowSolver &solver, Value v) {
   if (!result || result->getValue().isUninitialized())
     return failure();
   const ConstantIntRanges &range = result->getValue().getValue();
+  if (!range.umin().getBitWidth() || !range.umax().getBitWidth() ||
----------------
krzysz00 wrote:

... wow that's a lot of autocorrect-os

Hopefully the overall message got through

The other thing that'd be needed there is to make sure that whenever we've visiting a value, we always make the result something other than "unknown"

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


More information about the Mlir-commits mailing list