public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/109601] Useless branch not eliminated when writing to a union
Date: Sun, 23 Apr 2023 18:58:02 +0000	[thread overview]
Message-ID: <bug-109601-4-bsMXYkDsv8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109601-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-04-23
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
x86 duplicated the simple return but never unduplicates it:
(jump_insn 27 12 28 3 (simple_return) 1030 {simple_return_internal}
     (nil)
 -> simple_return)
...

(jump_insn 32 31 33 4 (simple_return) "/app/example.cpp":29:1 -1
     (nil)
 -> simple_return)


But simple_return was only added in GCC 4.7.0 (r0-111280-g268987713c7105c691)
So something else changed.

There is also a missed optimization earlier because jump2 is way late to be
optimizing this case.

Also this is just an issue with return so it might not be as important as most
people think (the other missed optimization earlier is though).

      parent reply	other threads:[~2023-04-23 18:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 18:26 [Bug target/109601] New: " 67 at mniip dot com
2023-04-23 18:48 ` [Bug rtl-optimization/109601] " pinskia at gcc dot gnu.org
2023-04-23 18:58 ` pinskia at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109601-4-bsMXYkDsv8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).