I’m sorry if this is an obvious question, but I just tried to compile the following function with -O3:

`void g(uint64_t); void f(uint64_t x) { g(x); g(x); }`

and the assembly generated by clang is:

`f(unsigned long): # @f(unsigned long) pushq %rbx movq %rdi, %rbx callq g(unsigned long) movq %rbx, %rdi popq %rbx jmp g(unsigned long) # TAILCALL`

For the first call, why wouldn’t it generate “push rdi; call g; pop rdi”, but instead generate the 5 instructions above? It seems to me the former version is both shorter and more efficient…? I think I must be missing something obvious, but I couldn’t figure it out myself.

Thanks for your help!