public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@arm.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
	 Richard Earnshaw <Richard.Earnshaw@arm.com>,
	Marcus Shawcroft <Marcus.Shawcroft@arm.com>,
	 James Greenhalgh <James.Greenhalgh@arm.com>
Subject: Re: [PATCH][ARM][3/3] Expand mod by power of 2
Date: Tue, 01 Sep 2015 08:38:00 -0000	[thread overview]
Message-ID: <55E56402.6020302@arm.com> (raw)
In-Reply-To: <000101d0da7d$a3ce5540$eb6affc0$@arm.com>

Ping.

Thanks,
Kyrill
On 19/08/15 13:50, Kyrill Tkachov wrote:
> Ping.
> https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00448.html
>
> Thanks,
> Kyrill
>
>> -----Original Message-----
>> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
>> owner@gcc.gnu.org] On Behalf Of Kyrill Tkachov
>> Sent: 10 August 2015 12:14
>> To: GCC Patches
>> Cc: Ramana Radhakrishnan; Richard Earnshaw; Marcus Shawcroft; James
>> Greenhalgh
>> Subject: Re: [PATCH][ARM][3/3] Expand mod by power of 2
>>
>> Here is a slight respin.
>> The important parts are the same, just the expander now uses the slightly
>> shorter arm_gen_compare_reg and the rtx costs hunk is moved under an
>> explicit case MOD.
>>
>> Note, the tests still require patch 1/3 that does this for aarch64 that I hope to
>> post a respinned version of soon.
>>
>> Ok after the prerequisite goes in?
>>
>> Thanks,
>> Kyrill
>>
>>
>> 2015-08-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>
>>       * config/arm/arm.md (*subsi3_compare0): Rename to...
>>       (subsi3_compare0): ... This.
>>       (*arm_andsi3_insn): Rename to...
>>       (arm_andsi3_insn): ... This.
>>       (modsi3): New define_expand.
>>       * config/arm/arm.c (arm_new_rtx_costs, MOD case): Handle case
>>       when operand is power of 2.
>>
>>
>> 2015-08-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>
>>       * gcc.target/aarch64/mod_2.x: New file.
>>       * gcc.target/aarch64/mod_256.x: Likewise.
>>       * gcc.target/arm/mod_2.c: New test.
>>       * gcc.target/arm/mod_256.c: Likewise.
>>       * gcc.target/aarch64/mod_2.c: Likewise.
>>       * gcc.target/aarch64/mod_256.c: Likewise.
>>
>>
>>
>> On 31/07/15 09:20, Kyrill Tkachov wrote:
>>> Ping.
>>>
>>> https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02037.html
>>> Thanks,
>>> Kyrill
>>>
>>> On 24/07/15 11:55, Kyrill Tkachov wrote:
>>>> Hi all,
>>>>
>>>> This third patch implements the same algorithm as patch 1/3 but for arm.
>>>> That is, for X % N where N is a power of 2 we do:
>>>>
>>>>      rsbs    r1, r0, #0
>>>>      and     r0, r0, #(N - 1)
>>>>      and     r1, r1, #(N - 1)
>>>>      rsbpl   r0, r1, #0
>>>>
>>>> For the special case where N is 2 we do the shorter:
>>>>       cmp     r0, #0
>>>>       and     r0, r0, #1
>>>>       rsblt   r0, r0, #0
>>>>
>>>> Note that for the final conditional negate we expand to an
>>>> IF_THEN_ELSE of a NEG rather than a cond_exec rtx because the lra
>>>> dataflow analysis doesn't always deal with cond_execs correctly. The
>>>> splitters fixed in patch 2/3 then break it into a cond_exec after reload, so
>> it all works out.
>>>> Bootstrapped and tested on arm, with both ARM and Thumb2 states.
>>>>
>>>> Tests are added and shared with aarch64.
>>>>
>>>> Ok for trunk?
>>>>
>>>> Thanks,
>>>> Kyrill
>>>>
>>>> 2015-07-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>>
>>>>         * config/arm/arm.md (*subsi3_compare0): Rename to...
>>>>         (subsi3_compare0): ... This.
>>>>         (*arm_andsi3_insn): Rename to...
>>>>         (arm_andsi3_insn): ... This.
>>>>         (modsi3): New define_expand.
>>>>         * config/arm/arm.c (arm_new_rtx_costs, MOD case): Handle case
>>>>         operand is power of 2.
>>>>
>>>>
>>>> 2015-07-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>>
>>>>         * gcc.target/aarch64/mod_2.x: New file.
>>>>         * gcc.target/aarch64/mod_256.x: Likewise.
>>>>         * gcc.target/arm/mod_2.c: New test.
>>>>         * gcc.target/arm/mod_256.c: Likewise.
>>>>         * gcc.target/aarch64/mod_2.c: Likewise.
>>>>         * gcc.target/aarch64/mod_256.c: Likewise.
>
>

  reply	other threads:[~2015-09-01  8:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 11:09 Kyrill Tkachov
2015-07-31  9:00 ` Kyrill Tkachov
2015-08-10 11:14   ` Kyrill Tkachov
2015-08-19 12:51     ` Kyrill Tkachov
2015-09-01  8:38       ` Kyrill Tkachov [this message]
2015-09-07  9:46 ` Ramana Radhakrishnan
2015-09-08  8:35   ` Kyrill Tkachov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E56402.6020302@arm.com \
    --to=kyrylo.tkachov@arm.com \
    --cc=James.Greenhalgh@arm.com \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=Ramana.Radhakrishnan@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).