This moves VRP after late DOM. This is because VRP has a hard time dealing with non-copyproped (and not CSEd) IL and conveniently DOM provides both. I noticed this when working on PR56273 where we miss quite some VRP opportunities because of this. I cannot think of a good reason to have the current order, so I am going ahead with this after SVN is back.
Bootstrap and regtest running on x86_64-unknown-linux-gnu. While I have the patch in my tree for quite a while I don't remember testing it, so the patch may get some additional testsuite fallout changes. Richard. 2013-03-18 Richard Biener <rguent...@suse.de> PR tree-optimization/56273 * passes.c (init_optimization_passes): Move second VRP after DOM. Index: gcc/passes.c =================================================================== --- gcc/passes.c (revision 195938) +++ gcc/passes.c (working copy) @@ -1488,7 +1488,6 @@ init_optimization_passes (void) NEXT_PASS (pass_lower_vector_ssa); NEXT_PASS (pass_cse_reciprocals); NEXT_PASS (pass_reassoc); - NEXT_PASS (pass_vrp); NEXT_PASS (pass_strength_reduction); NEXT_PASS (pass_dominator); /* The only const/copy propagation opportunities left after @@ -1497,6 +1496,7 @@ init_optimization_passes (void) only examines PHIs to discover const/copy propagation opportunities. */ NEXT_PASS (pass_phi_only_cprop); + NEXT_PASS (pass_vrp); NEXT_PASS (pass_cd_dce); NEXT_PASS (pass_tracer);