summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-04 12:18:21 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-04 12:18:21 -0500
commitfb838ce09547bc85da10dd447851536867e6f9a9 (patch)
treee92c86d1037ebde737973dbb0556c6a7eafd976b
parent77cfb14f58aeaca5c4c1f10d6d679e05a3d128af (diff)
downloadroux-fb838ce09547bc85da10dd447851536867e6f9a9.tar.gz
fix spill bug on return nodes
When a node has no successor, its inregs out was
initialized with garbage.
-rw-r--r--lisc/spill.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisc/spill.c b/lisc/spill.c
index 6b6939f..aaec562 100644
--- a/lisc/spill.c
+++ b/lisc/spill.c
@@ -378,9 +378,9 @@ spill(Fn *fn)
 		if (s2 && s2->id <= n)
 		if (!hd || s2->id >= hd->id)
 			hd = s2;
+		BZERO(v);
 		if (hd) {
 			/* back-edge */
-			BZERO(v);
 			for (k=0; k<2; k++) {
 				n = k == 0 ? NIReg : NFReg;
 				for (z=0; z<BITS; z++) {