+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
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)
{
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)))