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: David Edelsohn <dje dot gcc at gmail dot com>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Jan 2014 19:42:11 -0500
- 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>
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