Hi, this patch updates last few places to use likely upper bounds. I do not think any of these passes has resonable coverage in our benchmarking (the unswitch test is very special case), so I do not expect any performance changes for this.
Bootstrapped/regtested x86_64-linux, comitted. Honza * loop-dolop.c (doloop_optimize): Us likely max iteration bound. * tree-partloops.c (parallelize_loops): likewise. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop, tree_unswitch_outer_loop): likewise. Index: loop-doloop.c =================================================================== --- loop-doloop.c (revision 236984) +++ loop-doloop.c (working copy) @@ -638,7 +638,7 @@ doloop_optimize (struct loop *loop) est_niter = get_estimated_loop_iterations_int (loop); if (est_niter == -1) - est_niter = get_max_loop_iterations_int (loop); + est_niter = get_likely_max_loop_iterations_int (loop); if (est_niter >= 0 && est_niter < 3) { Index: tree-parloops.c =================================================================== --- tree-parloops.c (revision 236984) +++ tree-parloops.c (working copy) @@ -3288,7 +3288,7 @@ parallelize_loops (bool oacc_kernels_p) estimated = estimated_stmt_executions_int (loop); if (estimated == -1) - estimated = max_stmt_executions_int (loop); + estimated = likely_max_stmt_executions_int (loop); /* FIXME: Bypass this check as graphite doesn't update the count and frequency correctly now. */ if (!flag_loop_parallelize_all Index: tree-ssa-loop-unswitch.c =================================================================== --- tree-ssa-loop-unswitch.c (revision 236984) +++ tree-ssa-loop-unswitch.c (working copy) @@ -224,7 +224,7 @@ tree_unswitch_single_loop (struct loop * for unswitching. */ iterations = estimated_loop_iterations_int (loop); if (iterations < 0) - iterations = max_loop_iterations_int (loop); + iterations = likely_max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS)) @@ -442,7 +442,7 @@ tree_unswitch_outer_loop (struct loop *l for unswitching. */ iterations = estimated_loop_iterations_int (loop); if (iterations < 0) - iterations = max_loop_iterations_int (loop); + iterations = likely_max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS))