From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44544 invoked by alias); 1 May 2015 10:19:50 -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 44532 invoked by uid 89); 1 May 2015 10:19:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f47.google.com Received: from mail-wg0-f47.google.com (HELO mail-wg0-f47.google.com) (74.125.82.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 01 May 2015 10:19:48 +0000 Received: by wgso17 with SMTP id o17so87345807wgs.1 for ; Fri, 01 May 2015 03:19:45 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.120.3 with SMTP id ky3mr16890596wjb.156.1430475585426; Fri, 01 May 2015 03:19:45 -0700 (PDT) Received: by 10.28.104.138 with HTTP; Fri, 1 May 2015 03:19:45 -0700 (PDT) In-Reply-To: <55367660.5080808@arm.com> References: <55367660.5080808@arm.com> Date: Fri, 01 May 2015 10:19:00 -0000 Message-ID: Subject: Re: [PATCH][AARCH64]Use mov for add with large immediate. From: Marcus Shawcroft To: Renlin Li Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00024.txt.bz2 On 21 April 2015 at 17:10, Renlin Li wrote: > Hi all, > > This is a simple patch to generate a move instruction to temporarily hold > the large immediate for a add instruction. > > GCC regression test has been run using aarch64-none-elf toolchain. NO new > issues. > > Okay for trunk? > > Regards, > Renlin Li > > gcc/ChangeLog: > > 2015-04-21 Renlin Li > > * config/aarch64/aarch64.md (add3): Use mov when allowed. A couple style nits: HOST_WIDE_INT imm = INTVAL (operands[2]); - - if (imm < 0) Don't remove the blank line between declarations and the first statement. + if (aarch64_move_imm (imm, mode) + && can_create_pseudo_p ()) + { The indentation of { should conform to the gnu style guide. It also looks to me that an unbroken line will fit within the 80 column limit, hence the break before && is unnecessary. Cheers /Marcus