This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Avoid optimization problem for VEC_PERM_EXPR
- From: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Jan 2014 19:48:03 -0600
- Subject: Re: [PATCH, rs6000] Avoid optimization problem for VEC_PERM_EXPR
- Authentication-results: sourceware.org; auth=none
- References: <1390520607 dot 3449 dot 92 dot camel at gnopaine> <CAGWvnykRhd2WQY5guNWFLnRzCMtvJtLfGFjr8=kpVFt7FzkPNw at mail dot gmail dot com>
On Thu, 2014-01-23 at 19:42 -0500, David Edelsohn wrote:
> 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?
Oh, sure. Will do.
Bill
>
> Thanks, David
>