https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103144
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- So neither cunroll itself nor the triggered FRE afterwards do what forwprop would do - fold each stmt. There's no propagation into them so FRE doesn't fold, but we don't fold at stmt creation time (that's just copy_bb, so understandable). Supposedly cunroll could invoke a per-BB forwprop or the region FRE could be teached to fold all stmts instead of just the modified ones (but it's the outermost loop so only the scalar-cleanup whole function FRE pass triggers here). Ideally cunroll IL copying would do folding & FRE on-the-fly.