From patchwork Fri Dec 12 15:19:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco X-Patchwork-Id: 420512 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 1E7C01400F1 for ; Sat, 13 Dec 2014 02:19:45 +1100 (AEDT) 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=SnqwQsyQ+kv/cj7p MYuQ1y3GdEII8i9trwPxQbueObc+b8PYiIE+DdepgDHJ2ji/yiJt6nfKLpk1zr/v vHz4yI+3tXNovqTtKDqus+Bp7eLn0pAR221k3qbvNMsZ9yK38coDyoeBNwDD21Jf IE/2pYoZ+Mtl3pVpHwQijjO6x3s= 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=e4L+G4O9pqxZ5uwDOUva97 +R41I=; b=IMl3vJPGvGYEomkcB6Tq0lBRw24mye3w3Fq05NL2DfxKNZ36hQaow4 0NxMXu8mzMlZ0ceKJv5xaUQJlbn3voCqPBByYTiGZZEjOPMI4xiivBCW/DcHXsso DpTbsxtZxR73ZSourdfo7x7IE2JBatOX/rj7kCtBo+Xb/dvkv6TkU= Received: (qmail 18559 invoked by alias); 12 Dec 2014 15:19:31 -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 18544 invoked by uid 89); 12 Dec 2014 15:19:30 -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, 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; Fri, 12 Dec 2014 15:19:28 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by service87.mimecast.com; Fri, 12 Dec 2014 15:19:26 +0000 Received: from e103246vm ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Dec 2014 15:19:26 +0000 From: "Wilco Dijkstra" To: Subject: [PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL Date: Fri, 12 Dec 2014 15:19:19 -0000 Message-ID: <000e01d0161f$00c25f40$02471dc0$@com> MIME-Version: 1.0 X-MC-Unique: 114121215192600301 Add an override for TARGET_MIN_DIVISIONS_FOR_RECIP_MUL and set the minimum number of divisions to 2. This gives ~0.5% speedup on SPECFP2000/2006. OK for trunk? ChangeLog: 2014-12-13 Wilco Dijkstra wdijkstr@arm.com * gcc/config/aarch64/aarch64.c (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): Define. (aarch64_min_divisions_for_recip_mul): New function. --- gcc/config/aarch64/aarch64.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index f2d390b..8c23064 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -462,6 +462,12 @@ static const char * const aarch64_condition_codes[] = "hi", "ls", "ge", "lt", "gt", "le", "al", "nv" }; +static unsigned int +aarch64_min_divisions_for_recip_mul (enum machine_mode mode ATTRIBUTE_UNUSED) +{ + return 2; +} + static int aarch64_reassociation_width (unsigned opc ATTRIBUTE_UNUSED, enum machine_mode mode) @@ -11026,6 +11032,9 @@ aarch64_gen_adjusted_ldpstp (rtx *operands, bool load, #undef TARGET_MEMORY_MOVE_COST #define TARGET_MEMORY_MOVE_COST aarch64_memory_move_cost +#undef TARGET_MIN_DIVISIONS_FOR_RECIP_MUL +#define TARGET_MIN_DIVISIONS_FOR_RECIP_MUL aarch64_min_divisions_for_recip_mul + #undef TARGET_MUST_PASS_IN_STACK #define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size