On Tue, Jun 9, 2020 at 3:22 PM Alex Coplan <alex.cop...@arm.com> wrote:
>
> > -----Original Message-----
> > From: Gcc-patches <gcc-patches-boun...@gcc.gnu.org> On Behalf Of Richard
> > Biener
> > Sent: 05 May 2020 14:49
> > To: gcc-patches@gcc.gnu.org
> > Subject: [PATCH] move permutation validity check
> >
> >
> > This delays the SLP permutation check to vectorizable_load and optimizes
> > permutations only after all SLP instances have been generated and the
> > vectorization factor is determined.
> >
> > Bootstrap and regtest running on x86_64-unknown-linux-gnu.
> >
> > Richard.
>
> Hi Richard,
>
> This patch (bc484e25) introduced a test failure on arm and aarch64. The
> test gcc.dg/vect/slp-perm-9.c is now failing with:
>
> FAIL: gcc.dg/vect/slp-perm-9.c scan-tree-dump-times vect "permutation 
> requires at least three vectors" 1
>
> It seems this assertion isn't run on x86-64 which explains why this was
> missed.

Please open a bugreport if there's none already.

Thanks,
Richard.

>
> Thanks,
> Alex
>
> >
> > 2020-05-05  Richard Biener  <rguent...@suse.de>
> >
> >       * tree-vectorizer.h (vec_info::slp_loads): New.
> >       (vect_optimize_slp): Declare.
> >       * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts):  Do
> >       nothing when there are no loads.
> >       (vect_gather_slp_loads): Gather loads into a vector.
> >       (vect_supported_load_permutation_p): Remove.
> >       (vect_analyze_slp_instance): Do not verify permutation
> >       validity here.
> >       (vect_analyze_slp): Optimize permutations of reductions
> >       after all SLP instances have been gathered and gather
> >       all loads.
> >       (vect_optimize_slp): New function split out from
> >       vect_supported_load_permutation_p.  Elide some permutations.
> >       (vect_slp_analyze_bb_1): Call vect_optimize_slp.
> >       * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
> >       * tree-vect-stmts.c (vectorizable_load): Check whether
> >       the load can be permuted.  When generating code assert we can.
> >
> >       * gcc.dg/vect/bb-slp-pr68892.c: Adjust for not supported
> >       SLP permutations becoming builds from scalars.
> >       * gcc.dg/vect/bb-slp-pr78205.c: Likewise.
> >       * gcc.dg/vect/bb-slp-34.c: Likewise.
> > ---
> >  gcc/testsuite/gcc.dg/vect/bb-slp-34.c      |   3 +-
> >  gcc/testsuite/gcc.dg/vect/bb-slp-pr68892.c |   7 +-
> >  gcc/testsuite/gcc.dg/vect/bb-slp-pr78205.c |   6 +-
> >  gcc/tree-vect-loop.c                       |   3 +
> >  gcc/tree-vect-slp.c                        | 262 +++++++++++------------
> > ------
> >  gcc/tree-vect-stmts.c                      |  50 +++++-
> >  gcc/tree-vectorizer.h                      |   4 +-
> >  7 files changed, 154 insertions(+), 181 deletions(-)

Reply via email to