http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49007
--- Comment #20 from dave at hiauly1 dot hia.nrc.ca 2011-05-23 18:52:27 UTC --- On Mon, 23 May 2011, ebotcazou at gcc dot gnu.org wrote: > > This code fails to handle the case where there already is a use. > > This should have been fixed in 4.5 and above: > > PR rtl-optimization/40086 > * reorg.c (relax_delay_slots): When looking for redundant insn at > the branch target, use next_real_insn, not next_active_insn. Yes, looks like the fix. This appears to be a regression given the comment about using next_real_insn in fill_simple_delay_slots. Ok to backport this fix after testing to 4.3 and 4.4? I would also like to backport this fix PR rtl-optimization/42775 * cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot scheduling is enabled. Hopefully, this will fix delay branch handling on these branches. Dave