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/106950] New: Missed PRE full redundancy without post-loop use
Date: Thu, 15 Sep 2022 12:45:11 +0000	[thread overview]
Message-ID: <bug-106950-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 106950
           Summary: Missed PRE full redundancy without post-loop use
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

when we have the situation of PR106922, aka g++.dg/tree-ssa/pr106922.C which is
XFAILed on !lp64 because of this there's

  mem = 0;
  do
    {
       if (mem)
         mem = 0;
       if (mem) // as 'char' instead of 'bool', maybe relevant
         bar ();
       if (i++ != n)
         break;
    }
  while (1);
  .. = mem;

with the use of 'mem' after the loop we get that antic-in in the loop
exit condition block and eventually figure the full redundancy in
the conditional redundant set to zero during PRE insertion.  When that
'mem' after the loop is _not_ there this isn't triggered (possibly
because of the 'char' vs. 'bool' here, but then one can eventually
elide the whole if (mem) bar () code).

             reply	other threads:[~2022-09-15 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 12:45 rguenth at gcc dot gnu.org [this message]
2022-09-22 11:12 ` [Bug tree-optimization/106950] " 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-106950-4@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).