summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-27 17:18:58 +0000
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-27 17:18:58 +0000
commitb87f0847c27e2d5c6e431ef34b9c26bb40409d86 (patch)
treea8ca7ed410f4b6d55c2ad1ff5ef09a34dc57c94f /gcc/tree-ssa-copy.c
parent545ba0d7fc9b5cf26e81138f8f135c189a92bf6e (diff)
downloadgcc-b87f0847c27e2d5c6e431ef34b9c26bb40409d86.tar.gz
Fix for PR39548
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145118 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 654ba950228..64c697a5196 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -908,7 +908,8 @@ copy_prop_visit_phi_node (gimple phi)
}
}
- if (phi_val.value && set_copy_of_val (lhs, phi_val.value))
+ if (phi_val.value && may_propagate_copy (lhs, phi_val.value)
+ && set_copy_of_val (lhs, phi_val.value))
retval = (phi_val.value != lhs) ? SSA_PROP_INTERESTING : SSA_PROP_VARYING;
else
retval = SSA_PROP_NOT_INTERESTING;