https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122959

--- Comment #5 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
So the bug happens because there's an empty forwarding block created by
skip_epilog.

We delay updating the PHI nodes now, but update_e is a pointer to an edge.
The skip_epilog code when I splits the edge will mutate what update_e points to
and if the condition is false leaves us with an empty forwarding block.

This causes update_e to use the forwarding block rather than the loop header of
the epilogue so the PHIs aren't updated.

Testing a trivial fix.

Reply via email to