aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/APInt.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index 031bbb8882..a60bff3306 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -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 {