From patchwork Wed Jul 9 21:06:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 368338 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E3AE51400B9 for ; Thu, 10 Jul 2014 07:06:30 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=fGPjnLVNY1611IIyG A6Hx96HKr2VCm5/4lO6ykJsgXPGY7OMcjhaoqRX6Nqwc6uLrAGJZarxYEuLzyAnJ +it7BlJUvPJn0xSh7SWb3yOL4TwogUZ6ibsyqiksQKS2Hx1Bla1YSDqDHzTredby 7lvnlIkInhz/IcPJZsV+pWE54g= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=PEXixYevh2x28u8+MhgvBZX 7RJQ=; b=IfjL8EC7mMVk+309+RPapMLEmhFpDJO6AnTPjoZog2hZlSv3UV1YPD6 314ScjvO3fAH7fOmNnVc41frzpBTOUGr0VSRIGpnbZDSIyJ8Hc+Gu0kZmA5SUlO9 hGKBIeakAOPsXy4Cn2qbAmUjxpOLevGtaASUscHdBZ/5JM7oESKA= Received: (qmail 26204 invoked by alias); 9 Jul 2014 21:06:22 -0000 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 Received: (qmail 26155 invoked by uid 89); 9 Jul 2014 21:06:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Jul 2014 21:06:18 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X4z48-00046G-FB from Tom_deVries@mentor.com ; Wed, 09 Jul 2014 14:06:12 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 9 Jul 2014 14:06:12 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Wed, 9 Jul 2014 22:06:10 +0100 Message-ID: <53BDAEC0.4060908@mentor.com> Date: Wed, 9 Jul 2014 23:06:08 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: CC: GCC Patches Subject: Re: Simplify gcc.target/mips/fuse-caller-save*.c References: <53BD6578.4010200@mentor.com> <87bnsyz8lw.fsf@talisman.default> In-Reply-To: <87bnsyz8lw.fsf@talisman.default> On 09-07-14 20:32, Richard Sandiford wrote: > Tom de Vries writes: >> Richard, >> >> during testing the gcc.target/mips/fuse-caller-save*.c test-cases with more >> combinations of -march, -mabi, -fpic etc, I found that the checks for amount of >> stores are rather fragile, so I removed them in this patch. > > Which combinations specifically? I don't see offhand why -march would > make a difference, --target_board=unix/-march=mips32: ... FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O2 scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O3 -fomit-frame-pointer scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O3 -g scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-mips16.c -Os scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O2 -flto -flto-partition=none scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-mips16.c -O2 -flto scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 ... We're using save instead of sw. > or why -mabi would make a difference --target_board=unix/-mabi=64: ... FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O2 scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O3 -fomit-frame-pointer scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O3 -g scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-micromips.c -Os scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O2 -flto -flto-partition=none scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save-micromips.c -O2 -flto scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save.c -O2 scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save.c -O3 -fomit-frame-pointer scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save.c -O3 -g scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save.c -Os scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save.c -O2 -flto -flto-partition=none scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 FAIL: gcc.target/mips/fuse-caller-save.c -O2 -flto scan-assembler-times (?n)s[wd]\t\\$.*,.*\\(\\$sp\\) 2 ... > for -mno-abicalls. With --target_board=unix/-mabi=64/-mno-abicalls, indeed those tests pass. > -mabicalls might change the output because of things like the $gp save slot, > but if that's the only reason it might be better to add addressing=absolute > to the tests instead. OK, attached patch implements that, that fixes the -mabi=64 problem. What do we do about the 'save' instead of 'sw' ? Thanks, - Tom > > Thanks, > Richard > 2014-07-09 Tom de Vries * gcc.target/mips/fuse-caller-save.c: Add addression=absolute to dg-options. * gcc.target/mips/fuse-caller-save-mips16.c: Same. * gcc.target/mips/fuse-caller-save-micromips.c: Same. diff --git a/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c b/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c index 6ad01c7..70349dc 100644 --- a/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c +++ b/gcc/testsuite/gcc.target/mips/fuse-caller-save-micromips.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fuse-caller-save (-mmicromips)" } */ +/* { dg-options "-fuse-caller-save (-mmicromips) addressing=absolute" } */ /* At -O0 and -O1, the register allocator behaves more conservatively, and the fuse-caller-save optimization doesnt' trigger. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c b/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c index a7c6cf4..330d325 100644 --- a/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c +++ b/gcc/testsuite/gcc.target/mips/fuse-caller-save-mips16.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fuse-caller-save (-mips16)" } */ +/* { dg-options "-fuse-caller-save (-mips16) addressing=absolute" } */ /* At -O0 and -O1, the register allocator behaves more conservatively, and the fuse-caller-save optimization doesnt' trigger. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */ diff --git a/gcc/testsuite/gcc.target/mips/fuse-caller-save.c b/gcc/testsuite/gcc.target/mips/fuse-caller-save.c index 72c08fe..370b1ee 100644 --- a/gcc/testsuite/gcc.target/mips/fuse-caller-save.c +++ b/gcc/testsuite/gcc.target/mips/fuse-caller-save.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fuse-caller-save" } */ +/* { dg-options "-fuse-caller-save addressing=absolute" } */ /* At -O0 and -O1, the register allocator behaves more conservatively, and the fuse-caller-save optimization doesnt' trigger. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-O1" } } */ -- 1.9.1