https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121773
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #10) > (In reply to Jakub Jelinek from comment #5) > > The patch was done under the assumption written in the commit message: > > "The following patch replaces the modified_between_p > > tests with reg_used_between_p, my understanding is that > > modified_between_p is a subset of reg_used_between_p, so one > > doesn't need both." > > To my surprise that is not the case, reg_used_between_p ignores the cases > > where SET_DEST of some insn in between is the same (or SUBREG_REG), and > > similarly reg_overlap_mentioned_p does etc. > > modified_between_p has *any* RTX as argument, not necessarily a register. So > that assumption was very obviously not correct, and either the logic for this > patch is flawed, or altogether missing. reg_used_between_p despite the name also supports *any* RTX as argument. Or at least those that can appear as SET_DEST of some SET. STRICT_LOW_PART, ZERO_EXTRACT, SIGN_EXTRACT, SUBREG, REG, MEM, PC, PARALLEL at least. > Do you think everything is fixed now? I think so. > If not, please just revert the original patch :-(
