summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-20 01:32:44 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-20 01:32:44 +0000
commitbf159d0bd823c5fbd11444afe4f9dba703c87e27 (patch)
treea6a2fafde10fc98188ff7dd2de06cc5abe56288f /gcc/ifcvt.c
parentd86c820b243c32c68928292dbf1c5f7af63d7d9e (diff)
downloadgcc-bf159d0bd823c5fbd11444afe4f9dba703c87e27.tar.gz
Make sure THEN block has any insns at before testing for indirect jump
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35813 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 3215f6c3015..901bd42b483 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -1510,10 +1510,13 @@ find_if_block (test_bb, then_edge, else_edge)
{
rtx last_insn = then_bb->end;
- if (GET_CODE (last_insn) == NOTE)
- last_insn = prev_nonnote_insn (last_insn);
+ while (last_insn
+ && GET_CODE (last_insn) == NOTE
+ && last_insn != then_bb->head)
+ last_insn = PREV_INSN (last_insn);
- if (GET_CODE (last_insn) == JUMP_INSN
+ if (last_insn
+ && GET_CODE (last_insn) == JUMP_INSN
&& ! simplejump_p (last_insn))
return FALSE;