This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/60919] New: gcc fails to tail call __builtin_ffsll


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]