From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56010 invoked by alias); 2 Jun 2017 10:39:04 -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 55922 invoked by uid 89); 2 Jun 2017 10:39:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-languages-length:1421, IMM, Our, our X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Jun 2017 10:39:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7EA702B; Fri, 2 Jun 2017 03:39:04 -0700 (PDT) Received: from [10.2.207.77] (e100706-lin.cambridge.arm.com [10.2.207.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B1C9D3F58B; Fri, 2 Jun 2017 03:39:03 -0700 (PDT) Message-ID: <59314046.2060409@foss.arm.com> Date: Fri, 02 Jun 2017 10:39:00 -0000 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: Re: [PATCH][AArch64] Use SUBS for parallel subtraction and comparison with immediate References: <58F9C0E7.4070600@foss.arm.com> <5914399D.9080606@foss.arm.com> In-Reply-To: <5914399D.9080606@foss.arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00110.txt.bz2 Ping. Thanks, Kyrill On 11/05/17 11:14, Kyrill Tkachov wrote: > Ping. > > https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00932.html > > Thanks, > Kyrill > > On 21/04/17 09:20, Kyrill Tkachov wrote: >> Hi all, >> >> Our sub3_compare1 pattern is not enough to catch cases where we subtract an immediate >> and compare against in PARALLEL. This is due to the RTL canonicalisation rules that require >> subtractions of immediate IMM be represented as (plus x -IMM). >> So we need a bit of trickery to catch those cases and this patch does that. >> It adds a new define_insn to match the plus-negatable-immediate in parallel with a comparison >> and a peephole that will bring the two together when possible. >> Otherwise it's pretty straightforward. >> >> The testcase in the patch now generates a single SUBS-immediate instead of a SUB followed by a CMP. >> >> Bootstrapped and tested on aarch64-none-linux-gnu. >> >> Ok for GCC 8? >> >> Thanks, >> Kyrill >> >> 2017-04-21 Kyrylo Tkachov >> >> * config/aarch64/aarch64.md (sub3_compare1_imm): New define_insn. >> (peephole2): New peephole2 to emit the above. >> * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate. >> >> 2017-04-21 Kyrylo Tkachov >> >> * gcc.target/aarch64/subs_compare_2.c: New test. >> >