https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82220

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-09-15
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
   Target Milestone|---                         |8.0
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm.  I suppose veclen is 2 or 4 then...  the question is what to do in general
here - we might argue that the epilogue peeling doesn't really count but I'm
not sure if 

Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c        (revision 252780)
+++ gcc/tree-vect-loop.c        (working copy)
@@ -3663,8 +3663,8 @@ vect_estimate_min_profitable_iters (loop
               min_profitable_iters);

   /* We want the vectorized loop to execute at least once.  */
-  if (min_profitable_iters < (vf + peel_iters_prologue + peel_iters_epilogue))
-    min_profitable_iters = vf + peel_iters_prologue + peel_iters_epilogue;
+  if (min_profitable_iters < (vf + peel_iters_prologue))
+    min_profitable_iters = vf + peel_iters_prologue;

   if (dump_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,

is enough to fix the regression - maybe you can check?

Reply via email to