From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91162 invoked by alias); 18 Aug 2015 08:50:32 -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 90417 invoked by uid 89); 18 Aug 2015 08:50:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f179.google.com Received: from mail-lb0-f179.google.com (HELO mail-lb0-f179.google.com) (209.85.217.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 18 Aug 2015 08:50:30 +0000 Received: by lbbtg9 with SMTP id tg9so99045832lbb.1 for ; Tue, 18 Aug 2015 01:50:27 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.47.73 with SMTP id b9mr5223680lbn.46.1439887800367; Tue, 18 Aug 2015 01:50:00 -0700 (PDT) Received: by 10.25.165.13 with HTTP; Tue, 18 Aug 2015 01:50:00 -0700 (PDT) In-Reply-To: <55C23E00.2070109@arm.com> References: <55BA47C3.80207@arm.com> <55BA4BFC.6010400@arm.com> <55C23E00.2070109@arm.com> Date: Tue, 18 Aug 2015 08:50:00 -0000 Message-ID: Subject: Re: [PATCH][AARCH64]Add backend combine_bfi pattern. 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-08/txt/msg00961.txt.bz2 On 5 August 2015 at 17:46, Renlin Li wrote: > Hi Kyrill, > > > On 30/07/15 17:08, Kyrill Tkachov wrote: >> >> Hi Renlin, >> >> On 30/07/15 16:50, Renlin Li wrote: >>> >>> Hi all, >>> >>> This insn should match the following similar rtx pattern and remove the >>> redundant zero_extend operation if the width of zero_extract and >>> inner-size of zero_extend totally match. >>> >>> (set (zero_extract:SI (reg/i:SI 0 x0) >>> (const_int 8 [0x8]) >>> (const_int 0 [0])) >>> (zero_extend:SI (reg:QI 1 x1 [ y ]))) >>> >>> >>> aarch64-none-elf regression tests Okay. Okay to commit? >>> >>> Regards, >>> Renlin >>> >>> gcc/ChangeLog: >>> >>> 2015-07-30 Renlin Li >>> >>> * config/aarch64/aarch64.md (combine_bfi): New pattern. >>> >>> gcc/testsuite/ChangeLog: >>> >>> 2015-07-30 Renlin Li >>> >>> * gcc.target/aarch64/combine-bfi.c: New. >> >> +(define_insn "*combine_bfi" >> + [(set (zero_extract:GPI (match_operand:GPI 0 "register_operand" "+r") >> + (match_operand 1 "const_int_operand" "n") >> + (match_operand 2 "const_int_operand" "n")) >> + (zero_extend:GPI (match_operand:ALLX 3 "register_operand" "r")))] >> + "UINTVAL (operands[1]) == " >> + "bfi\\t%0, %3, %2, %1" >> + [(set_attr "type" "bfm")] >> +) >> >> I notice we don't have any other patterns in aarch64 that start with >> combine_*. >> Would it be better to name them something like >> "*aarch64_bfi4" instead? > > Thanks for the suggestion. I have adjust the patch accordingly. > > Regards, > Renlin > > > > gcc/ChangeLog: > > 2015-08-05 Renlin Li > > * config/aarch64/aarch64.md > (*aarch64_bfi4): New pattern. > > gcc/testsuite/ChangeLog: > > 2015-08-05 Renlin Li > > * gcc.target/aarch64/combine-bfi.c: New. For new test cases in this directory, follow the guidance given on the wiki here https://gcc.gnu.org/wiki/TestCaseWriting, specifically add the suffix _N, hence combine_bfi_1.c OK with that change. /Marcus