summary refs log tree commit diff
path: root/rega.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2019-05-05 14:34:17 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2019-05-05 15:19:32 +0200
commit7ba69be87b3910cac2a8cd1cfe021e58f57f58d7 (patch)
treec249b56245d420a788dbc2e82a1adb2feeddeb7c /rega.c
parente6c216baadf89402a21b3eb60df1196e562df527 (diff)
downloadroux-7ba69be87b3910cac2a8cd1cfe021e58f57f58d7.tar.gz
fuse epilog deduplication with jump threading
Diffstat (limited to 'rega.c')
-rw-r--r--rega.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rega.c b/rega.c
index 8f2fbd0..ba405e5 100644
--- a/rega.c
+++ b/rega.c
@@ -417,10 +417,11 @@ doblk(Blk *b, RMap *cur)
 			}
 		for (r=0; r<nr; r++)
 			*ra[r] = ralloc(cur, ra[r]->val);
+		if (i->op == Ocopy && req(i->to, i->arg[0]))
+			curi++;
 
 		/* try to change the register of a hinted
 		 * temporary if rf is available */
-		x = 1;
 		if (rf != -1 && (t = cur->w[rf]) != 0)
 		if (!bshas(cur->b, rf) && *hint(t) == rf
 		&& (rt = rfree(cur, t)) != -1) {