diff mbox

Minor testsuite improvement

Message ID 50EE4E5E.2060400@redhat.com
State New
Headers show

Commit Message

Jeff Law Jan. 10, 2013, 5:15 a.m. UTC
Gary Funck noted that vrp06.c has two tests with the same output.  After 
further investigation it was clear that expected output strings were too 
lenient and were in fact masking a missed optimization.

This patch tightens the expected output from the vrp dump which has the 
side effect of making each test's string unique.  Obviously the masked 
failure is xfailed.

OK for the trunk?

Thanks,
Jeff
* gcc/dg/tree-ssa/vrp06.c: Tighten expected output.  Make each
	pass/fail message unique.

Comments

Richard Biener Jan. 10, 2013, 10:13 a.m. UTC | #1
On Thu, Jan 10, 2013 at 6:15 AM, Jeff Law <law@redhat.com> wrote:
>
> Gary Funck noted that vrp06.c has two tests with the same output.  After
> further investigation it was clear that expected output strings were too
> lenient and were in fact masking a missed optimization.
>
> This patch tightens the expected output from the vrp dump which has the side
> effect of making each test's string unique.  Obviously the masked failure is
> xfailed.
>
> OK for the trunk?

Hmm, but if the SSA versions are simply i_10 then i_.*0 will still match it
the same?  I think you want the more elaborate 'i_\[0-9\]* . 0' here?

Please also open a bug for the added XFAIL.

Thanks,
Richard.

> Thanks,
> Jeff
>
>         * gcc/dg/tree-ssa/vrp06.c: Tighten expected output.  Make each
>         pass/fail message unique.
>
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
> b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
> index 1ef6c92..4edca36 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
> @@ -25,7 +25,7 @@ foo (int i, int j, int a)
>    return i + a + j;
>  }
>
> -/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1"
> } } */
> -/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1"
> } } */
> -/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1"
> } } */
> +/* { dg-final { scan-tree-dump-times "Folding predicate i_.*0 to 0" 1
> "vrp1" } } */
> +/* { dg-final { scan-tree-dump-times "Folding predicate j_.*0 to 1" 1
> "vrp1" } } */
> +/* { dg-final { scan-tree-dump-times "Folding predicate i_.*j_.* to 0" 1
> "vrp1" { xfail *-*-* } } } */
>  /* { dg-final { cleanup-tree-dump "vrp1" } } */
>
Jeff Law Jan. 10, 2013, 4:53 p.m. UTC | #2
On 01/10/2013 03:13 AM, Richard Biener wrote:
>>
> Hmm, but if the SSA versions are simply i_10 then i_.*0 will still match it
> the same?  I think you want the more elaborate 'i_\[0-9\]* . 0' here?
Per Uros's suggestion I'm using i[0-9]+ to ensure we one or more digits.

>
> Please also open a bug for the added XFAIL.
55936.  Not sure if it's a regression or not -- Diego changed the 
relevant code in tree-ssa-vrp around 2006.  I didn't build a compiler 
from that era to see if VRP caught everything in one pass.

jeff
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
index 1ef6c92..4edca36 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
@@ -25,7 +25,7 @@  foo (int i, int j, int a)
   return i + a + j;
 }
 
-/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_.*0 to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate j_.*0 to 1" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_.*j_.* to 0" 1 "vrp1" { xfail *-*-* } } } */
 /* { dg-final { cleanup-tree-dump "vrp1" } } */