On Fri, Jan 31, 2014 at 6:36 PM, Bill Schmidt
<wschm...@linux.vnet.ibm.com> wrote:
> Hi,
>
> One more patch in the set supporting -maltivec=be for the Altivec
> builtins, this one for vec_perm.  Most of the work was done already in
> rs6000.c:altivec_expand_vec_perm_le ().  We can reuse this logic for the
> present work by generalizing the code to operate on vector types other
> than V16QImode.
>
> When -maltivec=be is specified for a little endian target, we call that
> routine to expand the builtin rather than generating the vperm pattern
> directly.  The pattern is then matched by
> *altivec_vperm_<mode>{,_uns}_internal to generate the actual vperm
> instruction.
>
> There are two new test cases that verify correct vec_perm behavior for
> BE, LE, and LE with -maltivec=be.  Because vec_perm now works the same
> for BE and LE without -maltivec=be, one existing test needs modification
> to avoid the previous workaround for endianness.
>
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
> regressions.  Is this ok for trunk?
>
> Thanks,
> Bill
>
>
> gcc:
>
> 2014-01-31  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         * config/rs6000/rs6000.c (altivec_expand_vec_perm_le): Generalize
>         for vector types other than V16QImode.
>         * config/rs6000/altivec.md (altivec_vperm_<mode>): Change to a
>         define_expand, and call altivec_expand_vec_perm_le when producing
>         code with little endian element order.
>         (*altivec_vperm_<mode>_internal): New insn having previous
>         behavior of altivec_vperm_<mode>.
>         (altivec_vperm_<mode>_uns): Change to a define_expand, and call
>         altivec_expand_vec_perm_le when producing code with little endian
>         element order.
>         (*altivec_vperm_<mode>_uns_internal): New insn having previous
>         behavior of altivec_vperm_<mode>_uns.
>
> gcc/testsuite:
>
> 2014-01-31  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         * gcc.dg/vmx/3b-15.c: Remove special handling for little endian.
>         * gcc.dg/vmx/perm.c: New.
>         * gcc.dg/vmx/perm-be-order.c: New.

Okay.

Thanks, David

Reply via email to