From 5e388fffbc87d05d53e10517d5ba1c6350e2c01a Mon Sep 17 00:00:00 2001
From: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Thu, 17 Mar 2016 14:43:50 -0400
Subject: [PATCH] on the way to clean use counts

---
 lisc/isel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisc/isel.c b/lisc/isel.c
index ef9cbb7..51a0aa0 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -447,6 +447,7 @@ selret(Blk *b, Fn *fn)
 		if (a.inmem) {
 			assert(rtype(fn->retr) == RTmp);
 			emit(OCopy, Kl, TMP(RAX), fn->retr, R);
+			chuse(fn->retr, +1, fn);
 			blit(fn->retr, 0, r0, a.size, fn);
 		} else {
 			nr[0] = nr[1] = 0;
@@ -458,6 +459,7 @@ selret(Blk *b, Fn *fn)
 				r = newtmp("abi", Kl, fn);
 				emit(OLoad, Kl, reg[1], r, R);
 				emit(OAdd, Kl, r, r0, getcon(8, fn));
+				chuse(r0, +1, fn);
 			}
 			emit(OLoad, Kl, reg[0], r0, R);
 		}