From bcda485bdf8b8e7c645648e124e787f78846b2c6 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 3 Dec 2018 13:24:08 +0000 Subject: [PATCH] tree-vect-loop.c (vect_transform_loop): Properly compute upper bound for the epilogue when doing epilogue vectorization. 2018-12-03 Richard Biener * tree-vect-loop.c (vect_transform_loop): Properly compute upper bound for the epilogue when doing epilogue vectorization. From-SVN: r266737 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-loop.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d8c5503ebe..9f00aff51d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-12-03 Richard Biener + + * tree-vect-loop.c (vect_transform_loop): Properly compute + upper bound for the epilogue when doing epilogue vectorization. + 2018-12-03 Ilya Leoshkevich PR target/80080 diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 9589a8eeb5c..633c3154169 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -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 () -- 2.30.2