diff options
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-vect-loop-manip.c | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 722b94b..cd59b02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,14 @@ Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> + * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): Set + nb_iterations to the number of latch iterations rather than the + number of loop iterations. + +2016-11-16 Richard Sandiford <richard.sandiford@arm.com> + Alan Hayward <alan.hayward@arm.com> + David Sherwood <david.sherwood@arm.com> + * combine.c (maybe_swap_commutative_operands): New function. (combine_simplify_rtx): Use it. (change_zero_ext): Likewise. diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 6bfd332..4c6b8c7 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -285,7 +285,10 @@ slpeel_make_loop_iterate_ntimes (struct loop *loop, tree niters) LOCATION_LINE (loop_loc)); dump_gimple_stmt (MSG_NOTE, TDF_SLIM, cond_stmt, 0); } - loop->nb_iterations = niters; + + /* Record the number of latch iterations. */ + loop->nb_iterations = fold_build2 (MINUS_EXPR, TREE_TYPE (niters), niters, + build_int_cst (TREE_TYPE (niters), 1)); } /* Helper routine of slpeel_tree_duplicate_loop_to_edge_cfg. |