diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-21 11:59:28 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-21 11:59:28 +0000 |
| commit | ae8a8b851dd3535451c1a830689a29b0793850e7 (patch) | |
| tree | 64fa28fa235f357870ff62e9ba5ee14e9f7713ad | |
| parent | 35d3304d88f7f6de73eae35592d106fa6c212f1b (diff) | |
| download | ppe42-gcc-ae8a8b851dd3535451c1a830689a29b0793850e7.tar.gz ppe42-gcc-ae8a8b851dd3535451c1a830689a29b0793850e7.zip | |
2013-05-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/57318
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Do not
estimate stmts with side-effects as likely eliminated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199140 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bab6db43cf2..3abc99ce73a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2013-05-21 Richard Biener <rguenther@suse.de> + PR tree-optimization/57318 + * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Do not + estimate stmts with side-effects as likely eliminated. + +2013-05-21 Richard Biener <rguenther@suse.de> + PR tree-optimization/57330 * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Properly preserve the call stmts fntype. diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index b5751cb7f7f..45774e60dd8 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -257,8 +257,10 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, stru /* Look for reasons why we might optimize this stmt away. */ + if (gimple_has_side_effects (stmt)) + ; /* Exit conditional. */ - if (exit && body[i] == exit->src + else if (exit && body[i] == exit->src && stmt == last_stmt (exit->src)) { if (dump_file && (dump_flags & TDF_DETAILS)) |

