This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Handle vector reductions in swap optimization
- 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: Wed, 6 Jan 2016 20:51:33 -0500
- Subject: Re: [PATCH, rs6000] Handle vector reductions in swap optimization
- Authentication-results: sourceware.org; auth=none
- References: <1452119860 dot 3351 dot 13 dot camel at gnopaine>
On Wed, Jan 6, 2016 at 5:37 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Hi,
>
> Swap optimization is missing some opportunities when vector reductions
> are present. This patch adds logic to recognize vector-reduction
> patterns and mark them as swappable. Some of these are very easy to
> recognize, given the presence of a specific unspec. For V2DF
> reductions, we have to recognize a specific somewhat complex pattern.
>
> I've added test cases to verify swap optimization works correctly on
> reductions for V2DF and V4SF.
>
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
> regressions. Is this ok for trunk? I would also like to backport this
> to GCC 5 after a settling period.
>
> Thanks,
> Bill
>
>
> [gcc]
>
> 2016-01-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
>
> * config/rs6000/rs6000.c (v2df_reduction_p): New function.
> (rtx_is_swappable_p): Reductions are swappable.
> (insn_is_swappable_p): V2DF reductions are swappable.
>
> [gcc/testsuite]
>
> 2016-01-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
>
> * gcc.target/powerpc/swaps-p8-23.c: New test.
> * gcc.target/powerpc/swaps-p8-24.c: Likewise.
This is okay for trunk, but not for GCC 5 branch because this is not a bug fix.
Thanks, David