https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114768
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- It's the combine pass that removes the seemingly noop-move. For QOI reasons GCC preserves volatile accesses elsewhere even when inconsistency is directly visible like here.