Skip to content

Commit ee41748

Browse files
committed
Add comments regarding potential slow down
1 parent d4a6b4f commit ee41748

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libc/src/__support/FPUtil/cast.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
namespace LIBC_NAMESPACE::fputil {
2020

21+
// TODO: Add optimization for known good targets with fast
22+
// float to float16 conversion: https://github.com/llvm/llvm-project/issues/133517
2123
template <typename OutType, typename InType>
2224
LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_floating_point_v<OutType> &&
2325
cpp::is_floating_point_v<InType>,

libc/src/math/generic/hypotf16.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
namespace LIBC_NAMESPACE_DECL {
2020

21+
// For targets where conversion from float to float16 has to be
22+
// emulated, fputil::hypot<float16> is faster
2123
LLVM_LIBC_FUNCTION(float16, hypotf16, (float16 x, float16 y)) {
2224
using FloatBits = fputil::FPBits<float>;
2325
using FPBits = fputil::FPBits<float16>;

0 commit comments

Comments
 (0)