public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: "hp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: [Bug regression/55168] New: [4.8 Regression]: gcc.c-torture/compile/pr44119.c ICE, all but -O0
Date: Thu, 01 Nov 2012 20:49:00 -0000	[thread overview]
Message-ID: <20121101204856.GA6426@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <bug-55168-4@http.gcc.gnu.org/bugzilla/>

This actually looks like a previously latent issue in predict.c For all but
estimate_num_iterations_int.  It uses the funny definition of number of
iterations (i.e. 0 means that loop will exit at first invocation of the exit
condition and that is what it will be predicted with when nitercst == 1.

Index: predict.c
===================================================================
--- predict.c   (revision 193062)
+++ predict.c   (working copy)
@@ -1433,8 +1437,8 @@ predict_loops (void)
             the loop, use it to predict this exit.  */
          else if (n_exits == 1)
            {
-             nitercst = estimated_stmt_executions_int (loop);
-             if (nitercst < 0)
+             nitercst = estimated_stmt_executions_int (loop) + 1;
+             if (nitercst <= 0)
                continue;
              if (nitercst > max)
                nitercst = max;


  parent reply	other threads:[~2012-11-01 20:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 19:24 hp at gcc dot gnu.org
2012-11-01 20:26 ` [Bug regression/55168] " hp at gcc dot gnu.org
2012-11-01 20:49 ` hubicka at ucw dot cz
2012-11-01 20:49 ` Jan Hubicka [this message]
2012-11-04 20:26 ` hp at gcc dot gnu.org
2012-11-06 14:58 ` hubicka 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=20121101204856.GA6426@atrey.karlin.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-bugzilla@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).