------- Comment #7 from steven at gcc dot gnu dot org 2007-10-16 13:32 ------- I would expect that tail merging (cross-jumping in gcc jargon) would merge the two paths.
Better yet would be to optimize this earlier, and for that we need code hoisting (re. comment #1, I think it is eliminated because we run code hoisting at -Os). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24001