summaryrefslogtreecommitdiff
path: root/gcc/sched-rgn.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r--gcc/sched-rgn.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index db4cc877b36..c1c215a1ea9 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -1,6 +1,6 @@
/* Instruction scheduling pass.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
and currently maintained by, Jim Wilson (wilson@cygnus.com)
@@ -349,13 +349,16 @@ is_cfg_nonregular ()
for (insn = BLOCK_HEAD (b);; insn = NEXT_INSN (insn))
{
code = GET_CODE (insn);
- if (GET_RTX_CLASS (code) == 'i')
+ if (GET_RTX_CLASS (code) == 'i' && code != JUMP_INSN)
{
- rtx note;
-
- for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
- if (REG_NOTE_KIND (note) == REG_LABEL)
- return 1;
+ rtx note = find_reg_note (REG_NOTES (insn), REG_LABEL, NULL_RTX);
+
+ if (note
+ && ! (GET_CODE (NEXT_INSN (insn)) == JUMP_INSN
+ && find_reg_note (REG_NOTES (NEXT_INSN (insn)),
+ REG_LABEL,
+ XEXP (note, 0))))
+ return 1;
}
if (insn == BLOCK_END (b))