------- Comment #10 from steven at gcc dot gnu dot org 2010-02-13 11:39 ------- In the test case of comment #2, the history of the funny PHIs is really odd. At -O2 we end with this in the .optimized dump:
<bb 3>: # i_1 = PHI <0(2)> # s_11 = PHI <0(2)> <bb 4>: # i_12 = PHI <i_1(3), i_7(4)> # s_13 = PHI <s_11(3), s_6(4)> But the history of the phi of i_12 looks like this: t.c.120t.reassoc2: # i_12 = PHI <i_7(3), 0(2)> t.c.121t.vrp2: # i_12 = PHI <i_2(3), i_7(7)> t.c.121t.vrp2: # i_12 = PHI <0(3), i_7(4)> t.c.122t.dom2: # i_12 = PHI <0(3), i_7(4)> t.c.123t.phicprop2: # i_12 = PHI <0(2), i_7(3)> t.c.124t.cddce2: # i_12 = PHI <i_1(3), i_7(6)> Somehow we have re-introduced the special PHI "# i_1 = PHI <0(2)>" in the .cddce2 pass. The reason is that we created a loop pre-header. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42839