[PATCH] Check number of iterations for test cases pr101145

Richard Biener rguenther@suse.de
Tue Nov 2 13:20:47 GMT 2021


On Mon, 1 Nov 2021, Jiufu Guo wrote:

> PR101145 is supporting if the number of iterations can be calculated
> for the 'until wrap' condition.  Current test cases are checking if
> the loop can be vectorized, if a loop can be vectorized then the number
> of interations is known.  While it would be better to check the loop's
> number of iterations directly.  This patch updates the test cases
> accordingly.
> 
> Bootstrap and regtest pass on ppc,ppc64le and x86_64.
> Is this ok for trunk?

Not sure - the motivation was to make the loop vectorizable so
a vectorized check is strictly more powerful.  What's the problem
with the existing test?

Richard.

> BR,
> Jiufu
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/pr101145_1.c: Update case.
> 	* gcc.dg/vect/pr101145_2.c: Update case.
> 	* gcc.dg/vect/pr101145_3.c: Update case.
> 
> ---
>  gcc/testsuite/gcc.dg/vect/pr101145_1.c | 2 +-
>  gcc/testsuite/gcc.dg/vect/pr101145_2.c | 2 +-
>  gcc/testsuite/gcc.dg/vect/pr101145_3.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_1.c b/gcc/testsuite/gcc.dg/vect/pr101145_1.c
> index 9332b2c4257..13a89fa6863 100644
> --- a/gcc/testsuite/gcc.dg/vect/pr101145_1.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr101145_1.c
> @@ -10,4 +10,4 @@
>  
>  #include "pr101145.inc"
>  
> -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
> +/* { dg-final { scan-tree-dump-times "Symbolic number of iterations is" 2 "vect" } } */
> diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_2.c b/gcc/testsuite/gcc.dg/vect/pr101145_2.c
> index fa2c6be689a..5265491b98d 100644
> --- a/gcc/testsuite/gcc.dg/vect/pr101145_2.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr101145_2.c
> @@ -10,4 +10,4 @@
>  
>  #include "pr101145.inc"
>  
> -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
> +/* { dg-final { scan-tree-dump-times "Symbolic number of iterations is" 2 "vect" } } */
> diff --git a/gcc/testsuite/gcc.dg/vect/pr101145_3.c b/gcc/testsuite/gcc.dg/vect/pr101145_3.c
> index 9f43c82593f..ffda26cf0bc 100644
> --- a/gcc/testsuite/gcc.dg/vect/pr101145_3.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr101145_3.c
> @@ -10,4 +10,4 @@
>  
>  #include "pr101145.inc"
>  
> -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
> +/* { dg-final { scan-tree-dump-times "Symbolic number of iterations is" 2 "vect" } } */
> 

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


More information about the Gcc-patches mailing list