------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-08 17:33 ------- There is a section in the source which does this: /* Enable new loop optimizer pass if any of its optimizations is called. */ if (flag_move_loop_invariants || flag_unswitch_loops || flag_peel_loops || flag_unroll_loops || flag_branch_on_count_reg) flag_loop_optimize2 = 1;
And -fbranch-count-reg is always enabled. The documention says: -floop-optimize2 Perform loop optimizations using the new loop optimizer. The optimizations (loop unrolling, peeling and unswitching, loop invariant motion) are enabled by separate flags. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19825