Fix a bug in an assert that would never trigger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33005 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index 33a6702..a8ffa58 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -355,7 +355,7 @@
/// truncated to the specified type.
ConstantRange ConstantRange::truncate(const Type *Ty) const {
unsigned SrcTySize = getLower()->getType()->getPrimitiveSizeInBits();
- assert(SrcTySize > Ty->getPrimitiveSize() && "Not a value truncation");
+ assert(SrcTySize > Ty->getPrimitiveSizeInBits() && "Not a value truncation");
uint64_t Size = 1ULL << Ty->getPrimitiveSizeInBits();
if (isFullSet() || getSetSize() >= Size)
return ConstantRange(getType());