[libcxx-commits] [PATCH] D111671: [libcxx] [test] Generalize the conditions for testing bitcasts between long double, double and int128
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 13 12:56:18 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa03e17d4d941: [libcxx] [test] Generalize the conditions for testing bitcasts between long… (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111671/new/
https://reviews.llvm.org/D111671
Files:
libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
Index: libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
===================================================================
--- libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
+++ libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
@@ -227,16 +227,10 @@
test_roundtrip_through_nested_T<false>(i);
test_roundtrip_through_buffer<false>(i);
- // On arm64 on Apple platforms, long double is just double, so we don't
- // test against int128, but instead against double itself. Otherwise,
- // we test against int128 if we have those types available.
-#if defined(__aarch64__) && defined(__APPLE__)
-# define LONG_DOUBLE_IS_DOUBLE
-#endif
-
-#if defined(LONG_DOUBLE_IS_DOUBLE)
+#if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__
test_roundtrip_through<double, false>(i);
-#elif !defined(_LIBCPP_HAS_NO_INT128)
+#endif
+#if defined(__SIZEOF_INT128__) && __SIZEOF_LONG_DOUBLE__ == __SIZEOF_INT128__
test_roundtrip_through<__int128_t, false>(i);
test_roundtrip_through<__uint128_t, false>(i);
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111671.379505.patch
Type: text/x-patch
Size: 1079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211013/1e7d096a/attachment-0001.bin>
More information about the libcxx-commits
mailing list