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 middle-end/42919] New: [4.3/4.4/4.5 Regression] Argument unnecessarily spilled


void foo(unsigned long long *x);
void testfunc2(unsigned long long a) { foo (&a); }

generates

testfunc2:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $40, %esp
        movl    8(%ebp), %eax
        movl    %eax, -16(%ebp)
        movl    12(%ebp), %eax
        movl    %eax, -12(%ebp)
        leal    -16(%ebp), %eax
        movl    %eax, (%esp)
        call    foo
        leave
        ret

which is a lot worse to what compared to what 3.4 produced:

testfunc2:
        pushl   %ebp
        movl    %esp, %ebp
        leal    8(%ebp), %eax
        subl    $8, %esp
        movl    %eax, (%esp)
        call    foo
        leave
        ret


-- 
           Summary: [4.3/4.4/4.5 Regression] Argument unnecessarily spilled
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
GCC target triplet: i?86-*-*


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


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