https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122493
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
Keywords| |missed-optimization
Last reconfirmed| |2025-10-30
Ever confirmed|0 |1
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
>However I think this can be done by cfgcleanup itself.
there is some code trying to do it via forwarder blocks opt but that rejects
this BB due to the phi ...
In fact the only difference between cleanupcfg and merge_phi is the support of
the phi.
if (tree_forwarder_block_p (bb, false)
&& remove_forwarder_block (bb))
return true;
vs:
/* Look for a forwarder block with PHI nodes. */
if (!tree_forwarder_block_p (bb, true))
continue;
So merging merge_phi into cleanup cfg might be a good idea I think and then we
can remove merge_phi even.