[all-commits] [llvm/llvm-project] 5230e3: Revert "[libc++][math] Fix undue overflowing of `s...
PaulXiCao via All-commits
all-commits at lists.llvm.org
Tue Aug 13 00:07:32 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 5230e327a10023b4349474bd89d67f8a1764c648
https://github.com/llvm/llvm-project/commit/5230e327a10023b4349474bd89d67f8a1764c648
Author: Mitch Phillips <mitchp at google.com>
Date: 2024-08-13 (Tue, 13 Aug 2024)
Changed paths:
M libcxx/include/__math/hypot.h
M libcxx/include/cmath
M libcxx/test/libcxx/transitive_includes/cxx17.csv
M libcxx/test/libcxx/transitive_includes/cxx20.csv
M libcxx/test/libcxx/transitive_includes/cxx23.csv
M libcxx/test/libcxx/transitive_includes/cxx26.csv
M libcxx/test/std/numerics/c.math/cmath.pass.cpp
M libcxx/test/support/fp_compare.h
Log Message:
-----------
Revert "[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#93350)"
This reverts commit 9628777479a970db5d0c2d0b456dac6633864760.
More details in https://github.com/llvm/llvm-project/pull/93350, but
this broke the PowerPC sanitizer bots.
(cherry picked from commit 1031335f2ee1879737576fde3a3425ce0046e773)
Commit: 2c29bd3d4cdf8b81ebeb8e562fbc91f63a90a1ad
https://github.com/llvm/llvm-project/commit/2c29bd3d4cdf8b81ebeb8e562fbc91f63a90a1ad
Author: PaulXiCao <paulxicao7 at gmail.com>
Date: 2024-08-13 (Tue, 13 Aug 2024)
Changed paths:
M libcxx/include/__math/hypot.h
M libcxx/include/cmath
M libcxx/test/libcxx/transitive_includes/cxx03.csv
M libcxx/test/libcxx/transitive_includes/cxx11.csv
M libcxx/test/libcxx/transitive_includes/cxx14.csv
M libcxx/test/libcxx/transitive_includes/cxx17.csv
M libcxx/test/libcxx/transitive_includes/cxx20.csv
M libcxx/test/libcxx/transitive_includes/cxx23.csv
M libcxx/test/libcxx/transitive_includes/cxx26.csv
M libcxx/test/std/numerics/c.math/cmath.pass.cpp
M libcxx/test/support/fp_compare.h
Log Message:
-----------
[libc++][math] Fix undue overflowing of `std::hypot(x,y,z)` (#100820)
This is in relation to mr #93350. It was merged to main, but reverted
because of failing sanitizer builds on PowerPC.
The fix includes replacing the hard-coded threshold constants (e.g.
`__overflow_threshold`) for different floating-point sizes by a general
computation using `std::ldexp`. Thus, it should now work for all architectures.
This has the drawback of not being `constexpr` anymore as `std::ldexp`
is not implemented as `constexpr` (even though the standard mandates it
for C++23).
Closes #92782
(cherry picked from commit 72825fde03aab3ce9eba2635b872144d1fb6b6b2)
Compare: https://github.com/llvm/llvm-project/compare/955fe3f1ef19...2c29bd3d4cdf
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list