https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109844
Bug ID: 109844 Summary: Unnecessary basic block with single jmp instruction Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: chfast at gmail dot com Target Milestone: --- The code void err(void); void merge_bb(int y) { if (y) return err(); } is merge_bb: test edi, edi jne .L4 ret .L4: jmp err but could be merge_bb: test edi, edi jne err ret https://godbolt.org/z/eafPa4o4T