> From: Hans-Peter Nilsson <h...@axis.com>
> Date: Fri, 11 Sep 2020 13:24:18 +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?
> 
> It can't be needed, as the flags register is dead in the insn with the
> delay-slot, as part of the filter_flags condition.

Uh, I'll get back with a more thoughtful reply...

brgds, H-P

Reply via email to