http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418
--- Comment #23 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 10 Mar 2014, hjl.tools at gmail dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418 > > --- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> --- > (In reply to Richard Biener from comment #13) > > Huh, adding a pre-header should _never_ do sth like that. Can you produce > > a small testcase that exhibits these kind of changes with adding/removing > > a preheader? > > copyprop2 pass removed a preheader and cunrolli pass added it back: > > <bb 3>: > # n_213 = PHI <1(2)> > > <bb 8>: > # n_8 = PHI <n_213(3), n_218(9)> Not sure how it manages to add this kind of PHI node for just adding a preheader? That looks odd to me. > copyprop3 pass optimized it to > > <bb 3>: > n_213 = 1; > > <bb 4>: > # n_8 = PHI <1(3), n_218(7)> > > Then the unused n_213 disappeared in reassoc1 pass and n_213 was > put on FREE_SSANAMES. By dce1 probably. That's all expected optimizations and not really dependent on preheader add/remove. Richard.