can't use getZExtValue() to extract the low order bits for each digit.
Instead, we need to access the low order word directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37242
91177308-0d34-0410-b5e6-
96231b3b80d8
uint64_t mask = radix - 1;
APInt zero(tmp.getBitWidth(), 0);
while (tmp.ne(zero)) {
- unsigned digit = tmp.getZExtValue() & mask;
- tmp = tmp.lshr(shift);
+ unsigned digit = (tmp.isSingleWord() ? tmp.VAL : tmp.pVal[0]) & mask;
result.insert(insert_at, digits[digit]);
+ tmp = tmp.lshr(shift);
}
}
return result;