summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/ConstantRange.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp2
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);
OpenPOWER on IntegriCloud