diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-08 14:16:50 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-08 14:16:50 +0000 |
commit | 82f9a36f7405ffccd457384ed36bf7930cd49ad6 (patch) | |
tree | df6511160dc905811e8b3a601792e9480742cd11 /gcc/tree-vect-generic.c | |
parent | ef618bb8149fd0408442cba9d0123fa110fc2737 (diff) | |
download | gcc-82f9a36f7405ffccd457384ed36bf7930cd49ad6.tar.gz |
2011-02-08 Richard Guenther <rguenther@suse.de>
PR middle-end/47639
* tree-vect-generic.c (expand_vector_operations_1): Update
stmts here ...
(expand_vector_operations): ... not here. Cleanup EH info
and the CFG if required.
* g++.dg/opt/pr47639.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169926 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r-- | gcc/tree-vect-generic.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index 54a6075a512..fce1fc7e1ae 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -606,8 +606,7 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi) way to do it is change expand_vector_operation and its callees to return a tree_code, RHS1 and RHS2 instead of a tree. */ gimple_assign_set_rhs_from_tree (gsi, new_rhs); - - gimple_set_modified (gsi_stmt (*gsi), true); + update_stmt (gsi_stmt (*gsi)); } /* Use this to lower vector operations introduced by the vectorizer, @@ -624,16 +623,24 @@ expand_vector_operations (void) { gimple_stmt_iterator gsi; basic_block bb; + bool cfg_changed = false; FOR_EACH_BB (bb) { for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) { expand_vector_operations_1 (&gsi); - update_stmt_if_modified (gsi_stmt (gsi)); + /* ??? If we do not cleanup EH then we will ICE in + verification. But in reality we have created wrong-code + as we did not properly transition EH info and edges to + the piecewise computations. */ + if (maybe_clean_eh_stmt (gsi_stmt (gsi)) + && gimple_purge_dead_eh_edges (bb)) + cfg_changed = true; } } - return 0; + + return cfg_changed ? TODO_cleanup_cfg : 0; } struct gimple_opt_pass pass_lower_vector = |