On Wed, Mar 23, 2011 at 1:42 PM, Michael Meissner
<meiss...@linux.vnet.ibm.com> wrote:
> Pat Haugen noticed we were doing stores in benchmarks where we were doing
> vector reductions to extract the final float element.  So I decided to take a
> look.  This code implements the vector reductions without doing stores for
> float vectors, and eliminates a vector shift for double vectors.
>
> I suspect there are more opportunities for improving vector extract and insert
> with VSX.
>
> I did a bootstrap and make check with no regressions.  Is this ok to install 
> on
> the trunk?
>
> [gcc]
> 2011-03-23  Michael Meissner  <meiss...@linux.vnet.ibm.com>
>
>        PR target/48258
>        * config/rs6000/vector.md (UNSPEC_REDUC): New unspec for vector
>        reduction.
>        (VEC_reduc): New code iterator and splitters for vector reduction.
>        (VEC_reduc_name): Ditto.
>        (VEC_reduc_rtx): Ditto.
>        (reduc_<VEC_reduc_name>_v2df): Vector reduction expanders for VSX.
>        (reduc_<VEC_reduc_name>_v4sf): Ditto.
>
>        * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Add
>        support for extracting SF on VSX.
>
>        * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): New insn for
>        generating xscvspdp.
>        (vsx_extract_v4sf): New insn to extract SF from V4SF vector.
>        (vsx_reduc_<VEC_reduc_name>_v2df): New insns and splitters for
>        double add, minimum, maximum vector reduction.
>        (vsx_reduc_<VEC_reduc_name>_v4sf): Ditto.
>        (vsx_reduc_<VEC_reduc_name>_v2df2_scalar): New combiner insn to
>        optimize double vector reduction.
>        (vsx_reduc_<VEC_reduc_name>_v4sf_scalar): Ditto.
>
> [gcc/testsuite]
> 2011-03-23  Michael Meissner  <meiss...@linux.vnet.ibm.com>
>
>        PR target/48258
>        * gcc.target/powerpc/pr48258-1.c: New file.
>        * gcc.target/powerpc/pr48258-2.c: Ditto.

The additions are okay.

Except the patch includes a change to pattern vsx_xxpermdi_<mode> that
is not explained nor mentioned in the ChangeLog.

- David

Reply via email to