mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +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