------- Comment #1 from rguenth at gcc dot gnu dot org 2010-01-03 11:27 ------- Confirmed. Well, GCC produces exactly the same code as ICC when using -O2 -mno-accumulate-outgoing-args -fno-optimize-sibling-calls -fomit-frame-pointer
Thus the sibcall comes in the way as obviously does -maccumulate-outgoing-args. w/o -maccumulate-outgoing-args but the rest of the options we produce Perl_sv_vsetpvfn: pushl %ebx subl $40, %esp movl 48(%esp), %ebx movl $0, 8(%esp) movl $.LC0, 4(%esp) movl %ebx, (%esp) call Perl_sv_setpvn movl 72(%esp), %eax movl %ebx, (%esp) movl %eax, 24(%esp) movl 68(%esp), %eax movl %eax, 20(%esp) movl 64(%esp), %eax movl %eax, 16(%esp) movl 60(%esp), %eax movl %eax, 12(%esp) movl 56(%esp), %eax movl %eax, 8(%esp) movl 52(%esp), %eax movl %eax, 4(%esp) call Perl_sv_vcatpvfn addl $40, %esp popl %ebx ret which looks like we cannot do better with that constraint. The sibcall variant isn't too bad either. Of course with sibcalling and -mno-accumulate-outgoing-args we fail to re-order argument setup for optimal size, even with -fschedule-insns. So that part of the bug would be valid. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com Severity|normal |enhancement Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |missed-optimization, ra Last reconfirmed|0000-00-00 00:00:00 |2010-01-03 11:27:29 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42592