[Bug tree-optimization/22041] Reverse loop order for increased efficiency

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 30 18:34:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22041

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2013-03-17 12:00:00         |2016-8-30

--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Still the same - we have an additional instruction in the first
variant.  It is

        movss   (%rsi), %xmm0
        addl    $1, %eax
        addq    %r8, %rsi
        movss   %xmm0, (%rdi)
        addq    %rcx, %rdi
        cmpl    %eax, %edx
        jne     .L3


vs.

.L3:
        movss   (%rsi), %xmm0
        addq    %r8, %rsi
        movss   %xmm0, (%rdi)
        addq    %rcx, %rdi
        subl    $1, %edx
        jne     .L3


More information about the Gcc-bugs mailing list