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

           Summary: Worse register regalloc leads to bigger code at -Os
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: hubi...@gcc.gnu.org


Created attachment 22391
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22391
Preprocessed testcase

Another CSiBE regression I noticed in merged_1v_upsample.  Gcc 4.3 gets around
w/o stack frame:

0000000000000018 <merged_1v_upsample>:
  18:   41 54                   push   %r12
  1a:   49 89 d4                mov    %rdx,%r12
  1d:   53                      push   %rbx
  1e:   4c 89 cb                mov    %r9,%rbx
  21:   48 83 ec 08             sub    $0x8,%rsp
  25:   41 8b 09                mov    (%r9),%ecx
  28:   48 8b 87 60 02 00 00    mov    0x260(%rdi),%rax
  2f:   8b 12                   mov    (%rdx),%edx
  31:   49 8d 0c c8             lea    (%r8,%rcx,8),%rcx
  35:   ff 50 18                callq  *0x18(%rax)
  38:   ff 03                   incl   (%rbx)
  3a:   41 ff 04 24             incl   (%r12)
  3e:   58                      pop    %rax
  3f:   5b                      pop    %rbx
  40:   41 5c                   pop    %r12
  42:   c3                      retq   

While current mainline produce:

0000000000000018 <merged_1v_upsample>:
  18:   53                      push   %rbx
  19:   48 89 d3                mov    %rdx,%rbx
  1c:   48 83 ec 10             sub    $0x10,%rsp
  20:   41 8b 11                mov    (%r9),%edx
  23:   48 8b 87 60 02 00 00    mov    0x260(%rdi),%rax
  2a:   4c 89 4c 24 08          mov    %r9,0x8(%rsp)
  2f:   49 8d 0c d0             lea    (%r8,%rdx,8),%rcx
  33:   8b 13                   mov    (%rbx),%edx
  35:   ff 50 18                callq  *0x18(%rax)
  38:   4c 8b 4c 24 08          mov    0x8(%rsp),%r9
  3d:   41 ff 01                incl   (%r9)
  40:   ff 03                   incl   (%rbx)
  42:   58                      pop    %rax
  43:   5a                      pop    %rdx
  44:   5b                      pop    %rbx
  45:   c3                      retq

Reply via email to