------- Comment #3 from steven at gcc dot gnu dot org 2010-07-25 10:29 ------- VRP does this with ASSERT_EXPRs. DOM does not optimize this because bb4 has two predecessors, and record_equivalences_from_incoming_edge only records from a single predecessor.
This should probably be handled record_equivalences_from_phis by looking at the value of the incoming argument, before calling operand_equal_for_phi_arg_p. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43940