public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldyh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/102631] -Wmaybe-uninitialized cannot see through a series of PHIs
Date: Thu, 07 Oct 2021 08:21:08 +0000	[thread overview]
Message-ID: <bug-102631-4-Bd7VFa94Og@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102631-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
For the calls-aarch64.ii testcase, there's some additional information in the
upstream thread.  Quoted here for convenience:

There's some missing context.

The only way to get to BB101->BB102 is through:

   <bb 100>
   if (_6711 != 0)
     goto <bb 101>; [5.50%]
   else
     goto <bb 293>; [94.50%]

And there's an implicit relation between _6711 and _811:

<bb 86>
...
   if (_6711 != 0)
     goto <bb 287>; [5.50%]
   else
     goto <bb 87>; [94.50%]

   <bb 287> [local count: 17344687]:
   goto <bb 88>; [100.00%]

   <bb 87> [local count: 298013267]:

   <bb 88> [local count: 315357954]:
   # _881 = PHI <1(87), 0(287)>

That is, _6711 == !_881.

Presumably the threader shuffled things sufficiently so that the above
relationship is difficult to devise.  It seemsthat  it's having a hard time
noticing that the _6711 and _811 guards are inversely related.

  parent reply	other threads:[~2021-10-07  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 16:43 [Bug tree-optimization/102631] New: " aldyh at gcc dot gnu.org
2021-10-06 16:44 ` [Bug tree-optimization/102631] " aldyh at gcc dot gnu.org
2021-10-06 16:47 ` aldyh at gcc dot gnu.org
2021-10-06 16:51 ` aldyh at gcc dot gnu.org
2021-10-07  8:21 ` aldyh at gcc dot gnu.org [this message]
2022-08-31 14:17 ` rguenth at gcc dot gnu.org

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-102631-4-Bd7VFa94Og@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).