From patchwork Tue Jun 12 02:41:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 164317 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 4E69BB6F86 for ; Tue, 12 Jun 2012 12:39:53 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1340073593; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version: To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=exj1mQ0XxKvGULYIoP+0NvGHnsE=; b=o5eLIyEA/yb+ARv cnZlwBAYMo5s3evpwisZN4F/L0BkLD5NuaBs8os1EgJOfDZHtFwYM6ZszbsxVOsm D8vSS1z1q+6bkVC3nm0ILu8CuWm5IZqxTG6kGTWAEyRgFolx0lARUUC0RWZ1qfL0 usL5tARyqvjIrQLGJsC+OxBAFp9s= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=yWXcajH5gGxeuih3E7hQl4flVm5rM+wxJR6Mnu6bGoGlHKGhrW1ifAUNn8Vnki YUxoFU6NfPHFkMhc5Sv3cs9kWgo2ezsZYxMkwsPGqLrDYUIuufM0fniobeZSHBbJ KZexBjukckl6oVUIfKkHadgRjmF3yKB4010XDSxEJIxAg=; Received: (qmail 9223 invoked by alias); 12 Jun 2012 02:39:49 -0000 Received: (qmail 9215 invoked by uid 22791); 12 Jun 2012 02:39:47 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jun 2012 02:39:32 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SeH12-0006Gt-5b from Janis_Johnson@mentor.com ; Mon, 11 Jun 2012 19:39:32 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 11 Jun 2012 19:38:57 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Mon, 11 Jun 2012 19:39:30 -0700 Message-ID: <4FD6AC49.6030806@mentor.com> Date: Mon, 11 Jun 2012 19:41:13 -0700 From: Janis Johnson Reply-To: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: "H.J. Lu" Subject: [testsuite] gcc.dg/torture/stackalign: make compile lines unique in test summary 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 The tests in gcc.dg/torture/stackalign use two sets of torture options: the usual optimization sets used as default for torture tests, and up to four sets of options that are specific to stack alignment. Currently the stack alignment options are passed via an option that is used by the dg-test option dg_extra_tool_flags, which doesn't become part of the test messages in summary files the way the other torture options do, leading to non-unique compilation messages in the test summary. This patch uses existing support to combine multiple sets of torture options for use in a single set of tests, in this case the usual optimization torture options plus the stack alignment options. Options used in all of the stack alignment testing on x86 targets are used in default options rather than as part of torture options, to reduce noise in test summaries. Tests that currently use dg-options now use dg-additional-options instead to append to, rather than replace, the default flags. H.J., I'm pretty sure this now does what you want for the seven tests that specify different options. Tested on i686-pc-linux-gnu and arm-none-eabi. OK for mainline? Janis 2012-06-11 Janis Johnson * gcc.dg/torture/stackalign/stackalign.exp: Combine stack alignment torture options with usual torture options. * gcc.dg/torture/stackalign/alloca-2.c: Use dg-additional-options instead of dg-options. * gcc.dg/torture/stackalign/alloca-3.c: Likewise. * gcc.dg/torture/stackalign/alloca-4.c: Likewise. * gcc.dg/torture/stackalign/alloca-5.c: Likewise. * gcc.dg/torture/stackalign/alloca-6.c: Likewise. * gcc.dg/torture/stackalign/push-1.c: Likewise. * gcc.dg/torture/stackalign/vararg-3.c: Likewise. Index: gcc.dg/torture/stackalign/stackalign.exp =================================================================== --- gcc.dg/torture/stackalign/stackalign.exp (revision 188322) +++ gcc.dg/torture/stackalign/stackalign.exp (working copy) @@ -1,4 +1,4 @@ -# Copyright (C) 2008, 2010 +# Copyright (C) 2008, 2010, 2012 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -18,33 +18,53 @@ # This harness is for tests that should be run at all optimisation levels. load_lib gcc-dg.exp +load_lib torture-options.exp -set additional_flags "" +global DG_TORTURE_OPTIONS LTO_TORTURE_OPTIONS + +dg-init +torture-init + +# default_flags are replaced by a dg-options test directive, or appended +# to by using dg-additional-options. Use default_flags for options that +# are used in all of the torture sets to limit the amount of noise in +# test summaries. +set default_flags "" + +# torture_flags are combined with other torture options and do not +# affect options specified within a test. +set torture_flags "" + +set stackalign_options [list] if { [check_effective_target_automatic_stack_alignment] } then { - lappend additional_flags "-mstackrealign" - lappend additional_flags "-mpreferred-stack-boundary=5" + append default_flags " -mstackrealign" + append default_flags " -mpreferred-stack-boundary=5" } if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then { - lappend additional_flags "-mno-mmx" + append default_flags " -mno-mmx" } +lappend stackalign_options [join $torture_flags] -dg-init - -gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $additional_flags if { [check_effective_target_fpic] } then { - set pic_additional_flags $additional_flags - lappend pic_additional_flags "-fpic" - gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $pic_additional_flags + set pic_torture_flags $torture_flags + append pic_torture_flags " -fpic" + lappend stackalign_options [join $pic_torture_flags] } if { [check_effective_target_automatic_stack_alignment] } then { - lappend additional_flags "-mforce-drap" - gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $additional_flags + append torture_flags " -mforce-drap" + lappend stackalign_options [join $torture_flags] if { [check_effective_target_fpic] } then { - set pic_additional_flags $additional_flags - lappend pic_additional_flags "-fpic" - gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $pic_additional_flags + set pic_torture_flags $torture_flags + append pic_torture_flags " -fpic" + lappend stackalign_options [join $pic_torture_flags] } } +# Combine stackalign options with the usual torture optimization flags. +set-torture-options [concat $DG_TORTURE_OPTIONS $LTO_TORTURE_OPTIONS] $stackalign_options + +gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "$default_flags" + +torture-finish dg-finish Index: gcc.dg/torture/stackalign/alloca-2.c =================================================================== --- gcc.dg/torture/stackalign/alloca-2.c (revision 188322) +++ gcc.dg/torture/stackalign/alloca-2.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/37009 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ -/* { dg-options "-msse2" } */ +/* { dg-additional-options "-mmmx -msse2" } */ /* { dg-require-effective-target sse2_runtime } */ #include Index: gcc.dg/torture/stackalign/alloca-3.c =================================================================== --- gcc.dg/torture/stackalign/alloca-3.c (revision 188322) +++ gcc.dg/torture/stackalign/alloca-3.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/37009 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ -/* { dg-options "-msse2" } */ +/* { dg-additional-options "-mmmx -msse2" } */ /* { dg-require-effective-target sse2_runtime } */ #include Index: gcc.dg/torture/stackalign/alloca-4.c =================================================================== --- gcc.dg/torture/stackalign/alloca-4.c (revision 188322) +++ gcc.dg/torture/stackalign/alloca-4.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/37009 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ -/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */ +/* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */ #include "check.h" Index: gcc.dg/torture/stackalign/alloca-5.c =================================================================== --- gcc.dg/torture/stackalign/alloca-5.c (revision 188322) +++ gcc.dg/torture/stackalign/alloca-5.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/45234 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ -/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */ +/* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */ #include "check.h" Index: gcc.dg/torture/stackalign/alloca-6.c =================================================================== --- gcc.dg/torture/stackalign/alloca-6.c (revision 188322) +++ gcc.dg/torture/stackalign/alloca-6.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/45234 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ -/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */ +/* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */ #include "check.h" Index: gcc.dg/torture/stackalign/push-1.c =================================================================== --- gcc.dg/torture/stackalign/push-1.c (revision 188322) +++ gcc.dg/torture/stackalign/push-1.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/37010 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ -/* { dg-options "-msse2 -mpreferred-stack-boundary=2" } */ +/* { dg-additional-options "-mmmx -msse2 -mpreferred-stack-boundary=2" } */ /* { dg-require-effective-target sse2_runtime } */ #include Index: gcc.dg/torture/stackalign/vararg-3.c =================================================================== --- gcc.dg/torture/stackalign/vararg-3.c (revision 188322) +++ gcc.dg/torture/stackalign/vararg-3.c (working copy) @@ -1,6 +1,6 @@ /* PR middle-end/37009 */ /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ -/* { dg-options "-msse2" } */ +/* { dg-additional-options "-mmmx -msse2" } */ /* { dg-require-effective-target sse2_runtime } */ #include