This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH x86_64][BZ #20033] Use calls to finite scalar versions in vector log, pow, exp.
- From: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 27 Jul 2016 22:56:20 +0300
- Subject: Re: [PATCH x86_64][BZ #20033] Use calls to finite scalar versions in vector log, pow, exp.
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3sd6tPCyqxhKHERWtKswc5AYqyvc_mYjt7=miAuK5jJ0Q@mail.gmail.com> <alpine.DEB.2.20.1607201638070.12251@digraph.polyomino.org.uk> <CAMXFM3tMZp58=LeYT+Dd6hCCjrPm4eK-GUMxQkM4yCjT2-3dkg@mail.gmail.com> <alpine.DEB.2.20.1607252017180.16376@digraph.polyomino.org.uk>
2016-07-25 23:19 GMT+03:00 Joseph Myers <joseph@codesourcery.com>:
> On Mon, 25 Jul 2016, Andrew Senkevich wrote:
>
>> > No, such architecture conditionals on individual tests are not
>> > appropriate. Maybe you need a NO_TEST_VECTOR handled like NO_TEST_INLINE
>> > in enable_test.
>>
>> Is patch below Ok for trunk?
>
> No, I said handled like NO_TEST_INLINE. Exactly like NO_TEST_INLINE. No
> architecture conditionals, no #if, just an "if" conditional exactly
> corresponding to how NO_TEST_INLINE and NON_FINITE are handled (the
> NON_FINITE if is actually better to follow since it follows the glibc
> convention of avoiding implicit boolean conversion).
Do you mean the following change for math/libm-test.inc?
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 4ac7a0c..117057c 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),
--
WBR,
Andrew