From fa29266c1da984345e0637b7479bbcc4b34cafde Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 4 Dec 2018 13:23:13 +0000 Subject: [PATCH] tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations for epilogue vectorization. 2018-12-04 Richard Biener * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations for epilogue vectorization. From-SVN: r266777 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bb7187ceb2..a4d0c7c8255 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-12-04 Richard Biener + + * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations + for epilogue vectorization. + 2018-12-04 Richard Biener PR tree-optimization/88301 diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index fa926f4ebb5..8934d0e4dd0 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8501,13 +8501,13 @@ vect_transform_loop (loop_vec_info loop_vinfo) targetm.vectorize.autovectorize_vector_sizes (&vector_sizes); unsigned int next_size = 0; + /* Note LOOP_VINFO_NITERS_KNOWN_P and LOOP_VINFO_INT_NITERS work + on niters already ajusted for the iterations of the prologue. */ if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) - && LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) >= 0 && known_eq (vf, lowest_vf)) { - unsigned int eiters + unsigned HOST_WIDE_INT eiters = (LOOP_VINFO_INT_NITERS (loop_vinfo) - - 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); -- 2.30.2