public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/102650] [12 Regression] Dead Code Elimination Regression at -O3 (trunk vs 11.2.0)
Date: Thu, 20 Jan 2022 09:20:14 +0000	[thread overview]
Message-ID: <bug-102650-4-uhSjpLYil8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102650-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Actually e will not be used uninitialized

    for (; d < 1; d++)
        e = f + a;

will initialize it since d is zero and its value will be 4.  But jump
threading isolates the case where we would access e uninitialized.
So yes, it does seem worth doing that but maybe only on isolated paths
(to not defeat uninit diagnostics and also to remove spurious uninit
diagnostics).  The situation isn't easily visible from the threader
itself and the question is how much GCC itself will expose unconditional
uninit uses (there are some bugs around ifcombine doing that) so it's
prone to producing wrong-code as well.

That said, we probably have to live with this regression for GCC 12 and
could look into sanitizing our undef behavior for GCC 13 somehow.

  parent reply	other threads:[~2022-01-20  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 13:47 [Bug tree-optimization/102650] New: " theodort at inf dot ethz.ch
2021-10-08 16:45 ` [Bug tree-optimization/102650] " amacleod at redhat dot com
2021-10-11  8:34 ` [Bug tree-optimization/102650] [12 Regression] " rguenth at gcc dot gnu.org
2021-11-05 20:20 ` amacleod at redhat dot com
2022-01-19 14:13 ` rguenth at gcc dot gnu.org
2022-01-19 14:18 ` rguenth at gcc dot gnu.org
2022-01-19 15:15 ` amacleod at redhat dot com
2022-01-20  9:20 ` rguenth at gcc dot gnu.org [this message]
2022-01-20 14:52 ` amacleod at redhat dot com
2022-03-23  8:45 ` rguenth at gcc dot gnu.org
2022-11-03 19:33 ` [Bug tree-optimization/102650] [12/13 " amacleod at redhat dot com

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-102650-4-uhSjpLYil8@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).