diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-20 21:49:12 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-20 21:49:12 +0000 |
commit | c9c81ef3c667aaa14c498a5449ec6d134b4b66ff (patch) | |
tree | 0ac440db6513ee01deb5e5dc6142769d1e5b7b2d /gcc/tree-ssa-dom.c | |
parent | 12cdcb9d74f55c165366ca1b1eeec013a0ce72ef (diff) | |
parent | 891196d7325e4c55d92d5ac5cfe7161c4f36c0ce (diff) | |
download | gcc-fortran-dev.tar.gz |
Merge from trunk (r239915 to r240230)fortran-dev
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/fortran-dev@240290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 8bf5b3c9ffe..b007388f3ea 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1923,12 +1923,11 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si, { tree val = NULL; - update_stmt_if_modified (stmt); - if (gimple_code (stmt) == GIMPLE_COND) val = fold_binary_loc (gimple_location (stmt), - gimple_cond_code (stmt), boolean_type_node, - gimple_cond_lhs (stmt), gimple_cond_rhs (stmt)); + gimple_cond_code (stmt), boolean_type_node, + gimple_cond_lhs (stmt), + gimple_cond_rhs (stmt)); else if (gswitch *swtch_stmt = dyn_cast <gswitch *> (stmt)) val = gimple_switch_index (swtch_stmt); @@ -1946,6 +1945,8 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si, gimple_cond_make_true (as_a <gcond *> (stmt)); else gcc_unreachable (); + + gimple_set_modified (stmt, true); } /* Further simplifications may be possible. */ @@ -1953,6 +1954,8 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si, } } + update_stmt_if_modified (stmt); + /* If we simplified a statement in such a way as to be shown that it cannot trap, update the eh information and the cfg to match. */ if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt)) |