diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4b746cdb319bf5e0297da372b6829a84e1bc9dbf..7e842a0c2630710a50a0ea4e99a7a577c7e619bc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-28  Richard Guenther  <rguenther@suse.de>
+
+	PR tree-optimization/38458
+	* tree-ssa-copy.c (copy_prop_visit_phi_node): For the first
+	argument use the arguments copy-of value.
+
 2009-03-28  Richard Guenther  <rguenther@suse.de>
 
 	PR tree-optimization/38180
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 64c697a51968084608df3665add68ae1930aacb0..8f060c2b5a203a4eea1d83fdec46a7998b5a62db 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -892,7 +892,7 @@ copy_prop_visit_phi_node (gimple phi)
 	 memory reference of all the other arguments.  */
       if (phi_val.value == NULL_TREE)
 	{
-	  phi_val.value = arg;
+	  phi_val.value = arg_val->value;
 	  continue;
 	}