diff mbox

[testsuite] : Skip -fschedule-insns if no scheduling available.

Message ID 4E171345.7020502@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay July 8, 2011, 2:25 p.m. UTC
There are tests in suite that set -fschedule-insns[2] and FAIL because of

warning: instruction scheduling not supported on this target machine
[enabled by default]

As there is no individual switch do disable the warning, the patch
disables some test cases so reduce the overall "noise of false test
fails".

There is no proc for that yet, so I wrote one. Lightly tested with my
testsuite: get now UNSUPPORTED instead of FAIL.

Ok to commit?

Johann

	* lib/target-supports.exp (check_effective_target_scheduling):
	New Function.
	* gcc.dg/pr46614.c: Add dg-require-effective-target scheduling.
	* gcc.dg/pr45055.c: Ditto.
	* gcc.dg/pr45353.c: Ditto.
	* g++.dg/pr45056.C: Ditto.

Comments

Mike Stump July 9, 2011, 4:48 p.m. UTC | #1
On Jul 8, 2011, at 7:25 AM, Georg-Johann Lay wrote:

> There are tests in suite that set -fschedule-insns[2] and FAIL because of
> 
> warning: instruction scheduling not supported on this target machine
> [enabled by default]
> 
> As there is no individual switch do disable the warning, the patch
> disables some test cases so reduce the overall "noise of false test
> fails".
> 
> There is no proc for that yet, so I wrote one. Lightly tested with my
> testsuite: get now UNSUPPORTED instead of FAIL.
> 
> Ok to commit?

Awesome, thanks; oops, I mean, Ok.
diff mbox

Patch

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 176044)
+++ lib/target-supports.exp	(working copy)
@@ -712,6 +712,14 @@  proc check_effective_target_function_sec
     } "-ffunction-sections"]
 }
 
+# Return 1 if instruction scheduling is available, 0 otherwise.
+
+proc check_effective_target_scheduling {} {
+    return [check_no_compiler_messages scheduling object {
+	void foo (void) { }
+    } "-fschedule-insns"]
+}
+
 # Return 1 if compilation with -fgraphite is error-free for trivial 
 # code, 0 otherwise.
 
Index: gcc.dg/pr46614.c
===================================================================
--- gcc.dg/pr46614.c	(revision 176044)
+++ gcc.dg/pr46614.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR rtl-optimization/46614 */
 /* { dg-do run } */
 /* { dg-options "-O -fno-rename-registers -fsched2-use-superblocks -fschedule-insns2 -funroll-loops" } */
+/* { dg-require-effective-target scheduling } */
 
 extern void abort (void);
 
Index: gcc.dg/pr45055.c
===================================================================
--- gcc.dg/pr45055.c	(revision 176044)
+++ gcc.dg/pr45055.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR debug/45055 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns -fcompare-debug" } */
+/* { dg-require-effective-target scheduling } */
 
 int colormap[10];
 
Index: gcc.dg/pr45353.c
===================================================================
--- gcc.dg/pr45353.c	(revision 176044)
+++ gcc.dg/pr45353.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR rtl-optimization/45353 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fschedule-insns -fselective-scheduling" } */
+/* { dg-require-effective-target scheduling } */
 
 void
 foo ()
Index: g++.dg/pr45056.C
===================================================================
--- g++.dg/pr45056.C	(revision 176044)
+++ g++.dg/pr45056.C	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O -fschedule-insns2 -fschedule-insns -g" } */
+/* { dg-require-effective-target scheduling } */
 
 template < class _T1, class _T2 > struct pair
 {