diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-16 22:17:18 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-16 22:17:18 -0500 |
commit | 70d73e2d6eaf0bca7821222b7ba0be41d838080b (patch) | |
tree | 805e230333f9834b0f5042af2a1d1a817c687bdc /lisc/mem.c | |
parent | 7d203e7f9994d89ddabfd6903c9f9019e9485447 (diff) | |
download | roux-70d73e2d6eaf0bca7821222b7ba0be41d838080b.tar.gz |
fix dumb bug found by Andrew Chambers
Diffstat (limited to 'lisc/mem.c')
-rw-r--r-- | lisc/mem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisc/mem.c b/lisc/mem.c index ea4bd82..75eacb8 100644 --- a/lisc/mem.c +++ b/lisc/mem.c @@ -29,8 +29,9 @@ memopt(Fn *fn) if (u->type != UIns) goto NextIns; l = u->u.ins; - if (l->op < OStorel || l->op > OStoreb) if (l->op < OLoadl || l->op > OLoadub) + if (l->op < OStorel || l->op > OStoreb + || req(i->to, l->arg[0])) goto NextIns; } /* get rid of the alloc and replace uses */ |