From patchwork Fri Jul 8 14:25:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 103853 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 90FFAB6F77 for ; Sat, 9 Jul 2011 00:25:32 +1000 (EST) Received: (qmail 1088 invoked by alias); 8 Jul 2011 14:25:31 -0000 Received: (qmail 1078 invoked by uid 22791); 8 Jul 2011 14:25:30 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Jul 2011 14:25:14 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by smtp.strato.de (fruni mo44) (RZmta 26.0) with ESMTPA id j054c2n68CeloO ; Fri, 8 Jul 2011 16:25:10 +0200 (MEST) Message-ID: <4E171345.7020502@gjlay.de> Date: Fri, 08 Jul 2011 16:25:09 +0200 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: Mike Stump , Rainer Orth Subject: [Patch, testsuite]: Skip -fschedule-insns if no scheduling available. X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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. 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 {