aboutsummaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2004-05-07 03:20:24 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2004-05-07 03:20:24 +0000
commitafce2847b300b1924a08f1fd76b048d94dc22305 (patch)
tree3fe1cd6d6776b02a4fb490e24bba2280f1a34c0b /gcc/reorg.c
parent57408b45844ccf4af894895c6be995f2960d96b5 (diff)
downloadgcc-afce2847b300b1924a08f1fd76b048d94dc22305.zip
gcc-afce2847b300b1924a08f1fd76b048d94dc22305.tar.gz
gcc-afce2847b300b1924a08f1fd76b048d94dc22305.tar.bz2
re PR rtl-optimization/15296 ([3.4 only] Delayed branch scheduling causing invalid code on cris-*)
PR optimization/15296 * reorg.c (fill_simple_delay_slots): Use next_real_insn when getting last consecutive label at a branch. (relax_delay_slots): Similar, near top of loop. From-SVN: r81600
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 9a58d34..2ae0a8f 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -2349,7 +2349,9 @@ fill_simple_delay_slots (int non_jumps_p)
&& eligible_for_delay (insn, slots_filled, next_trial, flags)
&& ! can_throw_internal (trial))
{
- rtx new_label = next_active_insn (next_trial);
+ /* See comment in relax_delay_slots about necessity of using
+ next_real_insn here. */
+ rtx new_label = next_real_insn (next_trial);
if (new_label != 0)
new_label = get_label_before (new_label);
@@ -3074,7 +3076,9 @@ relax_delay_slots (rtx first)
&& (target_label = JUMP_LABEL (insn)) != 0)
{
target_label = follow_jumps (target_label);
- target_label = prev_label (next_active_insn (target_label));
+ /* See comment further down why we must use next_real_insn here,
+ instead of next_active_insn. */
+ target_label = prev_label (next_real_insn (target_label));
if (target_label == 0)
target_label = find_end_label ();