This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/46200] [4.6 Regression] optimization regression in simple pointer loop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]