[Bug rtl-optimization/65135] [5 Regression] Performance regression in pic mode after r220674.

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Feb 20 15:39:00 GMT 2015


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |vmakarov at redhat dot com

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
After r220674, we have

        movl    z1.1821@GOTOFF(%ebp), %eax
...
        movl    %eax, %esi
...
    movl    %esi, 4(%esp)
...
.L6:
    movl    4(%esp), %ebx
    testl    %ebx, %ebx
    jne    .L9
    movl    20(%esp), %eax
    movl    (%eax,%edx), %eax
    cmpl    $-1, %eax
    je    .L11
.L42:
    movl    8(%esp), %edi
    leal    0(,%eax,4), %edx
    movl    %ecx, %ebx
    addl    %edx, %edi
    cmpl    $101, %ecx
    je    .L40
    movl    12(%esp), %esi
    cmpl    (%edi), %esi
    leal    1(%ebx), %ecx
    jne    .L6

vs

        movl    z1.1821@GOTOFF(%ebx), %esi
...
.L8:
    testl    %esi, %esi
    jne    .L11
    movl    16(%esp), %eax
    movl    (%eax,%edx), %eax
    cmpl    $-1, %eax
    je    .L13
.L43:
    movl    4(%esp), %edi
    leal    0(,%eax,4), %edx
    movl    %ecx, %ebx
    addl    %edx, %edi
    cmpl    $101, %ecx
    je    .L41
    movl    8(%esp), %ebp
    cmpl    (%edi), %ebp
    leal    1(%ebx), %ecx
    jne    .L8

RA puts GOT into %ebp and won't use it for this loop.



More information about the Gcc-bugs mailing list