This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix up gen-vect-32.c testcase (PR testsuite/58776)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>, Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Jan 2014 15:13:34 +0100
- Subject: [PATCH] Fix up gen-vect-32.c testcase (PR testsuite/58776)
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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.
--- 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