summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-23 20:14:57 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-23 20:14:57 +0000
commitd3f1bef2071224310f08d7f5ac41110f31690461 (patch)
tree0fbcc7e5665d66dbc78e99e8a3cd9dce2790c130 /gcc/ifcvt.c
parent96b74343a36edd741a0f39cbf5fb05ebc564dddb (diff)
downloadgcc-d3f1bef2071224310f08d7f5ac41110f31690461.tar.gz
PR opt/10116
* ifcvt.c (find_if_block): Disallow tablejump insns outgoing from then_bb or else_bb after flow2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64750 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 0cfd06f3029..9236b6a08bb 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2365,7 +2365,8 @@ find_if_block (ce_info)
/* The THEN block of an IF-THEN combo must have zero or one successors. */
if (then_succ != NULL_EDGE
&& (then_succ->succ_next != NULL_EDGE
- || (then_succ->flags & EDGE_COMPLEX)))
+ || (then_succ->flags & EDGE_COMPLEX)
+ || (flow2_completed && tablejump_p (then_bb->end, NULL, NULL))))
return FALSE;
/* If the THEN block has no successors, conditional execution can still
@@ -2412,7 +2413,8 @@ find_if_block (ce_info)
&& then_succ->dest == else_succ->dest
&& else_bb->pred->pred_next == NULL_EDGE
&& else_succ->succ_next == NULL_EDGE
- && ! (else_succ->flags & EDGE_COMPLEX))
+ && ! (else_succ->flags & EDGE_COMPLEX)
+ && ! (flow2_completed && tablejump_p (else_bb->end, NULL, NULL)))
join_bb = else_succ->dest;
/* Otherwise it is not an IF-THEN or IF-THEN-ELSE combination. */