https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70245
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- simplify_replace_rtx is what e.g. postreload uses (together with validate_change to punt if the result isn't valid), which is how I've modeled my patch (there is no insn to validate yet in the peephole2 preparation, which is why it uses memory_operand instead).