[libc-commits] [PATCH] D150906: [libc] Add a str() method to FPBits which returns a string representation.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu May 18 23:20:23 PDT 2023
sivachandra added inline comments.
================
Comment at: libc/test/src/__support/FPUtil/fpbits_test.cpp:124
+
+TEST(LlvmLibcFPBitsTest, LongDoubleType) {
+ if constexpr (sizeof(long double) == sizeof(double))
----------------
lntue wrote:
> How about having 2 separate long double tests `X86LongDoubleType` and `QuadPrecisionLongDoubleType`? You can have them return early by testing:
> ```
> if constexpr( fputil::FloatProperties<long double>::MANTISSA_WIDTH != ... )
> return;
> ```
I have not done that exactly but separated out the x86 long double tests into a different test enabled only for x86. The reason I did not go with your approach is that, it would be weird to see `QuadPrecisionLongDoubleType` test passing on x86 (and also the other way round on non-x86).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150906/new/
https://reviews.llvm.org/D150906
More information about the libc-commits
mailing list