From e9ccf35b8a18b542603714c84fa2869b24a17af0 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Thu, 29 Dec 2016 17:58:56 -0500 Subject: do not create useless mem refs --- isel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isel.c b/isel.c index 9a60554..708cc0d 100644 --- 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); -- cgit 1.4.1