diff options
author | c8ef <c8ef@outlook.com> | 2024-06-07 23:01:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 17:01:22 +0200 |
commit | b25b1db8199d86cb3645e92200cda8d5d30922d0 (patch) | |
tree | 22f6869db66e17997607aaf3170e9aeeccb1ad31 /llvm/lib/IR/ConstantRange.cpp | |
parent | fc95645e37f244c2fc155f1ee51047f90329e8c1 (diff) | |
download | llvm-b25b1db8199d86cb3645e92200cda8d5d30922d0.zip llvm-b25b1db8199d86cb3645e92200cda8d5d30922d0.tar.gz llvm-b25b1db8199d86cb3645e92200cda8d5d30922d0.tar.bz2 |
[KnownBits] Remove `hasConflict()` assertions (#94568)
Allow KnownBits to represent "always poison" values via conflict.
close: #94436
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index c3bde48..08041c9 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -58,8 +58,8 @@ ConstantRange::ConstantRange(APInt L, APInt U) ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known, bool IsSigned) { - assert(!Known.hasConflict() && "Expected valid KnownBits"); - + if (Known.hasConflict()) + return getEmpty(Known.getBitWidth()); if (Known.isUnknown()) return getFull(Known.getBitWidth()); |