aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Okhotnikov <okir@google.com>2022-06-24 23:59:26 +0200
committerKirill Okhotnikov <okir@google.com>2022-06-24 23:59:26 +0200
commit349fee08d53734ea6530a56b931afdf026b5528c (patch)
tree45790509f46711c36fc53599ed121dbcaab16895
parent243fc3daf675ea047bb80c21c62d24a331da8b16 (diff)
downloadllvm-349fee08d53734ea6530a56b931afdf026b5528c.zip
llvm-349fee08d53734ea6530a56b931afdf026b5528c.tar.gz
llvm-349fee08d53734ea6530a56b931afdf026b5528c.tar.bz2
[libc][math] Fix broken aarch64 due to clz refactoring.
-rw-r--r--libc/src/__support/FPUtil/generic/sqrt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/__support/FPUtil/generic/sqrt.h b/libc/src/__support/FPUtil/generic/sqrt.h
index ed6b624..8761e86 100644
--- 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;
}