From: Jan Hubicka Date: Thu, 21 Apr 2016 08:52:41 +0000 (+0200) Subject: tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also max_loop_iterations_int. X-Git-Tag: basepoints/gcc-8~7514 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0305f3a5b2d64cc8143ad3a1aa8a704c10f91c7;p=thirdparty%2Fgcc.git tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also max_loop_iterations_int. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also max_loop_iterations_int. (tree_unswitch_outer_loop): Likewise. From-SVN: r235315 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 55d9708336bf..d24599f7dcc6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-04-18 Jan Hubicka + + * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also + max_loop_iterations_int. + (tree_unswitch_outer_loop): Likewise. + 2016-04-20 Bin Cheng PR tree-optimization/69489 diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index dd6fd01256a2..77acd66e9973 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -223,6 +223,8 @@ tree_unswitch_single_loop (struct loop *loop, int num) /* If the loop is not expected to iterate, there is no need for unswitching. */ iterations = estimated_loop_iterations_int (loop); + if (iterations < 0) + iterations = max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS)) @@ -439,6 +441,8 @@ tree_unswitch_outer_loop (struct loop *loop) /* If the loop is not expected to iterate, there is no need for unswitching. */ iterations = estimated_loop_iterations_int (loop); + if (iterations < 0) + iterations = max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS))