Make sure THEN block has any insns at before testing for indirect jump

From-SVN: r35813
This commit is contained in:
Michael Meissner 2000-08-20 01:32:44 +00:00 committed by Michael Meissner
parent f1e42c8110
commit 34c9e8480c
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2000-08-19 Michael Meissner <meissner@redhat.com>
* ifcvt.c (find_if_block): Do not assume that a THEN block has any
instructions in it before checking for indirect jumps.
* ifcvt.c (find_if_block): Do not consider a THEN block that ends
in a indirect jump as a potential for conditional execution.

View File

@ -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;