------- Comment #4 from rguenth at gcc dot gnu dot org 2009-03-06 14:16 ------- Scheduling another pass_phi_only_cprop after VRP removes the single-argument PHI nodes (I think that really cfg-cleanup should do this, as they usually result from edge removal). While this is reasonably cheap it doesn't get rid of the conditionals but that would require a forwprop run which is not that cheap (it requires only the forward_propagate_into_gimple_cond () pieces, but has to run after removing single-argument PHIs, thus cannot run at VRP substitution time).
Thus, the following would fix it: Index: passes.c =================================================================== --- passes.c (revision 144665) +++ passes.c (working copy) @@ -611,6 +611,8 @@ init_optimization_passes (void) NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_vrp); + NEXT_PASS (pass_phi_only_cprop); + NEXT_PASS (pass_forwprop); NEXT_PASS (pass_dce); NEXT_PASS (pass_cselim); NEXT_PASS (pass_tree_ifcombine); alternatively only adding pass_phi_only_cprop and calling forward_propagate_into_gimple_cond from pass_tree_ifcombine. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39390