This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, rs6000] Add support for xxpermr and vpermr instructions


On Thu, Mar 17, 2016 at 2:58 PM, Kelvin Nilsen
<kdnilsen@linux.vnet.ibm.com> wrote:
>
> This patch adds support for two new Power9 instructions, xxpermr and vpermr,
> providing more efficient vector permutation operations on
> little-endian configurations. These new instructions are described in
> the Power ISA 3.0 document.  Selection of the new instructions is
> conditioned upon TARGET_P9_VECTOR and !VECTOR_ELT_ORDER_BIG.
>
> The patch has bootstrapped and tested on powerpc64le-unknown-linux-gnu
> and powerpc64-unknown-linux-gnu with no regressions.  Is this ok for GCC 7
> when stage 1 opens?
>
> (A previous version of this patch was distributed and approved, but further
> experience with testing of P9 fusion instructions revealed a problem with
> that particular code expansion.  So this new revision of the patch omits the
> fusion instruction generation pattern.)
>
> Thanks.
>
> gcc/testsuite/ChangeLog:
>
> 2016-03-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
>
>         * gcc.target/powerpc/p9-permute.c: Generalize test to run on
>         big-endian Power9 in addition to little-endian Power9.
>         * gcc.target/powerpc/p9-vpermr.c: New test.
>
>
> gcc/ChangeLog:
>
> 2016-03-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
>
>         * config/rs6000/altivec.md: (UNSPEC_VPERMR): New unspec
>         constant.
>         (*altivecvpermr_<mode>_internal): New insn.
>         * config/rs6000/rs6000.c (rs6000_expand_vector_set): If
>         !BYTES_BIG_ENDIAN and TARGET_P9_VECTOR, expand using template
>         that translates into new xxpermr or vpermr instructions.
>         (altivec_expand_vec_perm_le): if TARGET_P9_VECTOR, expand using
>         template that translates into new xxpermr or vpermr
>         instructions.

This is okay for GCC 7.

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]