[Mlir-commits] [mlir] [mlir][IntRange] Poison support in int-range analysis (PR #152932)
Jakub Kuderski
llvmlistbot at llvm.org
Sun Aug 17 17:52:29 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());
----------------
kuhar wrote:
Is it impossible to represent `i0` poison? I thought that the signed value is of `i0` is `-1`.
https://github.com/llvm/llvm-project/pull/152932
More information about the Mlir-commits
mailing list