[committed] testsuite: Fix up syntax errors in scan-tree-dump-times target selectors

Message ID ZAMTc/ZXC8klOXeY@tucnak
State New
Headers
Series [committed] testsuite: Fix up syntax errors in scan-tree-dump-times target selectors |

Commit Message

Jakub Jelinek March 4, 2023, 9:46 a.m. UTC
  Hi!

On Thu, Mar 02, 2023 at 07:23:32PM +0100, Robin Dapp via Gcc-patches wrote:
> this patch changes SLP test expectations.  As we only vectorize when no
> more than one rgroup is present, no vectorization is performed.

This broke the tests, I'm seeing syntax errors:
ERROR: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects: error executing dg-final: syntax error in target selector "target !  vect_partial_vectors || vect32  || s390_vx"
ERROR: gcc.dg/vect/slp-3.c: error executing dg-final: syntax error in target selector "target !  vect_partial_vectors || vect32  || s390_vx"
ERROR: gcc.dg/vect/slp-multitypes-11.c -flto -ffat-lto-objects: error executing dg-final: syntax error in target selector "target vect_unpack && vect_partial_vectors_usage_1 &&  ! s390_vx"
ERROR: gcc.dg/vect/slp-multitypes-11.c: error executing dg-final: syntax error in target selector "target vect_unpack && vect_partial_vectors_usage_1 &&  ! s390_vx"

The following patch fixes those.

Tested on x86_64-linux with
make check-gcc RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} vect.exp='slp-3.c slp-multitypes-11.c'"
and committed to trunk as obvious.

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

	* gcc.dg/vect/slp-3.c: Fix up syntax errors in scan-tree-dump-times
	target selectors.
	* gcc.dg/vect/slp-multitypes-11.c: Likewise.



	Jakub
  

Comments

Robin Dapp March 6, 2023, 10:27 a.m. UTC | #1
Hi,

> This broke the tests, I'm seeing syntax errors:
> ERROR: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects: error executing dg-final: syntax error in target selector "target !  vect_partial_vectors || vect32  || s390_vx"
> ERROR: gcc.dg/vect/slp-3.c: error executing dg-final: syntax error in target selector "target !  vect_partial_vectors || vect32  || s390_vx"
> ERROR: gcc.dg/vect/slp-multitypes-11.c -flto -ffat-lto-objects: error executing dg-final: syntax error in target selector "target vect_unpack && vect_partial_vectors_usage_1 &&  ! s390_vx"
> ERROR: gcc.dg/vect/slp-multitypes-11.c: error executing dg-final: syntax error in target selector "target vect_unpack && vect_partial_vectors_usage_1 &&  ! s390_vx"

it appears that we are still missing some braces:

diff --git a/gcc/testsuite/gcc.dg/vect/slp-3.c b/gcc/testsuite/gcc.dg/vect/slp-3.c
index a0c6a72995bb..760b3fa35a2a 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-3.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-3.c
@@ -144,4 +144,4 @@ int main (void)
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { { ! { vect_partial_vectors || vect32 } } || s390_vx } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target { { vect_partial_vectors || vect32 } && { ! s390_vx } } } } } */
 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target { { ! { vect_partial_vectors || vect32 } } || s390_vx } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { vect_partial_vectors || vect32 } && { ! s390_vx } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { { vect_partial_vectors || vect32 } && { ! s390_vx } } } } } */

Would you mind double-checking and committing if it's OK?

I keep making mistakes with the dejagnu syntax.  I suppose there is no better way
to test the selector (and regex) syntax than just running an individual test case?

Thanks
 Robin
  
Jakub Jelinek March 7, 2023, 8:48 a.m. UTC | #2
On Mon, Mar 06, 2023 at 11:27:16AM +0100, Robin Dapp wrote:
> > This broke the tests, I'm seeing syntax errors:
> > ERROR: gcc.dg/vect/slp-3.c -flto -ffat-lto-objects: error executing dg-final: syntax error in target selector "target !  vect_partial_vectors || vect32  || s390_vx"
> > ERROR: gcc.dg/vect/slp-3.c: error executing dg-final: syntax error in target selector "target !  vect_partial_vectors || vect32  || s390_vx"
> > ERROR: gcc.dg/vect/slp-multitypes-11.c -flto -ffat-lto-objects: error executing dg-final: syntax error in target selector "target vect_unpack && vect_partial_vectors_usage_1 &&  ! s390_vx"
> > ERROR: gcc.dg/vect/slp-multitypes-11.c: error executing dg-final: syntax error in target selector "target vect_unpack && vect_partial_vectors_usage_1 &&  ! s390_vx"
> 
> it appears that we are still missing some braces:
> 
> diff --git a/gcc/testsuite/gcc.dg/vect/slp-3.c b/gcc/testsuite/gcc.dg/vect/slp-3.c
> index a0c6a72995bb..760b3fa35a2a 100644
> --- a/gcc/testsuite/gcc.dg/vect/slp-3.c
> +++ b/gcc/testsuite/gcc.dg/vect/slp-3.c
> @@ -144,4 +144,4 @@ int main (void)
>  /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { { ! { vect_partial_vectors || vect32 } } || s390_vx } } } } */
>  /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target { { vect_partial_vectors || vect32 } && { ! s390_vx } } } } } */
>  /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target { { ! { vect_partial_vectors || vect32 } } || s390_vx } } } } */
> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { vect_partial_vectors || vect32 } && { ! s390_vx } } } } */
> +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { { vect_partial_vectors || vect32 } && { ! s390_vx } } } } } */
> 
> Would you mind double-checking and committing if it's OK?

I'm not a TCL expert, I certainly can't reproduce any ERROR with this
anymore on any target, though I think your change is ok.

So please just check it in yourself, you've my ack for it.

> I keep making mistakes with the dejagnu syntax.  I suppose there is no better way
> to test the selector (and regex) syntax than just running an individual test case?

I'll defer that to TCL experts.

	Jakub
  

Patch

--- gcc/testsuite/gcc.dg/vect/slp-3.c.jj	2023-03-03 16:08:17.707264399 +0100
+++ gcc/testsuite/gcc.dg/vect/slp-3.c	2023-03-04 10:35:04.670752344 +0100
@@ -141,8 +141,7 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { ! { vect_partial_vectors || vect32 } || s390_vx } } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target { vect_partial_vectors || vect32 } && { ! s390_vx } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target { ! { vect_partial_vectors || vect32 } || s390_vx } } } }*/
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { { ! { vect_partial_vectors || vect32 } } || s390_vx } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" { target { { vect_partial_vectors || vect32 } && { ! s390_vx } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target { { ! { vect_partial_vectors || vect32 } } || s390_vx } } } } */
 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { vect_partial_vectors || vect32 } && { ! s390_vx } } } } */
-  
--- gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c.jj	2023-03-03 16:08:17.707264399 +0100
+++ gcc/testsuite/gcc.dg/vect/slp-multitypes-11.c	2023-03-04 10:39:39.195748813 +0100
@@ -50,6 +50,5 @@  int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  { target vect_unpack } } } */
 /* The epilogues are vectorized using partial vectors.  */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect"  { target { vect_unpack && { {! vect_partial_vectors_usage_1 } || s390_vx } } xfail { vect_variable_length && vect_load_lanes } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect"  { target { vect_unpack && vect_partial_vectors_usage_1 && { ! s390_vx } } xfail { vect_variable_length && vect_load_lanes } } } } */
-  
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect"  { target { vect_unpack && { { ! vect_partial_vectors_usage_1 } || s390_vx } } xfail { vect_variable_length && vect_load_lanes } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect"  { target { { vect_unpack && vect_partial_vectors_usage_1 } && { ! s390_vx } } xfail { vect_variable_length && vect_load_lanes } } } } */