diff options
Diffstat (limited to 'amd64')
-rw-r--r-- | amd64/isel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/amd64/isel.c b/amd64/isel.c index 56e4cf3..5f84561 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -383,9 +383,10 @@ seljmp(Blk *b, Fn *fn) b->jmp.type = Jjf + Cine; } else if (iscmp(fi->op, &k, &c)) { + if (rtype(fi->arg[0]) == RCon) + c = cmpop(c); if (t->nuse == 1) { - if (selcmp(fi->arg, k, fn)) - c = cmpop(c); + selcmp(fi->arg, k, fn); *fi = (Ins){.op = Onop}; } b->jmp.type = Jjf + c; |