[patch, testsuite, ia64] Patch for gcc.dg/ssa/loop-31.c

Steve Ellcey sje@cup.hp.com
Fri Jun 19 18:28:00 GMT 2009


gcc.dg/ssa/loop-31.c is failing on IA64 in 64 bit mode because the tree
dump contains two '+ 2' strings instead of just one.  This is because
the code  happens to generate an equation containing '+ 2' as part of
the loop setup as well as the one inside the loop that is created by the
strength reduction.  I couldn't come up with a clean way of checking for
'+ 2' only inside the loop so I just broke up the dg-final scans into
multiple cases in order to check for 1 instance in some cases and 2
instances in other cases.

I could have combined the arm and the 32 bit ia64 cases into one scan
but it seemed cleaner and clearer to have seperate dg-final lines for
arm and for the two different ia64 cases.

Tested on IA64 Linux and HP-UX with no regressions.  OK to checkin?

Steve Ellcey
sje@cup.hp.com


2009-06-19  Steve Ellcey  <sje@cup.hp.com>

	PR testsuite/39297
	* gcc.dg/ssa/loop-31.c: Change scan rules.


Index: gcc.dg/tree-ssa/loop-31.c
===================================================================
--- gcc.dg/tree-ssa/loop-31.c	(revision 148688)
+++ gcc.dg/tree-ssa/loop-31.c	(working copy)
@@ -15,5 +15,7 @@ short foo (int len, int v)
 
 /* When we do not have addressing mode including multiplication,
    the memory access should be strength-reduced.  */
-/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target arm-*-* ia64-*-* } } } */
+/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target arm-*-* } } } */
+/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target { ia64-*-* && ilp32 } } } } */
+/* { dg-final { scan-tree-dump-times " \\+ 2" 2 "optimized" { target { ia64-*-* && lp64 } } } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */



More information about the Gcc-patches mailing list