> From: Eric Botcazou <botca...@adacore.com> > Date: Fri, 11 Sep 2020 13:09:48 +0200
> > @@ -2618,6 +2643,16 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx > > condition, lose = 1; > > mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL); > > mark_referenced_resources (trial, &needed, true); > > + if (filter_flags) > > + { > > + mark_set_resources (trial, &fset, 0, MARK_SRC_DEST_CALL); > > + > > + /* Groups of flags-register setters with users should not > > + affect opportunities to move flags-register-setting insns > > + (clobbers) into the delay-slot. */ > > + CLEAR_HARD_REG_BIT (needed.regs, targetm.flags_regnum); > > + CLEAR_HARD_REG_BIT (fset.regs, targetm.flags_regnum); > > + } > > Don't you need to put the new block before mark_referenced_resources (as I > did > in fill_simple_delay_slots) in case the needed insn reads the flags register? I think the simplest answer is that wouldn't be good; it'd leave the "CLEAR_HARD_REG_BIT (needed.regs, targetm.flags_regnum);" without effect. Note also fill_simple_delay_slots is moving insns from the before the delay-slotting insn, while this is from a "tread" (or arm, or leg) "after". brgds, H-P