public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/109844] New: Unnecessary basic block with single jmp instruction
@ 2023-05-13 17:43 chfast at gmail dot com
  2023-05-13 17:51 ` [Bug target/109844] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: chfast at gmail dot com @ 2023-05-13 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/109844] Unnecessary basic block with single jmp instruction
  2023-05-13 17:43 [Bug middle-end/109844] New: Unnecessary basic block with single jmp instruction chfast at gmail dot com
@ 2023-05-13 17:51 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-13 17:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109844

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of much older issue, PR 47253.

*** This bug has been marked as a duplicate of bug 47253 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-13 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-13 17:43 [Bug middle-end/109844] New: Unnecessary basic block with single jmp instruction chfast at gmail dot com
2023-05-13 17:51 ` [Bug target/109844] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).