commit df0836e47565d99632e67f9b9fb62dec52a5b73a
parent 2981a267f406fb03142f149a0f0e6608917cd123
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Fri, 24 Jul 2015 09:32:17 -0400
isel logic was moved to spill
Diffstat:
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/lisc/isel.c b/lisc/isel.c
@@ -2,11 +2,6 @@
/* For x86_64, we have to:
*
- * - add dummy uses for the second argument
- * after non-commutative arithmetic
- * operations (this prevents the reg.
- * allocator to get 'eax = sub ebx eax')
- *
* - check that constants are used only in
* places allowed by the machine
*
@@ -62,9 +57,7 @@ sel(Ins *i, Fn *fn)
break;
case OAdd:
case OSub:
- if (!opdesc[i->op].commut
- && rtype(i->arg[1]) != RConst)
- emit(OCopy, R, i->arg[1], R);
+ case OCopy:
emit(i->op, i->to, i->arg[0], i->arg[1]);
break;
default: