summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dce.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-28 02:56:50 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-28 02:56:50 +0000
commit215af651d04e31788a42aed15091edff9b4dd889 (patch)
tree1074891cf9cb826c113cc1053ac87841b2391ec8 /gcc/tree-ssa-dce.c
parent8b404e6e89dc1b4537d1eca5052ff6279da5c770 (diff)
downloadgcc-215af651d04e31788a42aed15091edff9b4dd889.tar.gz
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary)
<COND_EXPR>: Use EDGE_COUNT instead of GOTO_DESTINATION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r--gcc/tree-ssa-dce.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 563a99bf37e..47038ad3152 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -330,17 +330,7 @@ mark_stmt_if_obviously_necessary (tree stmt, bool aggressive)
return;
case COND_EXPR:
- if (GOTO_DESTINATION (COND_EXPR_THEN (stmt))
- == GOTO_DESTINATION (COND_EXPR_ELSE (stmt)))
- {
- /* A COND_EXPR is obviously dead if the target labels are the same.
- We cannot kill the statement at this point, so to prevent the
- statement from being marked necessary, we replace the condition
- with a constant. The stmt is killed later on in cfg_cleanup. */
- COND_EXPR_COND (stmt) = integer_zero_node;
- modify_stmt (stmt);
- return;
- }
+ gcc_assert (EDGE_COUNT (bb_for_stmt (stmt)->succs) == 2);
/* Fall through. */
case SWITCH_EXPR: