------- Comment #3 from jakub at gcc dot gnu dot org 2008-09-02 16:44 ------- Why got this even marked as regression? GCC 4.3.1 didn't support -ftree-loop-distribution, it is a new option, so it can't regress. The loop in question is: <bb 8>: # state_89 = PHI <state_17(9), state_5(7)> # prephitmp.18_6 = PHI <state_89(9), pretmp.17_59(7)> state_17 = state_89->next_alt_state; state_89->next_alt_state = prephitmp.18_6; first_free_alt_state_lsm.29_18 = state_89; if (state_17 != 0B) goto <bb 9>; else goto <bb 10>;
<bb 9>: goto <bb 8>; and gets distributed into: <bb 16>: # state_62 = PHI <state_22(17), state_5(7)> # prephitmp.18_26 = PHI <state_62(17), pretmp.17_59(7)> state_22 = state_62->next_alt_state; state_62->next_alt_state = prephitmp.18_26; if (state_22 != 0B) goto <bb 17>; else goto <bb 18>; <bb 17>: goto <bb 16>; <bb 18>: # prephitmp.18_90 = PHI <prephitmp.18_26(16)> <bb 8>: # state_89 = PHI <state_17(9), state_5(18)> state_17 = state_89->next_alt_state; state_89->next_alt_state = prephitmp.18_90; first_free_alt_state_lsm.29_18 = state_89; if (state_17 != 0B) goto <bb 9>; else goto <bb 10>; <bb 9>: goto <bb 8>; Perhaps tree-loop-distribution.c is confused by a PHI depending on previous PHI result? -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |spop at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36908