tree-vect-loop.c (vect_transform_loop): Properly compute upper bound for the epilogue...
authorRichard Biener <rguenther@suse.de>
Mon, 3 Dec 2018 13:24:08 +0000 (13:24 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 3 Dec 2018 13:24:08 +0000 (13:24 +0000)
2018-12-03  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (vect_transform_loop): Properly compute
upper bound for the epilogue when doing epilogue vectorization.

From-SVN: r266737

gcc/ChangeLog
gcc/tree-vect-loop.c

index 3d8c5503ebe152d32e4a630d44c4052a95e5fe9c..9f00aff51d9d39eac97d4e83788fd77641bc836f 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-03  Richard Biener  <rguenther@suse.de>
+
+       * tree-vect-loop.c (vect_transform_loop): Properly compute
+       upper bound for the epilogue when doing epilogue vectorization.
+
 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
 
        PR target/80080
index 9589a8eeb5ceb4848e78ff07b80cc7059a819a15..633c31541694e4ddc8e8aaee01d20e7946b4be19 100644 (file)
@@ -8548,9 +8548,12 @@ vect_transform_loop (loop_vec_info loop_vinfo)
        {
          unsigned int eiters
            = (LOOP_VINFO_INT_NITERS (loop_vinfo)
-              - LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo));
-         eiters = eiters % lowest_vf;
+              - LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo)
+              - LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo));
+         eiters
+           = eiters % lowest_vf + LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo);
          epilogue->nb_iterations_upper_bound = eiters - 1;
+         epilogue->any_upper_bound = true;
 
          unsigned int ratio;
          while (next_size < vector_sizes.length ()