From 5668e93147563c824e693255de5e58fdc398a36b Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 16 Aug 2015 19:18:40 -0400 Subject: [PATCH] refine the clobber code It could very well be that the temporary we assign already got assigned to the right register! Good things happen. --- lisc/rega.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisc/rega.c b/lisc/rega.c index 53807d4..f571011 100644 --- 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];