https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79547
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Most likely the alias analysis thinks s escapes such that f touches it. Look at the alias dump and also add -vops to the dump option.