Hi, this patch updates ivopts to use likely upper bounds. Bootstrapped/regtested x86_64-linux and comitted. (I will update all the loop passes, but want to do it one by one so we have performance tracked.)
Honza * tree-ssa-loop-ivopts.c (estimated_stmt_executions_int): Use likely_max_stmt_executions_int. Index: tree-ssa-loop-ivopts.c =================================================================== --- tree-ssa-loop-ivopts.c (revision 236850) +++ tree-ssa-loop-ivopts.c (working copy) @@ -127,7 +127,7 @@ avg_loop_niter (struct loop *loop) HOST_WIDE_INT niter = estimated_stmt_executions_int (loop); if (niter == -1) { - niter = max_stmt_executions_int (loop); + niter = likely_max_stmt_executions_int (loop); if (niter == -1 || niter > AVG_LOOP_NITER (loop)) return AVG_LOOP_NITER (loop); }