[PATCH, rs6000] Avoid optimization problem for VEC_PERM_EXPR

David Edelsohn dje.gcc@gmail.com
Fri Jan 24 00:42:00 GMT 2014

On Thu, Jan 23, 2014 at 6:43 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Hi,
> While testing another patch, I hit a regression at -O2 for two of the
> vector shuffle tests.  This patch fixes the problem.
> The problem was introduced with the little endian fixes for
> VEC_PERM_EXPR.  The original change performed the necessary
> transformation at expand time, but this is incorrect.  This creates a
> technically incorrect representation in the RTL, and RTL simplification
> can subsequently fold the expression in an unexpected way.  The correct
> fix is to delay the transformation until final code generation.
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
> regressions.  Is this ok for trunk?  I will also plan to backport this
> to ibm/gcc-4_8-branch after burn-in.
> Thanks,
> Bill
> 2014-01-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Remove
>         correction for little endian...
>         * config/rs6000/vsx.md (vsx_xxpermdi2_<mode>_1): ...and move it to
>         here.

Okay. Would you please move the comment also?

Thanks, David

More information about the Gcc-patches mailing list