[3/4] Don't vectorise single-iteration epilogues

Richard Biener richard.guenther@gmail.com
Wed Nov 6 11:56:00 GMT 2019


On Mon, Nov 4, 2019 at 4:30 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> With a later patch I saw a case in which we peeled a single iteration
> for gaps but didn't need to peel further iterations to make up a full
> vector.  We then tried to vectorise the single-iteration epilogue.

But when peeling for gaps we peel off a full vector iteration and thus
have possibly VF-1 iterations in the epilogue, enough for vectorizing
with VF/2?

>
> 2019-11-04  Richard Sandiford  <richard.sandiford@arm.com>
>
> gcc/
>         * tree-vect-loop.c (vect_analyze_loop): Only try to vectorize
>         the epilogue if there are peeled iterations for it to handle.
>
> Index: gcc/tree-vect-loop.c
> ===================================================================
> --- gcc/tree-vect-loop.c        2019-11-04 15:18:26.684592505 +0000
> +++ gcc/tree-vect-loop.c        2019-11-04 15:18:36.608524542 +0000
> @@ -2462,6 +2462,7 @@ vect_analyze_loop (class loop *loop, loo
>           vect_epilogues = (!loop->simdlen
>                             && loop->inner == NULL
>                             && PARAM_VALUE (PARAM_VECT_EPILOGUES_NOMASK)
> +                           && LOOP_VINFO_PEELING_FOR_NITER (first_loop_vinfo)
>                             /* For now only allow one epilogue loop.  */
>                             && first_loop_vinfo->epilogue_vinfos.is_empty ());
>



More information about the Gcc-patches mailing list