From patchwork Fri May 1 08:20:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 466910 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 B838F140761 for ; Fri, 1 May 2015 18:20:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=dJcwRX1r; dkim-adsp=none (unprotected policy); 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 :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=gMwX7exOiCIP2GPyHwNOshWwsHt/neNai/kpejYN/Bu pGGNuSUEpkM8oq5UiLBGHyNeWpwjDIhnqWqZEmbE7aBteSIPIE4Lwns5QKDpcgU4 eGd76ILYTWbH6eNiJxWBUpasCHxTrU64LxLlwsYgjXZJowyYdBLJSD7j4pcZhZs4 = 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:content-type; s=default; bh=P/bJDiKRmnmdIXG4KEWWqOKHRcI=; b=dJcwRX1rULoXVN+V0 rkwU58A83FfAWCGO3Z3EerupsVmarPJLZSReUHchuZsGx0X3XiU8HcWyTxggp5kX DXPsy+LJJU3lvh8RPiEmftju5ECP1QU+G4ZmQkl9hCufxJ+QPSIPOhr5IDCjMHFq klsaGr0YWs9QfTZu72YnJxHiwI= 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-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 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 09:20:01 +0100 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 X-IsSubscribed: yes 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. 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 ATTRIBUTE_UNUSED, if (CONST_DOUBLE_P (op1) && aarch64_float_const_zero_rtx_p (op1)) { + *cost += rtx_cost (op0, COMPARE, 0, speed); /* FCMP supports constant 0.0 for no extra cost. */ return true; }