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.
This commit is contained in:
parent
6b1b97c996
commit
c416da5a70
1 changed files with 2 additions and 4 deletions
6
isel.c
6
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue