http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-02-04 02:33:16 UTC --- tail merge should be able to do this. It currently does not though for the provided testcase in comment #1 but that is PR 52009. Also note cselim should be able to do it too.