summary refs log tree commit diff
path: root/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mem.c')
-rw-r--r--mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mem.c b/mem.c
index eda3d18..159b6bc 100644
--- a/mem.c
+++ b/mem.c
@@ -12,7 +12,7 @@ memopt(Fn *fn)
 
 	/* promote uniform stack slots to temporaries */
 	b = fn->start;
-	for (i=b->ins; i-b->ins < b->nins; i++) {
+	for (i=b->ins; i<&b->ins[b->nins]; i++) {
 		if (Oalloc > i->op || i->op > Oalloc1)
 			continue;
 		/* specific to NAlign == 3 */