public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: "Takayuki 'January June' Suwa" <jjsuwa_sys3175@yahoo.co.jp>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 3/5] xtensa: Add some dedicated patterns that correspond to GIMPLE canonicalizations
Date: Wed, 15 Jun 2022 17:01:23 -0700	[thread overview]
Message-ID: <CAMo8BfLaJqxc_2FvZHW+H_8zTm3tTZeWq1GE=r9RRh4dRv-8kQ@mail.gmail.com> (raw)
In-Reply-To: <6713ecef-b26f-b1ec-cfff-f41535c7d7f9@yahoo.co.jp>

On Mon, Jun 13, 2022 at 8:54 PM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> This patch offers better RTL representations against straightforward
> derivations from some tree optimizers' canonicalized forms.
>
> - rounding up to even, such as '(x + (x & 1))', is canonicalized to
>   '((x + 1) & -2)', but the former is one instruction less than the latter
>   in Xtensa ISA.
> - signed greater or equal to zero as logical value '((signed)x >= 0)',
>   is canonicalized to '((unsigned)(x ^ -1) >> 31)', but the equivalent
>   '(((signed)x >> 31) + 1)' is one instruction less.
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.md (*round_up_to_even):
>         New insn-and-split pattern.
>         (*signed_ge_zero): Ditto.
> ---
>  gcc/config/xtensa/xtensa.md | 45 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)

Regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.

-- 
Thanks.
-- Max

      reply	other threads:[~2022-06-16  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  3:37 Takayuki 'January June' Suwa
2022-06-16  0:01 ` Max Filippov [this message]

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='CAMo8BfLaJqxc_2FvZHW+H_8zTm3tTZeWq1GE=r9RRh4dRv-8kQ@mail.gmail.com' \
    --to=jcmvbkbc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jjsuwa_sys3175@yahoo.co.jp \
    /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).