commit | 67378b22bb7897b32a2a412f00c88c8587a2f89f | [log] [tgz] |
---|---|---|
author | Reid Spencer <rspencer@reidspencer.com> | Sat Apr 14 00:00:10 2007 +0000 |
committer | Reid Spencer <rspencer@reidspencer.com> | Sat Apr 14 00:00:10 2007 +0000 |
tree | c578fde45be9af1d62f8a1e378b4a657dfe4b95f | |
parent | 036cd14ecb62e3e07ba5f0a6f14a0034455256e7 [diff] |
We want the number of bits needed, not the power of 2. llvm-svn: 35977
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index a35b116..d7933fc 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp
@@ -693,7 +693,7 @@ APInt tmp(sufficient, str, slen, radix); // Compute how many bits are required. - return isNegative + tmp.logBase2(); + return isNegative + tmp.logBase2() + 1; } uint64_t APInt::getHashValue() const {