re PR tree-optimization/32571 (ICE in set_ssa_val_to, at tree-ssa-sccvn.c:1011)

2007-07-01  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/32571
	* tree-ssa-sccvn.c (visit_use): Shortcut copies to avoid
	simplifying them.

From-SVN: r126186
This commit is contained in:
Daniel Berlin 2007-07-02 04:35:37 +00:00 committed by Daniel Berlin
parent a8b3b0b633
commit 8b0a512570
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-07-01 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/32571
* tree-ssa-sccvn.c (visit_use): Shortcut copies to avoid
simplifying them.
2007-07-01 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle constants

View File

@ -1545,6 +1545,13 @@ visit_use (tree use)
STRIP_USELESS_TYPE_CONVERSION (rhs);
/* Shortcut for copies. Simplifying copies is pointless,
since we copy the expression and value they represent. */
if (TREE_CODE (rhs) == SSA_NAME && TREE_CODE (lhs) == SSA_NAME)
{
changed = visit_copy (lhs, rhs);
goto done;
}
simplified = try_to_simplify (stmt, rhs);
if (simplified && simplified != rhs)
{
@ -1623,8 +1630,6 @@ visit_use (tree use)
VN_INFO (lhs)->expr = rhs;
changed = set_ssa_val_to (lhs, rhs);
}
else if (TREE_CODE (rhs) == SSA_NAME)
changed = visit_copy (lhs, rhs);
else
{
switch (TREE_CODE_CLASS (TREE_CODE (rhs)))