Patchwork Fix test breakage, was: Add option for dumping to stderr (issue6190057)

login
register
mail settings
Submitter Sharad Singhai
Date Oct. 1, 2012, 11:31 p.m.
Message ID <CAKxPW67XEu0Bo_fKweq6OEUoC2003xtSg64HicLiazBveFy7Zg@mail.gmail.com>
Download mbox | patch
Permalink /patch/188365/
State New
Headers show

Comments

Sharad Singhai - Oct. 1, 2012, 11:31 p.m.
Here is a patch to fix test breakage caused by r191883. Bootstrapped
on x86_64 and tested with
make -k check RUNTESTFLAGS="--target_board=unix/\{,-m32\}".

Okay for trunk?

Thanks,
Sharad

2012-10-01  Sharad Singhai  <singhai@google.com>

        * tree-vect-stmts.c (vectorizable_operation): Add missing return.

testsuite/Changelog

        * gfortran.dg/vect/vect.exp: Change verbose vectorizor dump options
        to fix test failures caused by r191883.
        * gcc.dg/tree-ssa/gen-vect-11.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-32.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-25.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-26.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-11b.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-11c.c: Likewise.
        * gcc.dg/tree-ssa/gen-vect-28.c: Likewise.
        * testsuite/gcc.target/i386/vect-double-1.c: Fix test. Missing entry
        from r191883.
Richard Guenther - Oct. 2, 2012, 9:27 a.m.
On Tue, Oct 2, 2012 at 1:31 AM, Sharad Singhai <singhai@google.com> wrote:
> Here is a patch to fix test breakage caused by r191883. Bootstrapped
> on x86_64 and tested with
> make -k check RUNTESTFLAGS="--target_board=unix/\{,-m32\}".
>
> Okay for trunk?

Ok.

Thanks,
Richard.

> Thanks,
> Sharad
>
> 2012-10-01  Sharad Singhai  <singhai@google.com>
>
>         * tree-vect-stmts.c (vectorizable_operation): Add missing return.
>
> testsuite/Changelog
>
>         * gfortran.dg/vect/vect.exp: Change verbose vectorizor dump options
>         to fix test failures caused by r191883.
>         * gcc.dg/tree-ssa/gen-vect-11.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-32.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-25.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-26.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-11b.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-11c.c: Likewise.
>         * gcc.dg/tree-ssa/gen-vect-28.c: Likewise.
>         * testsuite/gcc.target/i386/vect-double-1.c: Fix test. Missing entry
>         from r191883.
>
>
> Index: testsuite/gfortran.dg/vect/vect.exp
> ===================================================================
> --- testsuite/gfortran.dg/vect/vect.exp (revision 191883)
> +++ testsuite/gfortran.dg/vect/vect.exp (working copy)
> @@ -26,7 +26,7 @@ set DEFAULT_VECTCFLAGS ""
>
>  # These flags are used for all targets.
>  lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fno-vect-cost-model" \
> -  "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
> +  "-fdump-tree-vect-details"
>
>  # If the target system supports vector instructions, the default action
>  # for a test is 'run', otherwise it's 'compile'.  Save current default.
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-11.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-11.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-11.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fwrapv -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fwrapv -fdump-tree-vect-stats -mno-sse" { target { i?86-*-*
> x86_64-*-* } } } */
> +/* { dg-options "-O2 -ftree-vectorize -fwrapv -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fwrapv
> -fdump-tree-vect-details -mno-sse" { target { i?86-*-* x86_64-*-* } }
> } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-2.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-2.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-2.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-32.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-32.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-32.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-25.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-25.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-25.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-11a.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-11a.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-26.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-26.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-26.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-11b.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-11b.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-11c.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-11c.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: testsuite/gcc.dg/tree-ssa/gen-vect-28.c
> ===================================================================
> --- testsuite/gcc.dg/tree-ssa/gen-vect-28.c (revision 191883)
> +++ testsuite/gcc.dg/tree-ssa/gen-vect-28.c (working copy)
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats" } */
> -/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
> -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
> */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
> -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>
>  #include <stdlib.h>
>
> Index: tree-vect-stmts.c
> ===================================================================
> --- tree-vect-stmts.c (revision 191883)
> +++ tree-vect-stmts.c (working copy)
> @@ -3657,6 +3657,7 @@ vectorizable_operation (gimple stmt, gimple_stmt_i
>        if (dump_kind_p (MSG_MISSED_OPTIMIZATION))
>          dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
>                           "not worthwhile without SIMD support.");
> +      return false;
>      }
>
>    if (!vec_stmt) /* transformation not required.  */

Patch

Index: testsuite/gfortran.dg/vect/vect.exp
===================================================================
--- testsuite/gfortran.dg/vect/vect.exp (revision 191883)
+++ testsuite/gfortran.dg/vect/vect.exp (working copy)
@@ -26,7 +26,7 @@  set DEFAULT_VECTCFLAGS ""

 # These flags are used for all targets.
 lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fno-vect-cost-model" \
-  "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
+  "-fdump-tree-vect-details"

 # If the target system supports vector instructions, the default action
 # for a test is 'run', otherwise it's 'compile'.  Save current default.
Index: testsuite/gcc.dg/tree-ssa/gen-vect-11.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-11.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fwrapv -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fwrapv -fdump-tree-vect-stats -mno-sse" { target { i?86-*-*
x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fwrapv -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fwrapv
-fdump-tree-vect-details -mno-sse" { target { i?86-*-* x86_64-*-* } }
} */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-2.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-2.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-2.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-32.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-32.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-32.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-25.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-25.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-25.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-11a.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11a.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-26.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-26.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-26.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-11b.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11b.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-11c.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11c.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: testsuite/gcc.dg/tree-ssa/gen-vect-28.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/gen-vect-28.c (revision 191883)
+++ testsuite/gcc.dg/tree-ssa/gen-vect-28.c (working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4
-fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } }
*/
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details
-mno-sse" { target { i?86-*-* x86_64-*-* } } } */

 #include <stdlib.h>

Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c (revision 191883)
+++ tree-vect-stmts.c (working copy)
@@ -3657,6 +3657,7 @@  vectorizable_operation (gimple stmt, gimple_stmt_i
       if (dump_kind_p (MSG_MISSED_OPTIMIZATION))
         dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                          "not worthwhile without SIMD support.");
+      return false;
     }

   if (!vec_stmt) /* transformation not required.  */