projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
243fc3d
)
[libc][math] Fix broken aarch64 due to clz refactoring.
author
Kirill Okhotnikov
<okir@google.com>
Fri, 24 Jun 2022 21:59:26 +0000
(23:59 +0200)
committer
Kirill Okhotnikov
<okir@google.com>
Fri, 24 Jun 2022 21:59:26 +0000
(23:59 +0200)
libc/src/__support/FPUtil/generic/sqrt.h
patch
|
blob
|
history
diff --git
a/libc/src/__support/FPUtil/generic/sqrt.h
b/libc/src/__support/FPUtil/generic/sqrt.h
index
ed6b624
..
8761e86
100644
(file)
--- a/
libc/src/__support/FPUtil/generic/sqrt.h
+++ b/
libc/src/__support/FPUtil/generic/sqrt.h
@@
-51,8
+51,8
@@
inline void normalize<long double>(int &exponent, uint64_t &mantissa) {
template <>
inline void normalize<long double>(int &exponent, UInt128 &mantissa) {
const uint64_t hi_bits = static_cast<uint64_t>(mantissa >> 64);
- const int shift = hi_bits ? (clz(hi_bits) - 15)
- : (clz(static_cast<uint64_t>(mantissa)) + 49);
+ const int shift = hi_bits ? (
unsafe_
clz(hi_bits) - 15)
+ : (
unsafe_
clz(static_cast<uint64_t>(mantissa)) + 49);
exponent -= shift;
mantissa <<= shift;
}