https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81657
Wilco <wilco at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wilco at gcc dot gnu.org --- Comment #5 from Wilco <wilco at gcc dot gnu.org> --- Note there are other optimizations which can block a tailcall, for example: void *f (void *p) { return __builtin_strchr (p, 0); } f: stp x19, x30, [sp, -16]! mov x19, x0 bl strlen add x0, x19, x0 ldp x19, x30, [sp], 16 ret f: pushq %rbx movq %rdi, %rbx call strlen addq %rbx, %rax popq %rbx ret So the question is whether a tailcall is ever better than using a faster library call.