http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60919
Bug ID: 60919 Summary: gcc fails to tail call __builtin_ffsll Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: will.newton at gmail dot com The following code compiled with gcc 4.9 at -O2: int __ffsll (long long int x) { return __builtin_ffsll (x); } Generates: 00000000 <__ffs>: 0: b508 push {r3, lr} 2: f7ff fffe bl 0 <__ffsdi2> 6: bd08 pop {r3, pc} This looks like it would be much better to just tail call __ffsdi2.