From 74c87a363fd0e8586e46c04e113c49c6dc2a0bc8 Mon Sep 17 00:00:00 2001 From: Siva Chandra Date: Wed, 27 Jan 2021 10:29:30 -0800 Subject: [PATCH] [libc] Disable sqrtl_test on non-x86 platforms. The added comment explains why it has been disabled for now. We will enable back when we fix the problem. --- libc/test/src/math/CMakeLists.txt | 32 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt index 48f8902e3f59..e0c45b85185f 100644 --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -924,18 +924,26 @@ add_fp_unittest( libc.utils.FPUtil.fputil ) -add_fp_unittest( - sqrtl_test - NEED_MPFR - SUITE - libc_math_unittests - SRCS - sqrtl_test.cpp - DEPENDS - libc.include.math - libc.src.math.sqrtl - libc.utils.FPUtil.fputil -) +# The quad precision test for sqrt against MPFR currently suffers +# from insufficient precision in MPFR calculations leading to +# https://hal.archives-ouvertes.fr/hal-01091186/document. We will +# renable after fixing the precision issue. +if(${LIBC_TARGET_MACHINE} MATCHES "x86_64") + add_fp_unittest( + sqrtl_test + NEED_MPFR + SUITE + libc_math_unittests + SRCS + sqrtl_test.cpp + DEPENDS + libc.include.math + libc.src.math.sqrtl + libc.utils.FPUtil.fputil + ) +else() + message(STATUS "Skipping sqrtl_test") +endif() add_fp_unittest( remquof_test