commit c416da5a70c4c7f43f44091b078251aa06be75d5
parent 6b1b97c996d04ea74df6f352ba0c3c19a9afdacf
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 12 Apr 2016 12:05:26 -0400
handle dumb conditional jumps in isel
I also removed the code to handle jumps with a
constant argument since those should be eliminated
by the folding pass.
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/isel.c b/isel.c
@@ -360,11 +360,9 @@ seljmp(Blk *b, Fn *fn)
assert(b->jmp.type == JJnz);
r = b->jmp.arg;
b->jmp.arg = R;
- assert(!req(r, R));
- if (rtype(r) == RCon) {
+ assert(!req(r, R) && rtype(r) != RCon);
+ if (b->s1 == b->s2) {
b->jmp.type = JJmp;
- if (req(r, CON_Z))
- b->s1 = b->s2;
b->s2 = 0;
return;
}