From c416da5a70c4c7f43f44091b078251aa06be75d5 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 12 Apr 2016 12:05:26 -0400 Subject: 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. --- isel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/isel.c b/isel.c index f20efb0..80a3e6c 100644 --- 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; } -- cgit 1.4.1