commit b8709501f944cb6421c6b4c447acfe8870c4ccc1
parent 47a0556a16e197246df78e341b820012b885d0bd
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Mon, 18 Apr 2016 13:25:32 -0400
do not rewrite overwritten slots in memopt
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/mem.c b/mem.c
@@ -43,6 +43,8 @@ memopt(Fn *fn)
/* specific to NAlign == 3 */
assert(rtype(i->to) == RTmp);
t = &fn->tmp[i->to.val];
+ if (t->ndef != 1)
+ goto Skip;
k = -1;
s = -1;
for (u=t->use; u != &t->use[t->nuse]; u++) {