public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/64317] New: [5 Regression] Ineffective allocation of PIC base register
@ 2014-12-15 15:03 izamyatin at gmail dot com
  2014-12-15 15:07 ` [Bug rtl-optimization/64317] " rguenth at gcc dot gnu.org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: izamyatin at gmail dot com @ 2014-12-15 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64317
           Summary: [5 Regression] Ineffective allocation of PIC base
                    register
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: izamyatin at gmail dot com
                CC: vmakarov at redhat dot com
            Target: i686

Created attachment 34285
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34285&action=edit
Reproducer

For the attached test compiled with -O2  -m32 -fPIE -pie  after r218059 we
generate 

    call    __x86.get_pc_thunk.ax
    addl    $_GLOBAL_OFFSET_TABLE_, %eax
    subl    $28, %esp
    .cfi_def_cfa_offset 48
    movl    48(%esp), %edi
    movl    %eax, 12(%esp)            <--- PIC reg spill
    testl    %edi, %edi
    je    .L8
    movl    12(%esp), %eax            <--- PIC reg fill
    xorl    %esi, %esi
    movl    c@GOT(%eax), %ebp
    .p2align 4,,10
    .p2align 3
.L4:
    movl    12(%esp), %ebx            <--- PIC reg fill
    addl    $1, %esi
    call    bar@PLT

while for r218058 there is no spill and only reg-reg fill:

    call    __x86.get_pc_thunk.di
    addl    $_GLOBAL_OFFSET_TABLE_, %edi
    subl    $12, %esp
    .cfi_def_cfa_offset 32
    movl    32(%esp), %eax
    testl    %eax, %eax
    je    .L8
    movl    c@GOT(%edi), %ebp
    xorl    %esi, %esi
    .p2align 4,,10
    .p2align 3
.L4:
    movl    %edi, %ebx
    addl    $1, %esi
    call    bar@PLT


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-03-23  5:23 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 15:03 [Bug rtl-optimization/64317] New: [5 Regression] Ineffective allocation of PIC base register izamyatin at gmail dot com
2014-12-15 15:07 ` [Bug rtl-optimization/64317] " rguenth at gcc dot gnu.org
2015-01-13 10:26 ` rguenth at gcc dot gnu.org
2015-01-23 20:17 ` vmakarov at gcc dot gnu.org
2015-02-05 12:22 ` enkovich.gnu at gmail dot com
2015-02-06  9:52 ` jakub at gcc dot gnu.org
2015-02-06 10:06 ` enkovich.gnu at gmail dot com
2015-02-10 22:17 ` vmakarov at gcc dot gnu.org
2015-02-12 21:04 ` law at redhat dot com
2015-02-13  3:35 ` vmakarov at gcc dot gnu.org
2015-02-13  3:37 ` vmakarov at gcc dot gnu.org
2015-02-13  8:06 ` enkovich.gnu at gmail dot com
2015-02-19 13:18 ` law at redhat dot com
2015-02-19 16:21 ` vmakarov at gcc dot gnu.org
2015-02-20 23:24 ` law at redhat dot com
2015-02-21 20:10 ` vmakarov at gcc dot gnu.org
2015-02-27 23:07 ` vmakarov at gcc dot gnu.org
2015-03-03 19:08 ` law at redhat dot com
2015-03-03 22:39 ` law at redhat dot com
2015-03-04 17:39 ` law at redhat dot com
2015-03-05 15:37 ` vmakarov at gcc dot gnu.org
2015-03-05 20:01 ` law at redhat dot com
2015-03-09 17:12 ` law at redhat dot com
2015-03-23  7:53 ` law at gcc dot gnu.org
2015-03-23  7:54 ` law at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).