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 tree-optimization/58915] [missed optimization] GCC fails to get the loop bound for some loops.
Date: Sun, 12 Dec 2021 10:10:00 +0000	[thread overview]
Message-ID: <bug-58915-4-LpoEmSyYfp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58915-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
      Known to work|                            |6.1.0, 7.1.0
   Target Milestone|---                         |6.0

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
hmm, curoll has
Loop 1 iterates at most 4 times.

int g(void);
void h(void);
int f(unsigned int i)
{
if (i > 0){
    h();
   if (i < 4)   {
      do {
         // if (i > 100)
          g();
         --i;
      } while (i > 0);
   }
}

}

r0-125361-ga895a2b8 started to export the range for i inside the loop.
And then r0-126335-g7190fdc1906cfdfee started to use the range information for
tree-ssa-loop-niter.c.


Without the VRP, GCC 6.1.0 have this fixed by r6-5389.

So closed as fully fixed for GCC 6.1.0.

  parent reply	other threads:[~2021-12-12 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 20:08 [Bug tree-optimization/58915] New: " congh at google dot com
2013-10-30 10:23 ` [Bug tree-optimization/58915] " rguenth at gcc dot gnu.org
2013-10-30 23:52 ` congh at google dot com
2013-11-04 14:19 ` rguenth at gcc dot gnu.org
2021-12-12 10:10 ` pinskia at gcc dot gnu.org [this message]
2021-12-12 10:16 ` pinskia 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-58915-4-LpoEmSyYfp@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).