re PR tree-optimization/59334 (r205486 caused many failures)

2013-11-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/59334
	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Fix bug
	in previous commit.

From-SVN: r205515
This commit is contained in:
Richard Biener 2013-11-29 10:47:52 +00:00 committed by Richard Biener
parent e06f9964af
commit b54fc5b7ee
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-11-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/59334
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Fix bug
in previous commit.
2013-11-29 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>

View File

@ -1200,7 +1200,8 @@ eliminate_unnecessary_stmts (void)
if (TREE_CODE (ptr) == SSA_NAME)
{
gimple def_stmt = SSA_NAME_DEF_STMT (ptr);
if (!gimple_plf (def_stmt, STMT_NECESSARY))
if (!gimple_nop_p (def_stmt)
&& !gimple_plf (def_stmt, STMT_NECESSARY))
gimple_set_plf (stmt, STMT_NECESSARY, false);
}
}