[Mlir-commits] [mlir] [mlir][IntRange] Poison support in int-range analysis (PR #152932)

Ivan Butygin llvmlistbot at llvm.org
Sun Aug 17 18:09:59 PDT 2025


================
@@ -124,6 +193,14 @@ std::optional<APInt> ConstantIntRanges::getConstantValue() const {
   return std::nullopt;
 }
 
+bool ConstantIntRanges::isSignedPoison() const {
+  return getBitWidth() > 0 && smin().sgt(smax());
----------------
Hardcode84 wrote:

`getBitWidth() == 0` is reserved for non-int types in current implementation

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


More information about the Mlir-commits mailing list