This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR84033, powerpc64le -moptimize-swaps bad code with vec_vbpermq
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Alan Modra <amodra at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Jan 2018 14:33:00 -0600
- Subject: Re: PR84033, powerpc64le -moptimize-swaps bad code with vec_vbpermq
- Authentication-results: sourceware.org; auth=none
- References: <20180125100921.GV20622@bubble.grove.modra.org>
On Thu, Jan 25, 2018 at 08:39:21PM +1030, Alan Modra wrote:
> vbpermq produces its output in bits 48..63 of the target vector reg,
> so the output cannot be lane swapped. Bootstrapped and regression
> tested powerpc64le-linux. OK to apply mainline, and backport to the
> branches?
>
> gcc/
> PR target/84033
> * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
> UNSPEC_VBPERMQ. Sort other unspecs.
> gcc/testsuite/
> PR target/84033
> * gcc.target/powerpc/swaps-p8-46.c: New.
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/swaps-p8-46.c
> @@ -0,0 +1,34 @@
> +/* { dg-do run { target { powerpc64le-*-* } } } */
/* { dg-do run { target { lp64 } } } */
would be better, since you only care whether you are running 64-bit
(and the target triple does not tell you; although standard configs
for powerpc64le pretty much enforce it, of course).
Okay for trunk with or without that change; okay for the branches after
looking for fallout. Thanks!
Segher