summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-26 13:19:21 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-26 13:19:21 +0000
commit65f2e22c2c231b9a6d2bb0ab91eee7789ab6caac (patch)
tree323d0764ceb86d8486f5300af0a4d8a6f3a6eeb7
parentd4a20ba9aa431df5a08a1fddbe0391778d48391e (diff)
downloadgcc-65f2e22c2c231b9a6d2bb0ab91eee7789ab6caac.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_3-branch@82287 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/reorg.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f26e43ee8ec..8c477a2149f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-26 Hans-Peter Nilsson <hp@axis.com>
+
+ 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.
+
2004-05-17 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 3fdf941ad79..d11e35d83c7 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -2403,7 +2403,9 @@ fill_simple_delay_slots (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);
@@ -3136,7 +3138,9 @@ relax_delay_slots (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 ();