From patchwork Thu Sep 4 14:45:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco X-Patchwork-Id: 385862 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 9E0F71401F6 for ; Fri, 5 Sep 2014 00:46:38 +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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=xWQpQ2tMwfYvZFgU yQWgfeSab8rGleXiUi1Wr2L8xZUE1KGZcyD6Yx2zISjRb2Q9Csl5Il99dizTO5hk J3EBlT2SkFthKbYzo4iwj/oo5DTF3p0gZVWFcV1KXfbFd6ZFv2h4IHXoJGhOTOwI PQ6dxX+agaUsaBetWDsuwJh9jLw= 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=x8osiJ2/Ae8wqM02pyPpi+ 8WKPg=; b=r2uk8H2aN7WeFymOxBsIxF90HC+9Lta/NotnjHjMCvJy41vJP1cmww ttmGSPpbClQpaCtx0cOxJGwlnFkD71oBtXLBl9n8TDGeVa25arRQBEl/SB8wdfoX 4pGuo8ijwcjAMO8b4XOK+jFXf++TLoN9ngPZBG/F/lW4GnBEYWtwQ= Received: (qmail 4101 invoked by alias); 4 Sep 2014 14:45: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 4081 invoked by uid 89); 4 Sep 2014 14:45:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Sep 2014 14:45:06 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 04 Sep 2014 15:45:04 +0100 Received: from e103246vm ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 4 Sep 2014 15:45:04 +0100 From: "Wilco Dijkstra" To: Subject: [PATCH 2/4] AArch64: Fix cost for Q register moves Date: Thu, 4 Sep 2014 15:45:03 +0100 Message-ID: <000d01cfc84e$d01c3eb0$7054bc10$@com> MIME-Version: 1.0 X-MC-Unique: 114090415450400201 This patch fixes a bug in aarch64_register_move_cost(): GET_MODE_SIZE is in bytes not bits. As a result the FP2FP cost doesn't need to be set to 4 to catch the special case for Q register moves. ChangeLog: 2014-09-04 Wilco Dijkstra * gcc/config/aarch64/aarch64.c (aarch64_register_move_cost): Fix Q register handling. Set FP2FP move cost. --- gcc/config/aarch64/aarch64.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 6245f59..57bb083 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -219,10 +219,7 @@ static const struct cpu_regmove_cost generic_regmove_cost = NAMED_PARAM (GP2GP, 1), NAMED_PARAM (GP2FP, 2), NAMED_PARAM (FP2GP, 2), - /* We currently do not provide direct support for TFmode Q->Q move. - Therefore we need to raise the cost above 2 in order to have - reload handle the situation. */ - NAMED_PARAM (FP2FP, 4) + NAMED_PARAM (FP2FP, 2) }; /* Generic costs for vector insn classes. */ @@ -5846,7 +5843,7 @@ aarch64_register_move_cost (enum machine_mode mode, secondary reload. A general register is used as a scratch to move the upper DI value and the lower DI value is moved directly, hence the cost is the sum of three moves. */ - if (! TARGET_SIMD && GET_MODE_SIZE (mode) == 128) + if (! TARGET_SIMD && GET_MODE_SIZE (mode) == 16) return regmove_cost->GP2FP + regmove_cost->FP2GP + regmove_cost->FP2FP; return regmove_cost->FP2FP;