2008-04-02 Richard Guenther <rguenther@suse.de>
commit72c30859508c8f41376c420984a0f04963515ad6
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Apr 2008 12:54:08 +0000 (2 12:54 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Apr 2008 12:54:08 +0000 (2 12:54 +0000)
treeaff8bcca1cbe2777fd11b65bc13de7e52af54d3b
parentb6d7b6c5931190fbca562f92402162aa48e8bd8f
2008-04-02  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/14495
PR tree-optimization/34793
* tree-vrp.c (struct switch_update): New structure.
(to_remove_edges, to_update_switch_stmts): New VECs.
(simplify_switch_using_ranges): New function.  Remove not taken
case labels and edges.
(simplify_stmt_using_ranges): Call it.
(identify_jump_threads): Mark edges we have queued for removal
so we don't thread them.
(execute_vrp): Remove edges queued for removal, update SWITCH_STMT
case label vector.
* tree-cfg.c (group_case_labels): Deal with missing default label.
(tree_verify_flow_info): Allow missing default label.
* stmt.c (emit_case_bit_tests): Deal with NULL default_label.
(emit_case_nodes): Likewise.
(expand_case): Do not rely on the default label to be present.
* expr.c (try_casesi): Deal with NULL default_label.
(do_tablejump): Likewise.

* gcc.dg/tree-ssa/vrp41.c: New testcase.
* gcc.dg/tree-ssa/vrp42.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133835 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/expr.c
gcc/stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/vrp41.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/vrp42.c [new file with mode: 0644]
gcc/tree-cfg.c
gcc/tree-vrp.c