qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 70d73e2d6eaf0bca7821222b7ba0be41d838080b
parent 7d203e7f9994d89ddabfd6903c9f9019e9485447
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Tue, 16 Feb 2016 22:17:18 -0500

fix dumb bug found by Andrew Chambers

Diffstat:
Mlisc/mem.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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 */