summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ScaledNumber.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/ScaledNumber.cpp')
-rw-r--r--llvm/lib/Support/ScaledNumber.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/ScaledNumber.cpp b/llvm/lib/Support/ScaledNumber.cpp
index 725f4649613..3cd75091caf 100644
--- a/llvm/lib/Support/ScaledNumber.cpp
+++ b/llvm/lib/Support/ScaledNumber.cpp
@@ -169,8 +169,7 @@ static std::string toStringAPFloat(uint64_t D, int E, unsigned Precision) {
int Shift = 63 - (NewE - E);
assert(Shift <= LeadingZeros);
assert(Shift == LeadingZeros || NewE == ScaledNumbers::MaxScale);
- assert((Shift & (1u << std::numeric_limits<int>::digits)) == 0 &&
- "undefined behavior");
+ assert(Shift >= 0 && Shift < 64 && "undefined behavior");
D <<= Shift;
E = NewE;
OpenPOWER on IntegriCloud