RE: [committed 6/6] amdgcn: vector testsuite tweaks

2022-10-28 Thread Thomas Schwinge
Hi Andrew!

On 2022-10-28T10:38:11+0200, "Stubbs, Andrew"  wrote:
>> -Original Message-
>> Looking into commit r13-3225-gbd9a05594d227cde79a67dc715bd9d82e9c464e9
>> "amdgcn: vector testsuite tweaks" for a moment, I also did wonder about
>> the following changes, because for 'vect_multiple_sizes' (for example,
>> x86_64-pc-linux-gnu) that seems to lose more specific testing;
>> previously: 'scan-tree-dump-times' exactly once, now: 'scan-tree-dump'
>> any number of times.  But I've no clue about that myself, so just
>> mentioning this, in case somebody else has an opinion.  ;-)
>
> When vect_multiple_sizes is true the number of times the pattern appears will 
> be greater that normal.  Most likely the pattern will appear once for each 
> vector size.  In the case of GCN, a pattern that normally appears 4 times now 
> appears 24 times.
>
> The alternative would be to have a whole set of patterns for each 
> configuration of each target that can have the multiple sizes.  That or 
> change the implementation of 'scan-tree-dump-times' to support expressions of 
> some kind, but even then the expressions would get hairy.

I guess my confusion is why this then hasn't already previously be
FAILing for example for x86_64-pc-linux-gnu, which also is
'vect_multiple_sizes'?  Anyway: "I've no clue about that myself".


Grüße
 Thomas
-
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955


RE: [committed 6/6] amdgcn: vector testsuite tweaks

2022-10-28 Thread Stubbs, Andrew
> -Original Message-
> Looking into commit r13-3225-gbd9a05594d227cde79a67dc715bd9d82e9c464e9
> "amdgcn: vector testsuite tweaks" for a moment, I also did wonder about
> the following changes, because for 'vect_multiple_sizes' (for example,
> x86_64-pc-linux-gnu) that seems to lose more specific testing;
> previously: 'scan-tree-dump-times' exactly once, now: 'scan-tree-dump'
> any number of times.  But I've no clue about that myself, so just
> mentioning this, in case somebody else has an opinion.  ;-)

When vect_multiple_sizes is true the number of times the pattern appears will 
be greater that normal.  Most likely the pattern will appear once for each 
vector size.  In the case of GCN, a pattern that normally appears 4 times now 
appears 24 times.

The alternative would be to have a whole set of patterns for each configuration 
of each target that can have the multiple sizes.  That or change the 
implementation of 'scan-tree-dump-times' to support expressions of some kind, 
but even then the expressions would get hairy.

Andrew


Re: [committed 6/6] amdgcn: vector testsuite tweaks

2022-10-28 Thread Thomas Schwinge
Hi!

On 2022-10-11T12:02:08+0100, Andrew Stubbs  wrote:
> The testsuite needs a few tweaks following my patches to add multiple vector
> sizes for amdgcn.

While 'grep'ping for some other GCN thing, this:

> --- a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
> +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
> @@ -46,5 +46,6 @@ int main ()
>  }
>
>  /* { dg-final { scan-tree-dump {(no need for alias check [^\n]* when VF is 
> 1|no alias between [^\n]* when [^\n]* is outside \(-16, 16\))} "vect" { 
> target vect_element_align } } } */
> -/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target 
> vect_element_align } } } */
> +/* { dg-final { scan-tree-dump-times "loop vectorized" 1 "vect" { target { 
> vect_element_align && !amdgcn-*-* } } } } */
> +/* { dg-final { scan-tree-dump-times "loop vectorized" 2 "vect" { target 
> amdgcn-*-* } } } */

... target selector expression '!amdgcn-*-*' occurred to me as dubious,
so I checked, and now pushed to master branch
commit 0607307768b66a90e27c5bc91a247acc938f070e
"Fix target selector syntax in 'gcc.dg/vect/bb-slp-cond-1.c'", see attached.

Cherry-picked pushed to devel/omp/gcc-12 branch
commit 5f4d2a15403d7231d7be673a9d633c0b4a22e19c
"Fix target selector syntax in 'gcc.dg/vect/bb-slp-cond-1.c'", see attached.


Looking into commit r13-3225-gbd9a05594d227cde79a67dc715bd9d82e9c464e9
"amdgcn: vector testsuite tweaks" for a moment, I also did wonder about
the following changes, because for 'vect_multiple_sizes' (for example,
x86_64-pc-linux-gnu) that seems to lose more specific testing;
previously: 'scan-tree-dump-times' exactly once, now: 'scan-tree-dump'
any number of times.  But I've no clue about that myself, so just
mentioning this, in case somebody else has an opinion.  ;-)

>   * gcc.dg/vect/no-vfa-vect-depend-2.c: Change expectations for multiple
>   vector sizes.
>   * gcc.dg/vect/pr33953.c: Likewise.
>   * gcc.dg/vect/pr65947-12.c: Likewise.
>   * gcc.dg/vect/pr65947-13.c: Likewise.
>   * gcc.dg/vect/pr80631-2.c: Likewise.
>   * gcc.dg/vect/slp-reduc-4.c: Likewise.
>   * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.

> --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
> +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
> @@ -51,4 +51,5 @@ int main (void)
>  }
>
>  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { 
> vect_no_align && { ! vect_hw_misalign } } } } } */
> -/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" 
> } } */
> +/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" 
> { target { ! vect_multiple_sizes } } } } */
> +/* { dg-final { scan-tree-dump "dependence distance negative" "vect" { 
> target vect_multiple_sizes } } } */

> --- a/gcc/testsuite/gcc.dg/vect/pr33953.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr33953.c
> @@ -29,6 +29,7 @@ void blockmove_NtoN_blend_noremap32 (const UINT32 *srcdata, 
> int srcwidth,
>  }
>
>  /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { 
> vect_no_align && { ! vect_hw_misalign } } } } } */
> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" 
> { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
> +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" 
> { target { ! vect_multiple_sizes } xfail { vect_no_align && { ! 
> vect_hw_misalign } } } } } */
> +/* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target 
> vect_multiple_sizes xfail { vect_no_align && { ! vect_hw_misalign } } } } } */

> --- a/gcc/testsuite/gcc.dg/vect/pr65947-12.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr65947-12.c
> @@ -42,5 +42,6 @@ main (void)
>  }
>
>  /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
> -/* { dg-final { scan-tree-dump-times "optimizing condition reduction with 
> FOLD_EXTRACT_LAST" 2 "vect" { target vect_fold_extract_last } } } */
> +/* { dg-final { scan-tree-dump-times "optimizing condition reduction with 
> FOLD_EXTRACT_LAST" 2 "vect" { target { vect_fold_extract_last && { ! 
> vect_multiple_sizes } } } } } */
> +/* { dg-final { scan-tree-dump "optimizing condition reduction with 
> FOLD_EXTRACT_LAST" "vect" { target { vect_fold_extract_last && 
> vect_multiple_sizes } } } } */
>  /* { dg-final { scan-tree-dump-not "condition expression based on integer 
> induction." "vect" } } */

> --- a/gcc/testsuite/gcc.dg/vect/pr65947-13.c
> +++ b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
> @@ -44,4 +44,5 @@ main (void)
>
>  /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
>  /* { dg-final { scan-tree-dump-times "condition expression based on integer 
> induction." 2 "vect" { xfail vect_fold_extract_last } } } */
> -/* { dg-final { scan-tree-dump-times "optimizing condition reduction with 
> FOLD_EXTRACT_LAST" 2 "vect" { target vect_fold_extract_last } } } */
> +/* { dg-final { scan-tree-dump-times "optimizing condition reduction with 
> FOLD_EXTRACT_LAST" 2 "vect"