https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123113
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Some thoughts on this: Start by adding the forwarder block always (when there are more than 2 preds for the join bb) in phiopt/cselim and then move over to a helper function to do it only when things factor out (stores or stmts) . Note adding forwarder block always i suspect will introduce regressions in some handling of phiopt blocks which is why I will do it when a factor will happen. Plus I think adding the forwarder block always is not good for compile time as it will be removed at the next time cleanupcfg is run which might be right away.
