diff --git a/libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp b/libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp @@ -227,16 +227,10 @@ test_roundtrip_through_nested_T(i); test_roundtrip_through_buffer(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(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