diff options
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index d41914ba4a9..16def8bc5e8 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -56,6 +56,8 @@ ConstantRange::ConstantRange(APInt L, APInt U) ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known, bool IsSigned) { + assert(!Known.hasConflict() && "Expected valid KnownBits"); + if (Known.isUnknown()) return ConstantRange(Known.getBitWidth(), /* full */ true); |