commit e9ccf35b8a18b542603714c84fa2869b24a17af0
parent 7815610cd8af498beac01d3ae6a1c9b20f1f0a8d
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Thu, 29 Dec 2016 17:58:56 -0500
do not create useless mem refs
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/isel.c b/isel.c
@@ -162,7 +162,7 @@ seladdr(Ref *r, ANum *an, Fn *fn)
r0 = *r;
if (rtype(r0) == RTmp) {
amatch(&a, r0, an, fn, 1);
- if (req(a.base, R))
+ if (req(a.base, R) || req(a.base, r0))
return;
chuse(r0, -1, fn);
vgrow(&fn->mem, ++fn->nmem);