https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123518
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
[...]
> I also not a fan of creating the phi and then only deleting it but I can't
> think of a better way here really.
Yeah, it would require manually piercing together CFG code from hooks. It's
not too bad since the only use of the redundant PHI def is the destination
PHI operand.
ipa-fnsummary wants to have scev & friends working, and that needs
preheaders and IIRC also latches. It might be possible to improve it
to not require those, but it really simplifies things.
But it surely needs to set_cfun() around loop_optimizer_init, so I wonder
what the issue really is.