mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
[libc] Add missing cast in fputil sqrt code
A cast is necessary to avoid implicit narrowing warnings when those are enabled. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D146886
This commit is contained in:
@@ -21,9 +21,9 @@ namespace fputil {
|
||||
namespace x86 {
|
||||
|
||||
LIBC_INLINE void normalize(int &exponent, UInt128 &mantissa) {
|
||||
const int shift =
|
||||
const unsigned int shift = static_cast<unsigned int>(
|
||||
unsafe_clz(static_cast<uint64_t>(mantissa)) -
|
||||
(8 * sizeof(uint64_t) - 1 - MantissaWidth<long double>::VALUE);
|
||||
(8 * sizeof(uint64_t) - 1 - MantissaWidth<long double>::VALUE));
|
||||
exponent -= shift;
|
||||
mantissa <<= shift;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user