summary refs log tree commit diff
path: root/amd64/isel.c
diff options
context:
space:
mode:
Diffstat (limited to 'amd64/isel.c')
-rw-r--r--amd64/isel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amd64/isel.c b/amd64/isel.c
index 5f84561..31199da 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -147,7 +147,7 @@ seladdr(Ref *r, ANum *an, Fn *fn)
 			 * rewrite it or bail out if
 			 * impossible
 			 */
-			if (!req(a.index, R))
+			if (!req(a.index, R) || rtype(a.base) != RTmp)
 				return;
 			else {
 				a.index = a.base;