summary refs log tree commit diff
path: root/lisc/spill.c
diff options
context:
space:
mode:
Diffstat (limited to 'lisc/spill.c')
-rw-r--r--lisc/spill.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisc/spill.c b/lisc/spill.c
index 06c748d..5875fc0 100644
--- a/lisc/spill.c
+++ b/lisc/spill.c
@@ -492,7 +492,8 @@ spill(Fn *fn)
 			if (BGET(v, t)) {
 				BCLR(v, t);
 				store(p->to, tmp[t].slot);
-			} else
+			} else if (BGET(b->in, t))
+				/* only if the phi is live */
 				p->to = slot(p->to.val);
 		}
 		b->in = v;