[Bug middle-end/122959] [16 Regression] Wrong-code with nvptx-offload r16-5780-g65a3849eb46df2 (vect: early break forced live IVs as scalar)

tnfchris at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 2 14:28:20 GMT 2025


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.


More information about the Gcc-bugs mailing list