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.


2019-11-04  Richard Sandiford  <richard.sandif...@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 ());
 

Reply via email to