http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50204
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-29 07:57:29 UTC --- On a 2nd thought the work should be still linear, even for N PHI args the way the merging is constructed (one arg has to dominate the other - the only exception is the diamond case which has a constant cost of two). So with some cleanup (essentially peel the first iteration of the loop) the patch should be ok as-is.