summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/copy.c b/copy.c
index 06a0fb3..965f202 100644
--- a/copy.c
+++ b/copy.c
@@ -38,7 +38,7 @@ visitphi(Phi *p, Ref *cp, RList **w)
 	r = R;
 	for (a=0; a<p->narg; a++) {
 		r1 = copyof(p->arg[a], cp);
-		if (req(r1, R))
+		if (req(r1, R) || req(r1, p->to))
 			continue;
 		if (req(r, R) || req(r, r1))
 			r = r1;