From patchwork Fri Nov 18 15:50:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 696643 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 3tL2Xl1f9nz9t1d for ; Sat, 19 Nov 2016 02:51:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="exF2eJmy"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; q=dns; s=default; b=wujaw3hQDm4Mkbpf Y5ywcGCfoPS0HEc27Taa65H0kgngRfEus2kxhZnJoC2ES9U+OF2Xx4+z6H0wXWhP 8KcbkdyNDucozEtyHOEzV4NVEADrxfciv5SGMCAy4kKE3fMqk1FxJQ/u2To8XZKA 6u4wPX2Y25h6DBgeapFlf0Ym8LQ= 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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:mime-version; s=default; bh=jwCvvv9/mSXNOm83lgijfk h+eq0=; b=exF2eJmyjQgkEgHY9SLqtGAEWPekXqA8sCpaJ9Jorgts8b1inYDGfW 3WY/NJFLXFApehPkAslA4VM7MnOrYzXafX3YrwraXybO/4LlxOyP6B92DF+QPjfj 8+oDDQb+4e4afYzvfkh1gPZ0vuF7XcaVf2EvrGfDXmGxa5ZopL0vY= Received: (qmail 45034 invoked by alias); 18 Nov 2016 15:51:09 -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 45011 invoked by uid 89); 18 Nov 2016 15:51:08 -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, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:blu004-, H*RU:sk:BLU004-, HX-HELO:sk:BLU004-, Hx-languages-length:2557 X-HELO: BLU004-OMC2S35.hotmail.com Received: from blu004-omc2s35.hotmail.com (HELO BLU004-OMC2S35.hotmail.com) (65.55.111.110) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Nov 2016 15:50:57 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com ([65.55.111.71]) by BLU004-OMC2S35.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Fri, 18 Nov 2016 07:50:56 -0800 Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (10.152.18.55) by VE1EUR03HT189.eop-EUR03.prod.protection.outlook.com (10.152.19.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.5; Fri, 18 Nov 2016 15:50:43 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com (10.152.18.51) by VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.5 via Frontend Transport; Fri, 18 Nov 2016 15:50:43 +0000 Received: from AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) by AM4PR0701MB2162.eurprd07.prod.outlook.com ([10.167.132.147]) with mapi id 15.01.0734.007; Fri, 18 Nov 2016 15:50:43 +0000 From: Bernd Edlinger To: Christophe Lyon , Kyrill Tkachov CC: GCC Patches , Richard Earnshaw , Wilco Dijkstra Subject: Re: [PATCH, ARM] Enable ldrd/strd peephole rules unconditionally Date: Fri, 18 Nov 2016 15:50:42 +0000 Message-ID: References: <582D7727.4000905@foss.arm.com> In-Reply-To: authentication-results: linaro.org; dkim=none (message not signed) header.d=none; linaro.org; dmarc=none action=none header.from=hotmail.de; x-incomingtopheadermarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:7644; Count:37 x-ms-exchange-messagesentrepresentingtype: 1 x-incomingheadercount: 37 x-eopattributedmessage: 0 x-microsoft-exchange-diagnostics: 1; VE1EUR03HT189; 7:SATAv++FPuVDVppQRACU2L5tW0Ej/NnGc4jg547hbD0+aS4op5f8Axyk6POYynZpX+lZV6yNXhlABCyLuUTyRefZCPDUflSQRX2ZYGmzf+phgt2IxtZd80nFkMBkjpgUUpSr6qxg7zDv4vfn/SMFGkEBU9f4j8XK2elzoeuKFt5kBBd+7du4LLNIsSxeJB5btH4kPppelBgbxJD3JaOk04KLVq2CK4a0mF1SB+Bu5Rgt8Opl0ZU4bPy+9RX4avNoBawk5H7fg1I8oJ82Ge5SJWarPzhQF9s72VjRvWQ8s5VqSgvpCXGJ7gjOQtiIuvanCwewRMOvq7Grr49HNOPohcKzwqFyDu3jvTL7eSvPqQM= x-forefront-antispam-report: EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR03HT189; H:AM4PR0701MB2162.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; x-ms-office365-filtering-correlation-id: 8fd7b68f-89ab-4620-2050-08d40fcaa677 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(1601124038)(1603103113)(1601125047); SRVR:VE1EUR03HT189; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(102415395)(82015046); SRVR:VE1EUR03HT189; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR03HT189; x-forefront-prvs: 01304918F3 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2016 15:50:42.8878 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT189 On 11/18/16 12:58, Christophe Lyon wrote: > On 17 November 2016 at 10:23, Kyrill Tkachov > wrote: >> >> On 09/11/16 12:58, Bernd Edlinger wrote: >>> >>> Hi! >>> >>> >>> This patch enables the ldrd/strd peephole rules unconditionally. >>> >>> It is meant to fix cases, where the patch to reduce the sha512 >>> stack usage splits ldrd/strd instructions into separate ldr/str insns, >>> but is technically independent from the other patch: >>> >>> See https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00523.html >>> >>> It was necessary to change check_effective_target_arm_prefer_ldrd_strd >>> to retain the true prefer_ldrd_strd tuning flag. >>> >>> >>> Bootstrapped and reg-tested on arm-linux-gnueabihf. >>> Is it OK for trunk? >> >> >> This is ok. >> Thanks, >> Kyrill >> > > Hi Bernd, > > Since you committed this patch (r242549), I'm seeing the new test > failing on some arm*-linux-gnueabihf configurations: > > FAIL: gcc.target/arm/pr53447-5.c scan-assembler-times ldrd 10 > FAIL: gcc.target/arm/pr53447-5.c scan-assembler-times strd 9 > > See http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/242549/report-build-info.html > for a map of failures. > > Am I missing something? Hi Christophe, as always many thanks for your testing... I have apparently only looked at the case -mfloat-abi=soft here, which is what my other patch is going to address. But all targets with -mfpu=neon -mfloat-abi=hard can also use vldr.64 instead of ldrd and vstr.64 instead of strd, which should be accepted as well. So the attached patch should fix at least most of the fallout. Is it OK for trunk? Thanks Bernd. 2016-11-18 Bernd Edlinger * gcc.target/arm/pr53447-5.c: Fix test expectations for neon-fpu. Index: gcc/testsuite/gcc.target/arm/pr53447-5.c =================================================================== --- gcc/testsuite/gcc.target/arm/pr53447-5.c (revision 242588) +++ gcc/testsuite/gcc.target/arm/pr53447-5.c (working copy) @@ -15,5 +15,8 @@ void foo(long long* p) p[9] -= p[10]; } -/* { dg-final { scan-assembler-times "ldrd" 10 } } */ -/* { dg-final { scan-assembler-times "strd" 9 } } */ +/* We accept neon instructions vldr.64 and vstr.64 as well. + Note: DejaGnu counts patterns with alternatives twice, + so actually there are only 10 loads and 9 stores. */ +/* { dg-final { scan-assembler-times "(ldrd|vldr\\.64)" 20 } } */ +/* { dg-final { scan-assembler-times "(strd|vstr\\.64)" 18 } } */