On Mon, Jun 13, 2022 at 9:39 AM Takayuki 'January June' Suwa
<jjsuwa_sys3...@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 via email to