From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102626 invoked by alias); 1 May 2015 08:20:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 102613 invoked by uid 89); 1 May 2015 08:20:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 May 2015 08:20:04 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-17.uk.mimecast.lan; Fri, 01 May 2015 09:20:01 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 1 May 2015 09:20:01 +0100 Message-ID: <55433731.6020304@arm.com> Date: Fri, 01 May 2015 08:20:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Marcus Shawcroft , Richard Earnshaw , James Greenhalgh Subject: [PATCH][AArch64] Remember to cost operand 0 in FP compare-with-0.0 case X-MC-Unique: xUH1vmh1TnaZXwT2gbrlDw-1 Content-Type: multipart/mixed; boundary="------------030009050709090804000900" X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00011.txt.bz2 This is a multi-part message in MIME format. --------------030009050709090804000900 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-length: 394 Hi all, In rtx costs we should remember to add the cost of operand 0 when handling = the compare-with-0.0 case. This simple patch does that. Bootstrapped and tested on aarch64-linux. Ok for stage 1? Thanks, Kyrill 2015-05-01 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_rtx_costs, COMPARE case): Add cost of op0 in the compare-with-fpzero case. --------------030009050709090804000900 Content-Type: text/x-patch; name=aarch64-costs-fcmp-zero.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="aarch64-costs-fcmp-zero.patch" Content-length: 733 commit fb206cd3597ca541692ca5d1f1f4bc1d8353ebfa Author: Kyrylo Tkachov Date: Tue Mar 3 10:44:53 2015 +0000 [AArch64] Remember to cost operand 0 in FP compare-with-0.0 case diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e19b592..fb9b839 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -5857,6 +5857,7 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBU= TE_UNUSED, =20 if (CONST_DOUBLE_P (op1) && aarch64_float_const_zero_rtx_p (op1)) { + *cost +=3D rtx_cost (op0, COMPARE, 0, speed); /* FCMP supports constant 0.0 for no extra cost. */ return true; } --------------030009050709090804000900--