public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/46200] [4.6 Regression] optimization regression in simple pointer loop
Date: Thu, 28 Oct 2010 17:54:00 -0000	[thread overview]
Message-ID: <20101028175400.oTV6gf5JffNb08eeb1ROUZPVUwRo4fv-_gu5ZYst1nY@z> (raw)
In-Reply-To: <bug-46200-4@http.gcc.gnu.org/bugzilla/>

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xinliangli at gmail dot com

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-28 17:53:50 UTC ---
It is caused by revision 162653:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg01007.html

With -o2, revision 162651 gave:

test:
.LFB0:
    .cfi_startproc
    cmpq    %rsi, %rdi
    je    .L1
    movslq    %edx, %rdx
    salq    $2, %rdx
    .p2align 4,,10
    .p2align 3
.L3:
    movl    $1, (%rdi)
    addq    %rdx, %rdi
    cmpq    %rdi, %rsi
    jne    .L3
.L1:
    rep
    ret
    .cfi_endproc

Revision 162653 gave

test:
.LFB0:
    .cfi_startproc
    cmpq    %rsi, %rdi
    je    .L1
    movslq    %edx, %rdx
    salq    $2, %rdx
    movq    %rdx, %rcx
    addq    %rdx, %rdi
    negq    %rcx
    .p2align 4,,10
    .p2align 3
.L3:
    movl    $1, (%rdi,%rcx)
    addq    %rdx, %rdi
    movq    %rdi, %rax
    subq    %rdx, %rax
    cmpq    %rax, %rsi
    jne    .L3
.L1:
    rep
    ret


  parent reply	other threads:[~2010-10-28 17:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 16:57 [Bug rtl-optimization/46200] New: " miles at gnu dot org
2010-10-28 14:53 ` [Bug target/46200] [4.6 Regression] " rguenth at gcc dot gnu.org
2010-10-28 17:14 ` hjl.tools at gmail dot com
2010-10-28 17:43 ` pinskia at gcc dot gnu.org
2010-10-28 17:54 ` hjl.tools at gmail dot com [this message]
2010-10-28 19:01 ` davidxl at gcc dot gnu.org
2010-11-03 22:41 ` davidxl 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=20101028175400.oTV6gf5JffNb08eeb1ROUZPVUwRo4fv-_gu5ZYst1nY@z \
    --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).