Commit 8b0a5125 by Daniel Berlin Committed by Daniel Berlin

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
parent a8b3b0b6
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
and other expected operations explicitly, change default to
gcc_unreachable.
......
......@@ -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)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment