diff mbox

Fix up vect/fast-math-mgrid-resid.f testcase (PR testsuite/59494)

Message ID 20140113191957.GE892@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Jan. 13, 2014, 7:19 p.m. UTC
Hi!

As discussed in the PR and on IRC, this testcase is very fragile, counting
additions with vect_ named SSA_NAME on lhs works only for some tunings,
for other tunings reassoc width etc. affect it and we can e.g. have
anonymous SSA_NAMEs on the lhs in the optimized dump instead.

These alternate regexps seems to match regardless of the tunings (at least
what I've tried), starting with the corresponding fix onwards, and FAIL
before the fix.

Regtested on x86_64-linux and i686-linux, ok for trunk?

2014-01-13  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/59494
	* gfortran.dg/vect/fast-math-mgrid-resid.f: Change
	-fdump-tree-optimized to -fdump-tree-pcom-details in dg-options and
	cleanup-tree-dump from optimized to pcom.  Remove scan-tree-dump-times
	for vect_\[^\\n\]*\\+, add scan-tree-dump-times for no suitable chains and
	Executing predictive commoning without unrolling.


	Jakub

Comments

Richard Biener Jan. 14, 2014, 8:51 a.m. UTC | #1
On Mon, 13 Jan 2014, Jakub Jelinek wrote:

> Hi!
> 
> As discussed in the PR and on IRC, this testcase is very fragile, counting
> additions with vect_ named SSA_NAME on lhs works only for some tunings,
> for other tunings reassoc width etc. affect it and we can e.g. have
> anonymous SSA_NAMEs on the lhs in the optimized dump instead.
> 
> These alternate regexps seems to match regardless of the tunings (at least
> what I've tried), starting with the corresponding fix onwards, and FAIL
> before the fix.
> 
> Regtested on x86_64-linux and i686-linux, ok for trunk?

Ok.

Thanks,
Richard.

> 2014-01-13  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR testsuite/59494
> 	* gfortran.dg/vect/fast-math-mgrid-resid.f: Change
> 	-fdump-tree-optimized to -fdump-tree-pcom-details in dg-options and
> 	cleanup-tree-dump from optimized to pcom.  Remove scan-tree-dump-times
> 	for vect_\[^\\n\]*\\+, add scan-tree-dump-times for no suitable chains and
> 	Executing predictive commoning without unrolling.
> 
> --- gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f.jj	2013-04-08 15:38:21.000000000 +0200
> +++ gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f	2014-01-13 13:18:39.904315828 +0100
> @@ -1,7 +1,7 @@
>  ! { dg-do compile { target i?86-*-* x86_64-*-* } }
>  ! { dg-require-effective-target vect_double }
>  ! { dg-require-effective-target sse2 }
> -! { dg-options "-O3 -ffast-math -msse2 -fpredictive-commoning -ftree-vectorize -fdump-tree-optimized" }
> +! { dg-options "-O3 -ffast-math -msse2 -fpredictive-commoning -ftree-vectorize -fdump-tree-pcom-details" }
>  
>  
>  ******* RESID COMPUTES THE RESIDUAL:  R = V - AU
> @@ -39,8 +39,9 @@ C
>        RETURN
>        END
>  ! we want to check that predictive commoning did something on the
> -! vectorized loop, which means we have to have exactly 13 vector
> -! additions.
> -! { dg-final { scan-tree-dump-times "vect_\[^\\n\]*\\+ " 13 "optimized" } }
> +! vectorized loop.
> +! { dg-final { scan-tree-dump-times "Executing predictive commoning without unrolling" 1 "pcom" { target lp64 } } }
> +! { dg-final { scan-tree-dump-times "Executing predictive commoning without unrolling" 2 "pcom" { target ia32 } } }
> +! { dg-final { scan-tree-dump-times "Predictive commoning failed: no suitable chains" 0 "pcom" } }
>  ! { dg-final { cleanup-tree-dump "vect" } }
> -! { dg-final { cleanup-tree-dump "optimized" } }
> +! { dg-final { cleanup-tree-dump "pcom" } }
> 
> 	Jakub
> 
>
diff mbox

Patch

--- gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f.jj	2013-04-08 15:38:21.000000000 +0200
+++ gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f	2014-01-13 13:18:39.904315828 +0100
@@ -1,7 +1,7 @@ 
 ! { dg-do compile { target i?86-*-* x86_64-*-* } }
 ! { dg-require-effective-target vect_double }
 ! { dg-require-effective-target sse2 }
-! { dg-options "-O3 -ffast-math -msse2 -fpredictive-commoning -ftree-vectorize -fdump-tree-optimized" }
+! { dg-options "-O3 -ffast-math -msse2 -fpredictive-commoning -ftree-vectorize -fdump-tree-pcom-details" }
 
 
 ******* RESID COMPUTES THE RESIDUAL:  R = V - AU
@@ -39,8 +39,9 @@  C
       RETURN
       END
 ! we want to check that predictive commoning did something on the
-! vectorized loop, which means we have to have exactly 13 vector
-! additions.
-! { dg-final { scan-tree-dump-times "vect_\[^\\n\]*\\+ " 13 "optimized" } }
+! vectorized loop.
+! { dg-final { scan-tree-dump-times "Executing predictive commoning without unrolling" 1 "pcom" { target lp64 } } }
+! { dg-final { scan-tree-dump-times "Executing predictive commoning without unrolling" 2 "pcom" { target ia32 } } }
+! { dg-final { scan-tree-dump-times "Predictive commoning failed: no suitable chains" 0 "pcom" } }
 ! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-tree-dump "optimized" } }
+! { dg-final { cleanup-tree-dump "pcom" } }