mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Update libdivide to the latest master
This commit is contained in:
parent
c696354dd4
commit
c5cf7199d8
@ -290,10 +290,17 @@ static inline int32_t libdivide_count_leading_zeros32(uint32_t val) {
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
int32_t result = 0;
|
||||
uint32_t hi = 1U << 31;
|
||||
for (; ~val & hi; hi >>= 1) {
|
||||
result++;
|
||||
if (val == 0)
|
||||
return 32;
|
||||
int32_t result = 8;
|
||||
uint32_t hi = 0xFFU << 24;
|
||||
while ((val & hi) == 0) {
|
||||
hi >>= 8;
|
||||
result += 8;
|
||||
}
|
||||
while (val & hi) {
|
||||
result -= 1;
|
||||
hi <<= 1;
|
||||
}
|
||||
return result;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user