[Mlir-commits] [mlir] [mlir] fix IntegerRangeAnalysis::staticallyNonNegative (PR #134003)
Jeff Niu
llvmlistbot at llvm.org
Wed Apr 2 23:46:58 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() ||
----------------
Mogball wrote:
I feel like a decent contract for this function would be to assert that `isa<IntegerType>(v.getType())`, but I don't have a strong opinion here
https://github.com/llvm/llvm-project/pull/134003
More information about the Mlir-commits
mailing list