FAILs have been reported for several tree-ssa vector-*.c tests on i686-linux or on x86_64-linux with -m32. This patch addresses these fails by setting the necessary -msse2 flags.
This patch also streamlines all tests to use dg-options instead of dg-additional-options. This is in line with most other tests in gcc.dg/tree-ssa. Tested with the following board config in RUNTESTFLAGS: --target_board=unix\{-m64,-m32,-m32/-mno-mmx/-mno-sse} gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/satd-hadamard.c: Rename dg-additional-options to dg-options. * gcc.dg/tree-ssa/vector-10.c: Rename dg-additional-options to dg-options and add -msse2 to it. * gcc.dg/tree-ssa/vector-11.c: Likewise. * gcc.dg/tree-ssa/vector-8.c: Rename dg-additional-options to dg-options. * gcc.dg/tree-ssa/vector-9.c: Likewise. Signed-off-by: Christoph Müllner <christoph.muell...@vrull.eu> --- gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/vector-10.c | 5 +++-- gcc/testsuite/gcc.dg/tree-ssa/vector-11.c | 6 ++---- gcc/testsuite/gcc.dg/tree-ssa/vector-8.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/vector-9.c | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c b/gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c index 6042378f165..b0d4f4c4a83 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O3 -fdump-tree-forwprop4-details" } */ +/* { dg-options "-O3 -fdump-tree-forwprop4-details" } */ /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */ #include <stdint.h> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-10.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-10.c index bb1ed92dc90..4a095a1b54a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vector-10.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-10.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O3 -fdump-tree-forwprop1-details -Wno-psabi" } */ +/* { dg-options "-O3 -fdump-tree-forwprop1-details -Wno-psabi" } */ +/* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */ typedef int vec __attribute__((vector_size (4 * sizeof (int)))); @@ -105,7 +106,7 @@ void f4 (vec *p_v_in_1, vec *p_v_out_1, vec *p_v_out_2) v_y = v_1 - v_2; v_out_1 = __builtin_shuffle (v_x, v_y, sel); - /* Won't merge because of dependency. */ + /* Won't blend because of dependency. */ v_in_2 = foo (v_out_1); /* Second vec perm sequence. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-11.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-11.c index e4102d318d2..b1f0c74152a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vector-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-11.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O3 -fdump-tree-forwprop1-details -Wno-psabi" } */ +/* { dg-options "-O3 -fdump-tree-forwprop1-details -Wno-psabi" } */ +/* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */ typedef int vec __attribute__((vector_size (4 * sizeof (int)))); @@ -27,9 +28,6 @@ void f1 (vec *p_v_in, vec *p_v_out_1, vec *p_v_out_2) v_y = v_1 + v_2; v_out_2 = __builtin_shuffle (v_y, v_x, sel); - /* Won't blend because the narrowed sequence - utilizes three of the four lanes. */ - *p_v_out_1 = v_out_1; *p_v_out_2 = v_out_2; } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-8.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-8.c index ba9a0187c10..b7e0a529c28 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vector-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-8.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O3 -fdump-tree-forwprop1-details" } */ +/* { dg-options "-O3 -fdump-tree-forwprop1-details" } */ /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */ typedef int vec __attribute__((vector_size (4 * sizeof (int)))); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-9.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-9.c index 1aa2ef99c3c..2fb2be6e2a5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vector-9.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-9.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O3 -fdump-tree-forwprop1-details" } */ +/* { dg-options "-O3 -fdump-tree-forwprop1-details" } */ /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */ typedef int vec __attribute__((vector_size (4 * sizeof (int)))); -- 2.47.1