diff options
| author | Michael Forney <[email protected]> | 2022-02-12 02:27:48 -0800 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2022-02-17 22:35:22 +0100 |
| commit | 2cba9f6871fe92e06d5e6433f8e15d2712fa9d52 (patch) | |
| tree | a824f1430b0151151c399a5810ff225d21d12076 /cfg.c | |
| parent | 3b75357e2bd14d6222bd9e3fb8b6894239ff2ae3 (diff) | |
cfg: remove unnecessary check for jump type
This condition should match any jump with two successors. This is
needed on riscv64, where there is no flags register, so Jjnz is
used all the way to emit().
Diffstat (limited to 'cfg.c')
| -rw-r--r-- | cfg.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -298,7 +298,6 @@ simpljmp(Fn *fn) Blk **uf; /* union-find */ Blk **p, *b, *ret; - int c; ret = blknew(); ret->id = fn->nblk++; @@ -322,9 +321,7 @@ simpljmp(Fn *fn) uffind(&b->s1, uf); if (b->s2) uffind(&b->s2, uf); - c = b->jmp.type - Jjf; - if (0 <= c && c <= NCmp) - if (b->s1 == b->s2) { + if (b->s1 && b->s1 == b->s2) { b->jmp.type = Jjmp; b->s2 = 0; } |
