http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30521
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-04 01:44:32 UTC --- We could do this at the tree level. First do add a late PHIOPT which does the conversion to a COND_EXPR and then simplify a?b+1:b into a+b. Likewise for a?b+2:b+1 to a+b+1.