https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103117
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- uncprop is supposed to reduce the number of copies required when expanding PHIs via coalescing which is never possible for constant PHI arguments, so yes, we do want this and maybe also for the case in question split out a forwarder to have only a single set of zero. I suppose modref could (for pointer returns) use ranger to query its range and see if it ever is non-NULL? I'm not sure if we reliably propagate null pointer constants everywhere. Btw, uncprop is supposed to run right before RTL expansion - it is in fact an out-of-SSA optimization, so even removing it as separate pass and directly calling it from rewrite_out_of_ssa after eliminate_useless_phis might be an improvement.