Skip to content

Commit 6a125af

Browse files
authored
[libc] Fix DyadicFloat::generic_as() using FPBits<float16> not FPBits<T> (llvm#139899)
1 parent 7a9fd62 commit 6a125af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/__support/FPUtil/dyadic_float.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ template <size_t Bits> struct DyadicFloat {
175175
LIBC_INLINE constexpr cpp::enable_if_t<
176176
cpp::is_floating_point_v<T> && (FPBits<T>::FRACTION_LEN < Bits), T>
177177
generic_as() const {
178-
using FPBits = FPBits<float16>;
178+
using FPBits = FPBits<T>;
179179
using StorageType = typename FPBits::StorageType;
180180

181181
constexpr int EXTRA_FRACTION_LEN = Bits - 1 - FPBits::FRACTION_LEN;

0 commit comments

Comments
 (0)