mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Replace a hand-coded leading one counting loop with the magic from MathExtras.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152545 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
57a76605f0
commit
38d2ff4ac0
@ -723,14 +723,7 @@ unsigned APInt::countLeadingZerosSlowCase() const {
|
||||
}
|
||||
|
||||
static unsigned countLeadingOnes_64(uint64_t V, unsigned skip) {
|
||||
unsigned Count = 0;
|
||||
if (skip)
|
||||
V <<= skip;
|
||||
while (V && (V & (1ULL << 63))) {
|
||||
Count++;
|
||||
V <<= 1;
|
||||
}
|
||||
return Count;
|
||||
return CountLeadingOnes_64(V << skip);
|
||||
}
|
||||
|
||||
unsigned APInt::countLeadingOnes() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user