From: Christoph Müllner Date: Fri, 20 Dec 2024 15:06:07 +0000 (+0100) Subject: testsuite: tree-ssa: Fix i686/-m32 fails for vector-*.c tests X-Git-Tag: basepoints/gcc-16~3156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dc35fe5a095d9205da80cba976357cb71f8cb88;p=thirdparty%2Fgcc.git testsuite: tree-ssa: Fix i686/-m32 fails for vector-*.c tests 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 --- diff --git a/gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c b/gcc/testsuite/gcc.dg/tree-ssa/satd-hadamard.c index 6042378f1650..b0d4f4c4a831 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 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-10.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-10.c index bb1ed92dc90a..4a095a1b54ae 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 e4102d318d29..b1f0c74152a4 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 ba9a0187c106..b7e0a529c288 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 1aa2ef99c3c2..2fb2be6e2a55 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))));