------- Additional Comments From nathan at gcc dot gnu dot org 2004-10-12 10:34 ------- I think this is an artifact of the design of the current value range propagation. That's not really range propagation by comparison result CSEing. The loop exit is i < 10, and the next comparison is i == 15. We can propagate the 'i < 10' result and deduce that i == 15 must be false. The later i == -5 can't be determined from the result of i < 10.
I suspect this will be much easier to fix with a proper SSA VRP pass. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17100