mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 22:26:14 +00:00
Correct the calculation in APInt::logBase2().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ef476fdce2
commit
3130835bdf
@ -697,7 +697,7 @@ public:
|
||||
|
||||
/// @returns the floor log base 2 of this APInt.
|
||||
inline uint32_t logBase2() const {
|
||||
return getNumWords() * APINT_BITS_PER_WORD - 1 - countLeadingZeros();
|
||||
return BitWidth - 1 - countLeadingZeros();
|
||||
}
|
||||
|
||||
/// @brief Converts this APInt to a double value.
|
||||
|
Loading…
Reference in New Issue
Block a user