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/57343] [4.8/4.9 Regression] wrong code on x86_64-linux at -Os and above
Date: Tue, 21 May 2013 12:19:00 -0000	[thread overview]
Message-ID: <bug-57343-4-6Kw2EkBUbn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57343-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> Index: gcc/tree-ssa-loop-niter.c
> ===================================================================
> --- gcc/tree-ssa-loop-niter.c   (revision 199137)
> +++ gcc/tree-ssa-loop-niter.c   (working copy)
> @@ -627,7 +627,7 @@ number_of_iterations_ne (tree type, affi
>       not overflow, BNDS bounds the value of C.  Also, this is the
>       case if the computation |FINAL - IV->base| does not overflow, i.e.,
>       if BNDS->below in the result is nonnegative.  */
> -  if (tree_int_cst_sign_bit (iv->step))
> +  if (tree_int_cst_sgn (iv->step) == -1)
>      {
>        s = fold_convert (niter_type,
>                         fold_build1 (NEGATE_EXPR, type, iv->step));
> 
> fixes the testcase (otherwise untested).

Doesn't work and fails bootstrap.


  parent reply	other threads:[~2013-05-21 12:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-57343-4@http.gcc.gnu.org/bugzilla/>
2013-05-20 22:55 ` [Bug tree-optimization/57343] " glisse at gcc dot gnu.org
2013-05-21  6:23 ` [Bug tree-optimization/57343] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-05-21  9:54 ` rguenth at gcc dot gnu.org
2013-05-21 11:54 ` rguenth at gcc dot gnu.org
2013-05-21 12:19 ` rguenth at gcc dot gnu.org [this message]
2013-05-21 14:41 ` rakdver at gcc dot gnu.org
2013-05-27  7:55 ` rguenther at suse dot de
2013-05-27  9:01 ` rguenth at gcc dot gnu.org
2013-05-27 13:03 ` [Bug tree-optimization/57343] [4.8 " rguenth at gcc dot gnu.org
2013-08-29 13:09 ` jakub at gcc dot gnu.org
2013-08-29 13:17 ` 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-57343-4-6Kw2EkBUbn@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).