https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121756
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we chose to sink the store to after an exit of an irreducible region (which
does not contain a VDEF), but then select_best_block moves the location up
_into_ the irreducible region. A situation
/* When we sink a store make sure there's not a path to any of
the possibly skipped killing defs as that wrecks the virtual
operand update, requiring inserting of a PHI node. */
|| (gimple_vdef (stmt)
&& bestbb != sinkbb
&& !dominated_by_p (CDI_POST_DOMINATORS, bestbb, sinkbb)))
does not anticipate.