https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46471
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.4.7
Summary|Worse register regalloc |Worse register regalloc
|leads to bigger code at -Os |leads to bigger code at
| |-Os; not using callee saved
| |registers instead use stack
| |locations
Last reconfirmed| |2025-01-08
Status|UNCONFIRMED |NEW
Target| |x86_64
Ever confirmed|0 |1
Known to fail| |15.0, 4.5.3
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Trunk produces:
merged_1v_upsample:
push %rbx
mov %rdx,%rbx
sub $0x10,%rsp
mov (%r9),%eax
mov (%rdx),%edx
mov %r9,0x8(%rsp)
lea (%r8,%rax,8),%rcx
mov 0x260(%rdi),%rax
call *0x18(%rax)
mov 0x8(%rsp),%r9
incl (%r9)
incl (%rbx)
add $0x10,%rsp
pop %rbx
ret
Which is the similar to 4.6/4.5.
So instead of using a stack location, 4.3 would use a callee saved register
which produces smaller code because push is only 1/2 bytes and pop is 1 byte
while saving the stack is 5 bytes and restoring is 5 bytes.