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 v2 1/4] xtensa: Improve shift operations more
Date: Mon, 13 Jun 2022 17:31:13 -0700	[thread overview]
Message-ID: <CAMo8BfLz4NnBggUmcR5KLQGoFaLcnCGMdJrEXTjrggzFPEzAYw@mail.gmail.com> (raw)
In-Reply-To: <84fed208-0253-b04d-c8e5-b910fc8cb321@yahoo.co.jp>

On Mon, Jun 13, 2022 at 9:39 AM Takayuki 'January June' Suwa
<jjsuwa_sys3175@yahoo.co.jp> wrote:
>
> Changes from v1:
>   (*shift_per_byte_omit_AND_1): changed to be split as early as possible
>
>
> ===
> This patch introduces funnel shifter utilization, and rearranges existing
> "per-byte shift" insn patterns.
>
> gcc/ChangeLog:
>
>         * config/xtensa/predicates.md (logical_shift_operator,
>         xtensa_shift_per_byte_operator): New predicates.
>         * config/xtensa/xtensa-protos.h (xtensa_shlrd_which_direction):
>         New prototype.
>         * config/xtensa/xtensa.cc (xtensa_shlrd_which_direction):
>         New helper function for funnel shift patterns.
>         * config/xtensa/xtensa.md (ior_op): New code iterator.
>         (*ashlsi3_1): Replace with new split pattern.
>         (*shift_per_byte): Unify *ashlsi3_3x, *ashrsi3_3x and *lshrsi3_3x.
>         (*shift_per_byte_omit_AND_0, *shift_per_byte_omit_AND_1):
>         New insn-and-split patterns that redirect to *xtensa_shift_per_byte,
>         in order to omit unnecessary bitwise AND operation.
>         (*shlrd_reg_<code>, *shlrd_const_<code>, *shlrd_per_byte_<code>,
>         *shlrd_per_byte_<code>_omit_AND):
>         New insn patterns for funnel shifts.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/xtensa/funnel_shifter.c: New.
> ---
>  gcc/config/xtensa/predicates.md               |   6 +
>  gcc/config/xtensa/xtensa-protos.h             |   1 +
>  gcc/config/xtensa/xtensa.cc                   |  14 ++
>  gcc/config/xtensa/xtensa.md                   | 213 ++++++++++++++----
>  .../gcc.target/xtensa/funnel_shifter.c        |  17 ++
>  5 files changed, 213 insertions(+), 38 deletions(-)
>  create mode 100644 gcc/testsuite/gcc.target/xtensa/funnel_shifter.c

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

-- 
Thanks.
-- Max

      reply	other threads:[~2022-06-14  0:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 16:38 Takayuki 'January June' Suwa
2022-06-14  0:31 ` 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=CAMo8BfLz4NnBggUmcR5KLQGoFaLcnCGMdJrEXTjrggzFPEzAYw@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).