The following makes -fwrapv explicit.

        * gcc.dg/vect/vect.exp: Remove special-casing of tests
        named wrapv-*
        * gcc.dg/vect/wrapv-vect-7.c: Add dg-additional-options -fwrapv.
        * gcc.dg/vect/wrapv-vect-reduc-2char.c: Likewise.
        * gcc.dg/vect/wrapv-vect-reduc-2short.c: Likewise.
        * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
        * gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c: Likewise.
---
 gcc/testsuite/gcc.dg/vect/vect.exp            | 21 +++++++------------
 gcc/testsuite/gcc.dg/vect/wrapv-vect-7.c      |  1 +
 .../gcc.dg/vect/wrapv-vect-reduc-2char.c      |  1 +
 .../gcc.dg/vect/wrapv-vect-reduc-2short.c     |  1 +
 .../gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c    |  1 +
 .../gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c |  1 +
 6 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp 
b/gcc/testsuite/gcc.dg/vect/vect.exp
index eddebf53c7f..14c6168f6ee 100644
--- a/gcc/testsuite/gcc.dg/vect/vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/vect.exp
@@ -112,6 +112,13 @@ foreach flags $VECT_ADDITIONAL_FLAGS {
     et-dg-runtest dg-runtest [lsort \
        [glob -nocomplain $srcdir/$subdir/fast-math-\[ipsvc\]*.\[cS\]]] \
        $flags $DEFAULT_VECTCFLAGS
+    et-dg-runtest dg-runtest [lsort \
+       [glob -nocomplain $srcdir/$subdir/wrapv-*.\[cS\]]] \
+       $flags $DEFAULT_VECTCFLAGS
+
+    et-dg-runtest dg-runtest [lsort \
+       [glob -nocomplain $srcdir/$subdir/fast-math-bb-slp-*.\[cS\]]] \
+       $flags $VECT_SLP_CFLAGS
     et-dg-runtest dg-runtest [lsort \
        [glob -nocomplain $srcdir/$subdir/bb-slp*.\[cS\]]] \
        $flags $VECT_SLP_CFLAGS
@@ -122,20 +129,6 @@ global SAVED_DEFAULT_VECTCFLAGS
 set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
 set SAVED_VECT_SLP_CFLAGS $VECT_SLP_CFLAGS
 
-# -ffast-math SLP tests
-set VECT_SLP_CFLAGS $SAVED_VECT_SLP_CFLAGS
-lappend VECT_SLP_CFLAGS "-ffast-math"
-et-dg-runtest dg-runtest [lsort \
-       [glob -nocomplain $srcdir/$subdir/fast-math-bb-slp-*.\[cS\]]] \
-       "" $VECT_SLP_CFLAGS
-
-# -fwrapv tests
-set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
-lappend DEFAULT_VECTCFLAGS "-fwrapv"
-et-dg-runtest dg-runtest [lsort \
-       [glob -nocomplain $srcdir/$subdir/wrapv-*.\[cS\]]] \
-       "" $DEFAULT_VECTCFLAGS
-
 # -ftrapv tests
 set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
 lappend DEFAULT_VECTCFLAGS "-ftrapv"
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-7.c 
b/gcc/testsuite/gcc.dg/vect/wrapv-vect-7.c
index 414bd9d3e12..2a557f697e1 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-7.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-7.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fwrapv" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c 
b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c
index 556c2a06dc5..0ee9178025e 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2char.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fwrapv" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c 
b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c
index f9142173b25..aadc9c37da3 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-2short.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fwrapv" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c 
b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
index 72080af5923..920374d4263 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fwrapv" } */
 /* Disabling epilogues until we find a better way to deal with scans.  */
 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c 
b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c
index e3c33cff7e1..be0447c7b10 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fwrapv" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
-- 
2.43.0

Reply via email to