https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114704
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- We're not handling "phi translation" in the lookup phase when determining if there's a redundant store (PHI translation for the virtual operand). In particular value-numbering never considers whether an expression in multiple paths into a CFG merge value-numbers the same. This is only done as part of PRE which figures some extra fully redundant expressions. But the redundant store removal is something done after-the-fact using just the VN machinery.