https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113374
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
The code populating alternative exit virtual PHIs simply doesn't handle more
than one arg ...
/* Now link the alternative exits. */
if (multiple_exits_p)
{
...
SET_PHI_ARG_DEF (l_phi, 0, exit_val);
we're losing the original ones doing
for (auto exit : loop_exits)
{
basic_block dest = main_loop_exit_block;
if (exit != loop_exit)
{
if (!alt_loop_exit_block)
{
edge res = redirect_edge_and_branch (
exit,
new_preheader);
flush_pending_stmts (res);
alt_loop_exit_block = split_edge (res);
continue;
}
dest = alt_loop_exit_block;
}
edge e = redirect_edge_and_branch (exit, dest);
flush_pending_stmts (e);
}
since that creates a new BB without any virtual PHI.