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] Avoid optimization problem for VEC_PERM_EXPR


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


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