diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-02 15:15:04 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-02 15:15:04 +0300 |
| commit | a7cb592efa9ec72c4c5e9d3c1e7469203a4b47e2 (patch) | |
| tree | 5c43cfbde7cad7f1f46366d9b9fedd9c81953f91 /src/asm.c | |
| parent | 59148d666a78d671198d56caabe7fe4d7fb3fee1 (diff) | |
| download | qbt-a7cb592efa9ec72c4c5e9d3c1e7469203a4b47e2.tar.gz qbt-a7cb592efa9ec72c4c5e9d3c1e7469203a4b47e2.zip | |
add simple unreachability
Diffstat (limited to 'src/asm.c')
| -rw-r--r-- | src/asm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -240,10 +240,10 @@ static void output_ret(struct fn *f, FILE *o) static void output_j(struct blk *b, struct fn *f, FILE *o) { /* the jump is directly to a following block, no need to do anything */ - if (!b->to) + if (!b->to || b->s1 == b->s2) return; - fprintf(o, "j .%s.%lli\n", f->name, (long long int)b->s1->id); + fprintf(o, "j .%s.%lli\n", f->name, (long long int)b->s2->id); } static void output_branch(struct blk *b, struct fn *f, FILE *o) |
