commit 3ef1d83866fa07a44cc6ff3908da3fb57de61142
parent bbbc8994f9a4f6dba55002af48778327f37c3af6
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 22 Sep 2015 17:25:03 -0400
do not do dce on register assignments
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisc/rega.c b/lisc/rega.c
@@ -339,7 +339,7 @@ rega(Fn *fn)
if (!req(i->to, R)) {
assert(rtype(i->to) == RTmp);
r = rfree(&cur, i->to.val);
- if (r == -1) {
+ if (r == -1 && !isreg(i->to)) {
*i = (Ins){.op = ONop};
continue;
}