https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81657

--- Comment #7 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #6)
> (In reply to Wilco from comment #5)
> > Note there are other optimizations which can block a tailcall, for example:
> > 
> > void *f (void *p) { return __builtin_strchr (p, 0); }
> 
> This is irrelevant since this refers to mempcpy only, nothing else.

No it is relevant as strchr is used far more often than mempcpy. There are
likely other cases too. So if we want to add a mechanism to prefer tailcalls,
it would need to be a generic one rather than something hacked just for one
function.

Reply via email to