Tests gcc.target/arm/ivopts*.c add -mthumb but fail on targets without
thumb support; skip those targets.  The tests save temporary files and
need to remove them at the end, easily done with cleanup-saved-temps.

Test ivopts-6.c is the only one of the set that does not require thumb2
support in the check for object-size, and it fails for -march=iwmmxt
and iwmmxt2; the check should probably be used on that test as well,
although I haven't included it here.

OK for trunk?
2011-06-23  Janis Johnson  <jani...@codesourcery.com>

        * gcc.target/arm/ivopts-2.c: Require thumb support, clean up
        temporary files.
        * gcc.target/arm/ivopts-3.c: Likewise.
        * gcc.target/arm/ivopts-4.c: Likewise.
        * gcc.target/arm/ivopts-5.c: Likewise.
        * gcc.target/arm/ivopts-6.c: Likewise.
        * gcc.target/arm/ivopts.c: Likewise.

Index: gcc.target/arm/ivopts-2.c
===================================================================
--- gcc.target/arm/ivopts-2.c   (revision 175313)
+++ gcc.target/arm/ivopts-2.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
 /* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
 
 extern void foo2 (short*);
@@ -16,3 +17,4 @@
 /* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
 /* { dg-final { object-size text <= 26 { target arm_thumb2_ok } } } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
+/* { dg-final { cleanup-saved-temps "ivopts" } } */
Index: gcc.target/arm/ivopts-3.c
===================================================================
--- gcc.target/arm/ivopts-3.c   (revision 175313)
+++ gcc.target/arm/ivopts-3.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
 /* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
 
 extern unsigned int foo2 (short*) __attribute__((pure));
@@ -18,3 +19,4 @@
 /* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
 /* { dg-final { object-size text <= 30 { target arm_thumb2_ok } } } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
+/* { dg-final { cleanup-saved-temps "ivopts" } } */
Index: gcc.target/arm/ivopts-4.c
===================================================================
--- gcc.target/arm/ivopts-4.c   (revision 175313)
+++ gcc.target/arm/ivopts-4.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
 /* { dg-options "-mthumb -Os -fdump-tree-ivopts -save-temps" } */
 
 extern unsigned int foo (int*) __attribute__((pure));
@@ -19,3 +20,4 @@
 /* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
 /* { dg-final { object-size text <= 36 { target arm_thumb2_ok } } } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
+/* { dg-final { cleanup-saved-temps "ivopts" } } */
Index: gcc.target/arm/ivopts-5.c
===================================================================
--- gcc.target/arm/ivopts-5.c   (revision 175313)
+++ gcc.target/arm/ivopts-5.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
 /* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
 
 extern unsigned int foo (int*) __attribute__((pure));
@@ -18,3 +19,4 @@
 /* { dg-final { scan-tree-dump-times ", x" 0 "ivopts"} } */
 /* { dg-final { object-size text <= 30 { target arm_thumb2_ok } } } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
+/* { dg-final { cleanup-saved-temps "ivopts" } } */
Index: gcc.target/arm/ivopts-6.c
===================================================================
--- gcc.target/arm/ivopts-6.c   (revision 175313)
+++ gcc.target/arm/ivopts-6.c   (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
 /* { dg-options "-Os -fdump-tree-ivopts -save-temps -marm" } */
 
 void
@@ -13,3 +14,4 @@
 /* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
 /* { dg-final { object-size text <= 32 } } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
+/* { dg-final { cleanup-saved-temps "ivopts" } } */
Index: gcc.target/arm/ivopts.c
===================================================================
--- gcc.target/arm/ivopts.c     (revision 175313)
+++ gcc.target/arm/ivopts.c     (working copy)
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
 /* { dg-options "-Os -mthumb -fdump-tree-ivopts -save-temps" } */
 
 void
@@ -13,3 +14,4 @@
 /* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */
 /* { dg-final { object-size text <= 20 { target arm_thumb2_ok } } } */
 /* { dg-final { cleanup-tree-dump "ivopts" } } */
+/* { dg-final { cleanup-saved-temps "ivopts" } } */

Reply via email to