]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
testsuite: Fix up vect-simd-clone1[678]*.c tests [PR108898]
authorJakub Jelinek <jakub@redhat.com>
Tue, 21 Mar 2023 12:28:50 +0000 (13:28 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 21 Mar 2023 12:28:50 +0000 (13:28 +0100)
As mentioned in the PR, vect-simd-clone-1[678]{,f}.c tests FAIL on
x86_64-linux with -m64/-march=cascadelake or -m32/-march=cascadelake,
there are 3 matches for the calls rather than expected two.
As suggested by Richi, this patch changes those tests to use
--param vect-epilogues-nomask=0 such that it is more predictable on how
many calls will show up.  In the non-[a-f] suffixed tests, the
scan-tree-dump-times patterns were expecting 2 for non-aarch64 and 3 for
aarch64, which is a puzzle for me, because vect_simd_clones effective
target is apparently never true on aarch64 (just on x86 in some cases and
on amdgcn; perhaps something to change for GCC14, but I guess too late
for stage4).  That said, I have looked at aarch64 dumps and see only 2
calls with --param vect-epilogues-nomask=0 and 3 with --param
vect-epilogues-nomask=1 or without it, so I have tweaked those to always
expect the same thing.  Another thing is some tests uselessly had
-fdump-tree-optimized in dg-options even when they don't scan anything
there.

Tested on x86_64-linux with
make -j32 -k check-gcc RUNTESTFLAGS="vect.exp=gcc.dg/vect/vect-simd-clone-*.c \
--target_board='unix{-m64/-march=x86-64,-m64/-march=cascadelake,-m32/-march=i686,-m32/-march=cascadelake}'"
and aarch64-linux (where all tests are UNSUPPORTED before/after).

2023-03-21  Jakub Jelinek  <jakub@redhat.com>

PR testsuite/108898
* gcc.dg/vect/vect-simd-clone-16.c: Add --param vect-epilogues-nomask=0
to dg-additional-options.  Always expect just 2 foo.simdclone calls.
* gcc.dg/vect/vect-simd-clone-16f.c: Add
--param vect-epilogues-nomask=0 to dg-additional-options.
* gcc.dg/vect/vect-simd-clone-17.c: Likewise.  Always expect just 2
foo.simdclone calls.
* gcc.dg/vect/vect-simd-clone-17d.c: Remove -fdump-tree-optimized from
dg-additional-options.
* gcc.dg/vect/vect-simd-clone-17e.c: Likewise.
* gcc.dg/vect/vect-simd-clone-17f.c: Likewise.  Add
--param vect-epilogues-nomask=0 to dg-additional-options.
* gcc.dg/vect/vect-simd-clone-18.c: Add --param vect-epilogues-nomask=0
to dg-additional-options.  Always expect just 2 foo.simdclone calls.
* gcc.dg/vect/vect-simd-clone-18f.c: Add
--param vect-epilogues-nomask=0 to dg-additional-options.

gcc/testsuite/gcc.dg/vect/vect-simd-clone-16.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-16f.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-17.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-17d.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-17e.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-17f.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-18.c
gcc/testsuite/gcc.dg/vect/vect-simd-clone-18f.c

index ce9a6dad1b7882665a2e97e1eb327268f0fbe8e2..36c0a977b65306fc646a7f848b7fe524420ee33f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 /* Test that simd inbranch clones work correctly.  */
@@ -82,8 +82,7 @@ main ()
 
 /* Ensure the the in-branch simd clones are used on targets that support them.
    Some targets use another call for the epilogue loops.  */
-/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 3 "vect" { target aarch64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" } } */
 
 /* The LTO test produces two dump files and we scan the wrong one.  */
 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
index f42ac082678b2ce7b69ee5117653c30c21d47b52..171bbbb38bb014053e95ed4b4ef4bfc63e9984c6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 #define TYPE __INT64_TYPE__
index 756225e4306f16c745e7ec6b119804e803084ffe..6616ca6a74af82012709c299b938e9de879f795b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 /* Test that simd inbranch clones work correctly.  */
@@ -82,8 +82,7 @@ main ()
 
 /* Ensure the the in-branch simd clones are used on targets that support them.
    Some targets use another call for the epilogue loops.  */
-/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 3 "vect" { target aarch64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" } } */
 
 /* The LTO test produces two dump files and we scan the wrong one.  */
 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
index d38bde6d85ea02c917bdb6a2ff094e14b39217bf..8a7e1e912f8986cd3a4e5295bb3be7a3b5c8eddf 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */
+/* { dg-additional-options "-fopenmp-simd" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 #define TYPE char
index f2a428c62c1cd10eb0e9d79d39edeadfda8b8fd1..3b4da3d1a5f208b83316ab0c0da7bb0e5a87be0c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */
+/* { dg-additional-options "-fopenmp-simd" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 #define TYPE double
index cd05dec9632a130cbc917369278c452c3ac90b58..9e4b954681887da31d719dcf1b8216b0c15b395e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd -fdump-tree-optimized" } */
+/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 #define TYPE __INT64_TYPE__
index febf9fdf85ee0be63f242311f402bf377386a1e7..20f760378800729e1b9d4cf163b55016545349cb 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 /* Test that simd inbranch clones work correctly.  */
@@ -82,8 +82,7 @@ main ()
 
 /* Ensure the the in-branch simd clones are used on targets that support them.
    Some targets use another call for the epilogue loops.  */
-/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 3 "vect" { target aarch64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times {[\n\r] [^\n]* = foo\.simdclone} 2 "vect" } } */
 
 /* The LTO test produces two dump files and we scan the wrong one.  */
 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
index 09ee7ff60fdb19c4d460a08494b5e354b413ba1d..5907e87de1395394678600515935057e0a5e4ab2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-require-effective-target vect_simd_clones } */
-/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-fopenmp-simd --param vect-epilogues-nomask=0" } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
 #define TYPE __INT64_TYPE__