public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rakdver at iuuk dot mff.cuni.cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/55875] [4.8 Regression] IVopts caused miscompilation
Date: Mon, 07 Jan 2013 14:09:00 -0000	[thread overview]
Message-ID: <bug-55875-4-vu3waLPfbn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55875-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55875

--- Comment #4 from rakdver at iuuk dot mff.cuni.cz 2013-01-07 14:09:18 UTC ---
> this is correct, since it is done in unsigned int.
> Next we do:
>       res = chrec_convert (type, chrec1, at_stmt);
> Eventually we go to convert_affine_scev and we set enforce_overflow_semantics
>   enforce_overflow_semantics = (use_overflow_semantics
>                                 && nowrap_type_p (type));
> 
> This test looks backwards to me.  If the type is nowrap, we do not need to
> enforce anything about overflows, when it is wrap, then we have to.

The test is correct -- here, type is the type we are converting to; so, if
the type is nowrap, we have to make sure that the conversion is not creating
an overflowing iv.

Anyway, that is irrelevant to the problem: the check of scev_probably_wraps_p
below should return false -- which is probably what got broken by the #of
iterations estimation change.

Zdenek


  parent reply	other threads:[~2013-01-07 14:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 12:09 [Bug tree-optimization/55875] New: " jakub at gcc dot gnu.org
2013-01-04 12:09 ` [Bug tree-optimization/55875] " jakub at gcc dot gnu.org
2013-01-04 12:21 ` mpolacek at gcc dot gnu.org
2013-01-04 12:24 ` jakub at gcc dot gnu.org
2013-01-07 13:37 ` hubicka at gcc dot gnu.org
2013-01-07 14:09 ` rakdver at iuuk dot mff.cuni.cz [this message]
2013-01-07 14:11 ` rakdver at gcc dot gnu.org
2013-01-07 17:08 ` hubicka at gcc dot gnu.org
2013-01-08 16:13 ` hubicka at gcc dot gnu.org
2013-01-08 17:56 ` hubicka at gcc dot gnu.org
2013-01-08 18:28 ` jakub at gcc dot gnu.org
2013-01-09 15:11 ` hubicka at gcc dot gnu.org
2013-01-09 15:13 ` jakub at gcc dot gnu.org
2013-01-09 16:29 ` hubicka at ucw dot cz
2013-01-09 16:35 ` jakub 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-55875-4-vu3waLPfbn@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).