diff options
| author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-22 17:25:03 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-22 17:25:03 -0400 |
| commit | 3ef1d83866fa07a44cc6ff3908da3fb57de61142 (patch) | |
| tree | 7ac565831810aaa532f283976a5151e7669967d0 | |
| parent | bbbc8994f9a4f6dba55002af48778327f37c3af6 (diff) | |
| download | roux-3ef1d83866fa07a44cc6ff3908da3fb57de61142.tar.gz | |
do not do dce on register assignments
| -rw-r--r-- | lisc/rega.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisc/rega.c b/lisc/rega.c index e1f0a6d..ea42ad1 100644 --- a/lisc/rega.c +++ b/lisc/rega.c @@ -339,7 +339,7 @@ rega(Fn *fn) if (!req(i->to, R)) { assert(rtype(i->to) == RTmp); r = rfree(&cur, i->to.val); - if (r == -1) { + if (r == -1 && !isreg(i->to)) { *i = (Ins){.op = ONop}; continue; } |
