diff mbox

[testsuite] ARM ivopts tests: skip for no thumb support

Message ID 4E03B1D1.8090604@codesourcery.com
State New
Headers show

Commit Message

Janis Johnson June 23, 2011, 9:36 p.m. UTC
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  <janisjo@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.

Comments

Ramana Radhakrishnan June 23, 2011, 9:56 p.m. UTC | #1
On 23 June 2011 22:36, Janis Johnson <janisjo@codesourcery.com> wrote:
> 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.

I'm not sure I understand the change for ivopts-6.c :

It's skipping if there is no Thumb support by default but the test
assumes the test will run with  -marm on the command line ?

Ramana
Janis Johnson June 23, 2011, 10:07 p.m. UTC | #2
On 06/23/2011 02:56 PM, Ramana Radhakrishnan wrote:
> On 23 June 2011 22:36, Janis Johnson <janisjo@codesourcery.com> wrote:
>> 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.
> 
> I'm not sure I understand the change for ivopts-6.c :
> 
> It's skipping if there is no Thumb support by default but the test
> assumes the test will run with  -marm on the command line ?
> 
> Ramana

Oops, I got carried away and didn't notice that it uses -marm rather
than -mthumb.  I'll take another look at that one.

Janis
diff mbox

Patch

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" } } */