diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-09 20:50:40 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-09 20:50:40 +0000 |
commit | d1d905eead58c83899dfd2d91677cc1baa293fad (patch) | |
tree | 22a69ae33ba4ffc6a1ac60035349486476a0bdd2 /gcc/tree-eh.c | |
parent | 995fad409c8fc706f97c6fe1f3ccf3c5a627928e (diff) | |
download | gcc-d1d905eead58c83899dfd2d91677cc1baa293fad.tar.gz |
PR tree-optimization/51117
* tree-eh.c (optimize_clobbers): Don't remove just one
clobber, but all consecutive clobbers before RESX.
Use gimple_clobber_p predicate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182177 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 7fc850a2ae9..7ab8a90a37f 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -3180,17 +3180,13 @@ static void optimize_clobbers (basic_block bb) { gimple_stmt_iterator gsi = gsi_last_bb (bb); - for (gsi_prev (&gsi); !gsi_end_p (gsi);) + for (gsi_prev (&gsi); !gsi_end_p (gsi); gsi_prev (&gsi)) { gimple stmt = gsi_stmt (gsi); if (is_gimple_debug (stmt)) - { - gsi_prev (&gsi); - continue; - } - if (!gimple_assign_single_p (stmt) - || TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME - || !TREE_CLOBBER_P (gimple_assign_rhs1 (stmt))) + continue; + if (!gimple_clobber_p (stmt) + || TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME) return; unlink_stmt_vdef (stmt); gsi_remove (&gsi, true); |