This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, testsuite, ia64] Patch for gcc.dg/ssa/loop-31.c
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 Jun 2009 11:06:14 -0700 (PDT)
- Subject: [patch, testsuite, ia64] Patch for gcc.dg/ssa/loop-31.c
- Reply-to: sje at cup dot hp dot com
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" } } */