]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: Add a no-mathvec flag for sin (-0.0)
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Tue, 15 Aug 2023 17:01:53 +0000 (18:01 +0100)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Mon, 18 Sep 2023 10:50:23 +0000 (11:50 +0100)
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>
math/auto-libm-test-in
math/auto-libm-test-out-sin
math/gen-auto-libm-tests.c
math/gen-libm-test.py

index c400cafb4bd4715ac74e418ca0b442815b909ca0..2672eb1f6a2af813a77808060cf8d4efa7c7ffee 100644 (file)
@@ -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
index f1d21b179c955eb7761a8309241f57450237d981..e1f684528316dde592255e488e23382a6b8a019e 100644 (file)
@@ -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
index 12aba4c8ee62388d4df33becdacac548dbcee19c..f0ee6edba9fe0877b027cb43b61754b9dcb2b9f9 100644 (file)
@@ -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
index 6ae78beb01ce27a4f03f2e4b5ab75083c1914a81..a573c3b8cbc85bdb70eb03ebc320948be6e4f674 100755 (executable)
@@ -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.