------- Comment #9 from rguenth at gcc dot gnu dot org 2010-03-21 23:07 ------- (In reply to comment #8) > (In reply to comment #7) > > The problem is that copyprop does this change: > > > > @@ -25,7 +25,7 @@ > > <bb 12>: > > # .MEM_16 = PHI <.MEM_18(10), .MEM_20(11)> > > # s_66 = PHI <s_1(10), s_1(11)> > > - s_13 = s_66; > > + s_13 = s_1; > > goto <bb 16> (got_it); > > > > } > > > > then verify_loop_closed_ssa () complains about the fact that s_1 is > > defined in loop_1 and used outside loop_1 in a non close-phi node. > > Ah, copyprop avoids _single_ arg PHIs because that may break loop-closed > SSA form. Why does loop closed SSA form suddenly have double-arg > loop-closed PHI nodes? > > Indeed Sebastians patch is a non-suitable hammer. Copyprop already tries > to avoid breaking loop-closed SSA form.
/* In loop-closed SSA form do not copy-propagate through PHI nodes. Technically this is only needed for loop exit PHIs, but this is difficult to query. */ || (current_loops && gimple_phi_num_args (phi) == 1 && loops_state_satisfies_p (LOOP_CLOSED_SSA))) Thus it seems that && gimple_phi_num_args (phi) == 1 should be removed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43464