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 rtl-optimization/48331] [4.7 Regression] gcc.c-torture/execute/built-in-setjmp.c FAILs with -O -fira-algorithm=priority -fPIC


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

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2011-03-29 12:10:38 UTC ---
The "while (1)" part of the testcase is not actually needed.

The problem seems to be there (at the assembly level):
...
    mov    rax, QWORD PTR buf@GOTPCREL[rip]    #,
    mov    rax, QWORD PTR 8[rax]    #,
    mov    QWORD PTR -8[rbp], rax    # %sfp, # stores value
    mov    rax, QWORD PTR buf@GOTPCREL[rip]    #,
    mov    rbp, QWORD PTR [rax]    #, # rbp changes
    mov    rsp, QWORD PTR 16[rax]    #,
    jmp    [QWORD PTR -8[rbp]]    # %sfp # uses new value or rbp
...

Maybe this was just uncovered by recent changes - comparing asm output from
r171626 and r171653 shows the priority allocator now gives much worse results.

In r171626, the generated code is the same as with CB's allocator, but in
r171653 there is much higher stack usage, causing this problem to show up.


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