Commit 34c9e848 by Michael Meissner Committed by Michael Meissner

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

From-SVN: r35813
parent f1e42c81
2000-08-19 Michael Meissner <meissner@redhat.com> 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 * ifcvt.c (find_if_block): Do not consider a THEN block that ends
in a indirect jump as a potential for conditional execution. in a indirect jump as a potential for conditional execution.
......
...@@ -1510,10 +1510,13 @@ find_if_block (test_bb, then_edge, else_edge) ...@@ -1510,10 +1510,13 @@ find_if_block (test_bb, then_edge, else_edge)
{ {
rtx last_insn = then_bb->end; rtx last_insn = then_bb->end;
if (GET_CODE (last_insn) == NOTE) while (last_insn
last_insn = prev_nonnote_insn (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)) && ! simplejump_p (last_insn))
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment