>>103106712
I can't argue with what you said, but at -O0 it looks like there is no register allocation at all in fact:
>int func(int a, int b) { return a + b; }
0000000000000000 <func>:
0: 55 push rbp
1: 48 89 e5 mov rbp,rsp
4: 89 7d fc mov DWORD PTR [rbp-0x4],edi
7: 89 75 f8 mov DWORD PTR [rbp-0x8],esi
a: 8b 55 fc mov edx,DWORD PTR [rbp-0x4]
d: 8b 45 f8 mov eax,DWORD PTR [rbp-0x8]
10: 01 d0 add eax,edx
12: 5d pop rbp
13: c3
there is well enough registers and yet the arguments are still stored to and loaded from the stack.