mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
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
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…
Reference in New Issue
Block a user