re PR tree-optimization/51117 (rev.181172 causes glibc build failure)

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.

From-SVN: r182177
This commit is contained in:
Jakub Jelinek 2011-12-09 21:50:40 +01:00 committed by Jakub Jelinek
parent d179d17907
commit 6d1c2bd3ae
2 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2011-12-09 Jakub Jelinek <jakub@redhat.com>
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.
2011-12-09 Michael Meissner <meissner@the-meissners.org>
* config/rs6000/rs6000.c (altivec_expand_builtin): Call

View File

@ -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);