diff mbox

Fix up gen-vect-32.c testcase (PR testsuite/58776)

Message ID 20140117141333.GF892@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Jan. 17, 2014, 2:13 p.m. UTC
Hi!

For -O2 vectorization by default GCC 4.9 uses the cheap cost model,
which disallows e.g. peeling for alignment, but on strict alignment
targets the loop needs to be peeled for alignment, otherwise vectorization
isn't performed.

Fixed by just adding -fno-vect-cost-model to dg-options,
bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2014-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/58776
	* gcc.dg/tree-ssa-gen-vect-32.c: Add -fno-vect-cost-model to
	dg-options, use dg-additional-options for i?86/x86_64 to avoid
	option duplication.


	Jakub

Comments

Richard Biener Jan. 17, 2014, 2:39 p.m. UTC | #1
On Fri, 17 Jan 2014, Jakub Jelinek wrote:

> Hi!
> 
> For -O2 vectorization by default GCC 4.9 uses the cheap cost model,
> which disallows e.g. peeling for alignment, but on strict alignment
> targets the loop needs to be peeled for alignment, otherwise vectorization
> isn't performed.
> 
> Fixed by just adding -fno-vect-cost-model to dg-options,
> bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Ok.

Thanks,
Richard.

> 2014-01-17  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR testsuite/58776
> 	* gcc.dg/tree-ssa-gen-vect-32.c: Add -fno-vect-cost-model to
> 	dg-options, use dg-additional-options for i?86/x86_64 to avoid
> 	option duplication.
> 
> --- gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c.jj	2012-10-03 09:01:35.000000000 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c	2014-01-17 11:03:27.039224079 +0100
> @@ -1,6 +1,6 @@
>  /* { dg-do run { target vect_cmdline_needed } } */
> -/* { 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-*-* } } } */
> +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fno-vect-cost-model" } */
> +/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
>  
>  #include <stdlib.h>
>  
> 
> 	Jakub
> 
>
diff mbox

Patch

--- gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c.jj	2012-10-03 09:01:35.000000000 +0200
+++ gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c	2014-01-17 11:03:27.039224079 +0100
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target vect_cmdline_needed } } */
-/* { 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-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fno-vect-cost-model" } */
+/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
 
 #include <stdlib.h>