Patch for gcc.dg/tree-ssa/loop-1.c test case on IA64.

Janis Johnson janis187@us.ibm.com
Mon Jan 10 23:40:00 GMT 2005


On Mon, Jan 10, 2005 at 03:11:51PM -0800, Steve Ellcey wrote:
> I would like to tweak the gcc.dg/tree-ssa/loop-1.c testcase so that it
> correctly counts calls for ia64 in much the same way that it already
> does for hppa.
> 
> The problem is that both hppa and ia64 put out global declarations as
> well as the actual calls so the counting doesn't work if you just look
> for the function name and you need to be more specific about the string
> you count.
> 
> I tested this on hppa and ia64.
> 
> OK for checkin?
> 
> Steve Ellcey
> sje@cup.hp.com
> 
> 2004-12-20  Steve Ellcey  <sje@cup.hp.com>
> 
> 	* gcc.dg/tree-ssa/loop-1.c:  Ignore declaration when
> 	counting function calls on ia64.
> 
> 
> *** gcc.orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c	Mon Jan 10 14:57:00 2005
> --- gcc/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c	Mon Jan 10 14:57:30 2005
> *************** void xxx(void)
> *** 24,29 ****
>   /* { dg-final { scan-tree-dump-times "Added canonical iv to loop 1, 4 iterations" 1 "ivcanon"} } */
>   /* { dg-final { scan-tree-dump-times "Unrolled loop 1 completely" 1 "cunroll"} } */
>   /* { dg-final { scan-tree-dump-times "foo" 5 "vars"} } */
> ! /* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-times "foo,%r" 5} else { scan-assembler-times "foo" 5} } }  */
>   
>   
> --- 24,31 ----
>   /* { dg-final { scan-tree-dump-times "Added canonical iv to loop 1, 4 iterations" 1 "ivcanon"} } */
>   /* { dg-final { scan-tree-dump-times "Unrolled loop 1 completely" 1 "cunroll"} } */
>   /* { dg-final { scan-tree-dump-times "foo" 5 "vars"} } */
> ! /* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-times "foo,%r" 5; return } } }  */
> ! /* { dg-final { if [ istarget ia64-*-* ] { scan-assembler-times "= foo" 5; return } } }  */
> ! /* { dg-final { scan-assembler-times "foo" 5 } }  */

Tests shouldn't use TCL code within the test directives, although some
of them do.  You can get rid of that now in this test by using:

/* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-*} } } */
/* { dg-final { scan-assembler-times "= foo" 5 { target ia64*-*-*} } } */

Janis



More information about the Gcc-patches mailing list