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 tree-optimization/24669] Loop index variable has offset of 1



------- Comment #1 from uros at kss-loka dot si  2005-11-04 09:20 -------
-fno-ivopts produces:

        movl    16(%esp), %edi
        movl    20(%esp), %esi
        xorl    %ebx, %ebx
        movl    $4, %ecx              <<< index starts with 1
.L2:
        leal    (%ebx,%ebx), %edx
        movl    (%edi,%edx,2), %eax
        movl    %eax, (%esi,%edx,2)
        addl    $1, %ebx
        subl    $1, %ecx              <<< no compare!
        jne     .L2

Hm, why isn't produced something like:

        movl    8(%esp), %ebx
        movl    12(%esp), %ecx
        movl    $4, %edx
.L2:
        movl    (%ebx,%edx,4), %eax
        movl    %eax, (%ecx,%edx,4)
        dec     %edx
        jne     .L2


-- 


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


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