public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] math: Add a no-mathvec flag for sin (-0.0)
@ 2023-09-18 10:51 Wilco Dijkstra
0 siblings, 0 replies; only message in thread
From: Wilco Dijkstra @ 2023-09-18 10:51 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bc9b3a1f6a003f6456f717b590615ea98e2d6fb
commit 5bc9b3a1f6a003f6456f717b590615ea98e2d6fb
Author: Wilco Dijkstra <wilco.dijkstra@arm.com>
Date: Tue Aug 15 18:01:53 2023 +0100
math: Add a no-mathvec flag for sin (-0.0)
Add support for a no-mathvec flag to gen-auto-libm-tests.c.
Update input test sin (-0.0) to be skipped in vector math libraries and
regenerate testcases.
Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Diff:
---
math/auto-libm-test-in | 2 +-
math/auto-libm-test-out-sin | 50 ++++++++++++++++++++++-----------------------
math/gen-auto-libm-tests.c | 6 +++++-
math/gen-libm-test.py | 3 ++-
4 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index c400cafb4b..2672eb1f6a 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -7318,7 +7318,7 @@ pow 0x1.7ac7cp+5 23
pow -0x1.7ac7cp+5 23
sin 0
-sin -0
+sin -0 no-mathvec
sin pi/6
sin -pi/6
sin pi/2
diff --git a/math/auto-libm-test-out-sin b/math/auto-libm-test-out-sin
index f1d21b179c..e1f6845283 100644
--- a/math/auto-libm-test-out-sin
+++ b/math/auto-libm-test-out-sin
@@ -23,31 +23,31 @@ sin 0
= sin tonearest ibm128 0x0p+0 : 0x0p+0 : inexact-ok
= sin towardzero ibm128 0x0p+0 : 0x0p+0 : inexact-ok
= sin upward ibm128 0x0p+0 : 0x0p+0 : inexact-ok
-sin -0
-= sin downward binary32 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin tonearest binary32 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin towardzero binary32 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin upward binary32 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin downward binary64 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin tonearest binary64 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin towardzero binary64 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin upward binary64 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin downward intel96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin tonearest intel96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin towardzero intel96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin upward intel96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin downward m68k96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin tonearest m68k96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin towardzero m68k96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin upward m68k96 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin downward binary128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin tonearest binary128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin towardzero binary128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin upward binary128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin downward ibm128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin tonearest ibm128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin towardzero ibm128 -0x0p+0 : -0x0p+0 : inexact-ok
-= sin upward ibm128 -0x0p+0 : -0x0p+0 : inexact-ok
+sin -0 no-mathvec
+= sin downward binary32 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin tonearest binary32 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin towardzero binary32 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin upward binary32 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin downward binary64 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin tonearest binary64 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin towardzero binary64 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin upward binary64 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin downward intel96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin tonearest intel96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin towardzero intel96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin upward intel96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin downward m68k96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin tonearest m68k96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin towardzero m68k96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin upward m68k96 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin downward binary128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin tonearest binary128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin towardzero binary128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin upward binary128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin downward ibm128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin tonearest ibm128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin towardzero ibm128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
+= sin upward ibm128 -0x0p+0 : -0x0p+0 : no-mathvec inexact-ok
sin pi/6
= sin downward binary32 0x8.60a92p-4 : 0x8p-4 : inexact-ok
= sin tonearest binary32 0x8.60a92p-4 : 0x8p-4 : inexact-ok
diff --git a/math/gen-auto-libm-tests.c b/math/gen-auto-libm-tests.c
index 12aba4c8ee..f0ee6edba9 100644
--- a/math/gen-auto-libm-tests.c
+++ b/math/gen-auto-libm-tests.c
@@ -96,7 +96,8 @@
zero and infinite results should be ignored; "xfail" indicates the
test is disabled as expected to produce incorrect results,
"xfail-rounding" indicates the test is disabled only in rounding
- modes other than round-to-nearest. Otherwise, test flags are of
+ modes other than round-to-nearest; "no-mathvec" indicates the test
+ is disabled in vector math libraries. Otherwise, test flags are of
the form "spurious-<exception>" and "missing-<exception>", for any
exception ("overflow", "underflow", "inexact", "invalid",
"divbyzero"), "spurious-errno" and "missing-errno", to indicate
@@ -352,6 +353,7 @@ typedef enum
flag_missing_overflow,
flag_missing_underflow,
flag_missing_errno,
+ flag_no_mathvec,
num_input_flag_types,
flag_first_flag = 0,
flag_spurious_first = flag_spurious_divbyzero,
@@ -377,6 +379,7 @@ static const char *const input_flags[num_input_flag_types] =
"missing-overflow",
"missing-underflow",
"missing-errno",
+ "no-mathvec",
};
/* An input flag, possibly conditional. */
@@ -2049,6 +2052,7 @@ output_for_one_input_case (FILE *fp, const char *filename, test_function *tf,
{
case flag_ignore_zero_inf_sign:
case flag_xfail:
+ case flag_no_mathvec:
if (fprintf (fp, " %s%s",
input_flags[it->flags[i].type],
(it->flags[i].cond
diff --git a/math/gen-libm-test.py b/math/gen-libm-test.py
index 6ae78beb01..a573c3b8cb 100755
--- a/math/gen-libm-test.py
+++ b/math/gen-libm-test.py
@@ -93,7 +93,8 @@ BEAUTIFY_MAP = {'minus_zero': '-0',
# Flags in auto-libm-test-out that map directly to C flags.
FLAGS_SIMPLE = {'ignore-zero-inf-sign': 'IGNORE_ZERO_INF_SIGN',
- 'xfail': 'XFAIL_TEST'}
+ 'xfail': 'XFAIL_TEST',
+ 'no-mathvec': 'NO_TEST_MATHVEC'}
# Exceptions in auto-libm-test-out, and their corresponding C flags
# for being required, OK or required to be absent.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-18 10:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-18 10:51 [glibc] math: Add a no-mathvec flag for sin (-0.0) Wilco Dijkstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).