Commit b6cfd264 by Richard Henderson Committed by Richard Henderson

* ifcvt.c (find_if_case_2): Don't allow THEN to be EXIT.

From-SVN: r34036
parent 228c4d97
2000-05-19 Richard Henderson <rth@cygnus.com> 2000-05-19 Richard Henderson <rth@cygnus.com>
* ifcvt.c (find_if_case_2): Don't allow THEN to be EXIT.
* flow.c (make_edges): The sibling call edge to exit is abnormal. * flow.c (make_edges): The sibling call edge to exit is abnormal.
2000-05-19 Richard Henderson <rth@cygnus.com> 2000-05-19 Richard Henderson <rth@cygnus.com>
......
...@@ -1652,14 +1652,17 @@ find_if_case_2 (test_bb, then_edge, else_edge) ...@@ -1652,14 +1652,17 @@ find_if_case_2 (test_bb, then_edge, else_edge)
if (else_bb->pred->pred_next != NULL) if (else_bb->pred->pred_next != NULL)
return FALSE; return FALSE;
/* THEN is not EXIT. */
if (then_bb->index < 0)
return FALSE;
/* ELSE is predicted or SUCC(ELSE) postdominates THEN. */ /* ELSE is predicted or SUCC(ELSE) postdominates THEN. */
note = find_reg_note (test_bb->end, REG_BR_PROB, NULL_RTX); note = find_reg_note (test_bb->end, REG_BR_PROB, NULL_RTX);
if (note && INTVAL (XEXP (note, 0)) >= REG_BR_PROB_BASE / 2) if (note && INTVAL (XEXP (note, 0)) >= REG_BR_PROB_BASE / 2)
; ;
else if (else_succ->dest->index < 0 else if (else_succ->dest->index < 0
|| (then_bb->index >= 0 || TEST_BIT (post_dominators[ORIG_INDEX (then_bb)],
&& TEST_BIT (post_dominators[ORIG_INDEX (then_bb)], ORIG_INDEX (else_succ->dest)))
ORIG_INDEX (else_succ->dest))))
; ;
else else
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