summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--rega.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/rega.c b/rega.c
index 927e5aa..3b3c215 100644
--- a/rega.c
+++ b/rega.c
@@ -556,12 +556,11 @@ rega(Fn *fn)
 					src = rref(&end[b->id], src.val);
 				pmadd(src, dst, p->cls);
 			}
-			for (t=Tmp0; t<fn->ntmp; t++)
-				if (bshas(s->in, t)) {
-					src = rref(&end[b->id], t);
-					dst = rref(&beg[s->id], t);
-					pmadd(src, dst, tmp[t].cls);
-				}
+			for (t=Tmp0; bsiter(s->in, &t); t++) {
+				src = rref(&end[b->id], t);
+				dst = rref(&beg[s->id], t);
+				pmadd(src, dst, tmp[t].cls);
+			}
 			pmgen();
 			if (curi == insb)
 				continue;