summaryrefslogtreecommitdiff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorAndrew Senkevich <andrew.senkevich@intel.com>2016-08-02 16:35:25 +0300
committerAndrew Senkevich <andrew.senkevich@intel.com>2016-08-02 16:35:25 +0300
commit533f9bebf969060e64c66681e275c03d6e49fcc9 (patch)
tree500694859540a9f7583760f1a99af70044ca726b /math/libm-test.inc
parentf88aab5d508c13ae4a88124e65773d7d827cd47b (diff)
downloadglibc-533f9bebf969060e64c66681e275c03d6e49fcc9.tar.gz
x86_64: Call finite scalar versions in vectorized log, pow, exp (bz #20033).
Vector math functions require -ffast-math which sets -ffinite-math-only, so it is needed to call finite scalar versions (which are called from vector functions in some cases). Since finite version of pow() returns qNaN instead of 1.0 for several inputs, those inputs are excluded for tests of vector math functions. [BZ #20033] * sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core_sse4.S: Call finite version. * sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core_avx2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_log2_core_sse4.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_log4_core_avx2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core_sse4.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core_avx2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core_sse4.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core_avx2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core_sse4.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core_avx2.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core_sse4.S: Likewise. * sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core_avx2.S: Likewise. * sysdeps/x86_64/fpu/svml_d_exp2_core.S: Likewise. * sysdeps/x86_64/fpu/svml_d_log2_core.S: Likewise. * sysdeps/x86_64/fpu/svml_d_pow2_core.S: Likewise. * sysdeps/x86_64/fpu/svml_s_expf4_core.S: Likewise. * sysdeps/x86_64/fpu/svml_s_logf4_core.S: Likewise. * sysdeps/x86_64/fpu/svml_s_powf4_core.S: Likewise. * math/libm-test.inc (pow_test_data): Exclude tests for qNaN in power zero.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 4ac7a0c80d..117057c315 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -179,6 +179,7 @@
#define IGNORE_RESULT 0x20000
#define NON_FINITE 0x40000
#define TEST_SNAN 0x80000
+#define NO_TEST_MATHVEC 0x100000
#define __CONCATX(a,b) __CONCAT(a,b)
@@ -1056,6 +1057,9 @@ enable_test (int exceptions)
return 0;
if (!SNAN_TESTS (FLOAT) && (exceptions & TEST_SNAN) != 0)
return 0;
+ if (TEST_MATHVEC && (exceptions & NO_TEST_MATHVEC) != 0)
+ return 0;
+
return 1;
}
@@ -10631,10 +10635,10 @@ nexttoward_test (void)
static const struct test_ff_f_data pow_test_data[] =
{
- TEST_ff_f (pow, qnan_value, 0, 1, ERRNO_UNCHANGED),
- TEST_ff_f (pow, -qnan_value, 0, 1, ERRNO_UNCHANGED),
- TEST_ff_f (pow, qnan_value, minus_zero, 1, ERRNO_UNCHANGED),
- TEST_ff_f (pow, -qnan_value, minus_zero, 1, ERRNO_UNCHANGED),
+ TEST_ff_f (pow, qnan_value, 0, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC),
+ TEST_ff_f (pow, -qnan_value, 0, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC),
+ TEST_ff_f (pow, qnan_value, minus_zero, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC),
+ TEST_ff_f (pow, -qnan_value, minus_zero, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC),
TEST_ff_f (pow, 1.1L, plus_infty, plus_infty, ERRNO_UNCHANGED|NO_TEST_INLINE),
TEST_ff_f (pow, plus_infty, plus_infty, plus_infty, ERRNO_UNCHANGED|NO_TEST_INLINE),