https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117922
--- Comment #19 from Richard Sandiford <rsandifo at gcc dot gnu.org> --- Mind if I take this and try converting it to rtl-ssa? I think that would be more forward-looking, rather than adding more custom (dominator walk) code to the pass itself. Also, the switch to rtl-ssa did seem to make fwprop.c faster: see https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558922.html for details.