commit 5668e93147563c824e693255de5e58fdc398a36b
parent c62b1754424046fea6abe3413f736a9483fa22a7
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Sun, 16 Aug 2015 19:18:40 -0400
refine the clobber code
It could very well be that the temporary we
assign already got assigned to the right
register! Good things happen.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisc/rega.c b/lisc/rega.c
@@ -233,7 +233,7 @@ dopm(Blk *b, Ins *i, RMap *m)
else if (isreg(i->arg[0]))
for (;; i--) {
r = RBASE(i->arg[0].val);
- if (BGET(m->b, r)) {
+ if (BGET(m->b, r) && rfind(m, i->to.val) != r) {
for (n=0; m->r[n] != r; n++)
assert(n+1 < m->n);
t = m->t[n];