mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -745,7 +745,7 @@ uint32_t APInt::countLeadingZeros() const {
|
||||
uint32_t remainder = BitWidth % APINT_BITS_PER_WORD;
|
||||
if (remainder)
|
||||
Count -= APINT_BITS_PER_WORD - remainder;
|
||||
return Count;
|
||||
return std::min(Count, BitWidth);
|
||||
}
|
||||
|
||||
static uint32_t countLeadingOnes_64(uint64_t V, uint32_t skip) {
|
||||
|
Reference in New Issue
Block a user