aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-05-19 13:07:18 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-19 13:07:18 -0700
commitb6cfd26443d6161c71b6069346cbe805f86774a4 (patch)
tree1279ef32590b83c555c5adb2aa805a92077c8cd9
parent228c4d97ec5e44fcb923349fd1a76da0e83821a7 (diff)
downloadgcc-b6cfd26443d6161c71b6069346cbe805f86774a4.zip
gcc-b6cfd26443d6161c71b6069346cbe805f86774a4.tar.gz
gcc-b6cfd26443d6161c71b6069346cbe805f86774a4.tar.bz2
* ifcvt.c (find_if_case_2): Don't allow THEN to be EXIT.
From-SVN: r34036
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/ifcvt.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c8c6c95..5e4fc88 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
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.
2000-05-19 Richard Henderson <rth@cygnus.com>
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 2403651..371e560 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -1652,14 +1652,17 @@ find_if_case_2 (test_bb, then_edge, else_edge)
if (else_bb->pred->pred_next != NULL)
return FALSE;
+ /* THEN is not EXIT. */
+ if (then_bb->index < 0)
+ return FALSE;
+
/* ELSE is predicted or SUCC(ELSE) postdominates THEN. */
note = find_reg_note (test_bb->end, REG_BR_PROB, NULL_RTX);
if (note && INTVAL (XEXP (note, 0)) >= REG_BR_PROB_BASE / 2)
;
else if (else_succ->dest->index < 0
- || (then_bb->index >= 0
- && TEST_BIT (post_dominators[ORIG_INDEX (then_bb)],
- ORIG_INDEX (else_succ->dest))))
+ || TEST_BIT (post_dominators[ORIG_INDEX (then_bb)],
+ ORIG_INDEX (else_succ->dest)))
;
else
return FALSE;