[PATCH] testsuite: Fix gcc.dg/vect/pr101145* tests [PR101145]

Richard Biener rguenther@suse.de
Tue Aug 31 12:47:36 GMT 2021


On Tue, 31 Aug 2021, Jakub Jelinek wrote:

> Hi!
> 
> I'm getting:
> FAIL: gcc.dg/vect/pr101145.c scan-tree-dump-times vect "vectorized 1 loops" 7
> FAIL: gcc.dg/vect/pr101145_1.c scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/pr101145_2.c scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/pr101145_3.c scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/pr101145.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 1 loops" 7
> FAIL: gcc.dg/vect/pr101145_1.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/pr101145_2.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 1 loops" 2
> FAIL: gcc.dg/vect/pr101145_3.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 1 loops" 2
> on i686-linux (or x86_64-linux with -m32/-mno-sse).
> The problem is that those tests use dg-options, which in */vect/ testsuite
> throws away all the carefully added default options to enable vectorization
> on each target (and which e.g. vect_int etc. effective targets rely on).
> The old way would be to name those tests gcc.dg/vect/O3-pr101145*,
> but we can also use dg-additional-options (which doesn't throw the default
> options, just appends to them) which is IMO better so that we don't have to
> rename the tests.
> 
> Tested on x86_64-linux and i686-linux, ok for trunk?

OK.

Richard.

> 2021-08-31  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR tree-optimization/102072
> 	* gcc.dg/vect/pr101145.c: Use dg-additional-options with just -O3
> 	instead of dg-options with -O3 -fdump-tree-vect-details.
> 	* gcc.dg/vect/pr101145_1.c: Likewise.
> 	* gcc.dg/vect/pr101145_2.c: Likewise.
> 	* gcc.dg/vect/pr101145_3.c: Likewise.
> 
> --- gcc/testsuite/gcc.dg/vect/pr101145.c.jj	2021-08-30 08:36:11.295515537 +0200
> +++ gcc/testsuite/gcc.dg/vect/pr101145.c	2021-08-31 14:04:35.691964573 +0200
> @@ -1,5 +1,5 @@
>  /* { dg-require-effective-target vect_int } */
> -/* { dg-options "-O3 -fdump-tree-vect-details" } */
> +/* { dg-additional-options "-O3" } */
>  #include <limits.h>
>  
>  unsigned __attribute__ ((noinline))
> --- gcc/testsuite/gcc.dg/vect/pr101145_1.c.jj	2021-08-30 08:36:11.295515537 +0200
> +++ gcc/testsuite/gcc.dg/vect/pr101145_1.c	2021-08-31 14:04:55.083691474 +0200
> @@ -1,5 +1,5 @@
>  /* { dg-require-effective-target vect_int } */
> -/* { dg-options "-O3 -fdump-tree-vect-details" } */
> +/* { dg-additional-options "-O3" } */
>  #define TYPE signed char
>  #define MIN -128
>  #define MAX 127
> --- gcc/testsuite/gcc.dg/vect/pr101145_2.c.jj	2021-08-30 08:36:11.295515537 +0200
> +++ gcc/testsuite/gcc.dg/vect/pr101145_2.c	2021-08-31 14:05:05.868539591 +0200
> @@ -1,5 +1,5 @@
>  /* { dg-require-effective-target vect_int } */
> -/* { dg-options "-O3 -fdump-tree-vect-details" } */
> +/* { dg-additional-options "-O3" } */
>  #define TYPE unsigned char
>  #define MIN 0
>  #define MAX 255
> --- gcc/testsuite/gcc.dg/vect/pr101145_3.c.jj	2021-08-30 08:36:11.295515537 +0200
> +++ gcc/testsuite/gcc.dg/vect/pr101145_3.c	2021-08-31 14:05:17.903370103 +0200
> @@ -1,5 +1,5 @@
>  /* { dg-require-effective-target vect_int } */
> -/* { dg-options "-O3 -fdump-tree-vect-details" } */
> +/* { dg-additional-options "-O3" } */
>  #define TYPE int *
>  #define MIN ((TYPE)0)
>  #define MAX ((TYPE)((long long)-1))
> 
> 	Jakub
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)


More information about the Gcc-patches mailing list