public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/60919] New: gcc fails to tail call __builtin_ffsll
@ 2014-04-22 9:59 will.newton at gmail dot com
2015-10-10 11:01 ` [Bug tree-optimization/60919] [arm] " ramana at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: will.newton at gmail dot com @ 2014-04-22 9:59 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/60919] [arm] gcc fails to tail call __builtin_ffsll
2014-04-22 9:59 [Bug target/60919] New: gcc fails to tail call __builtin_ffsll will.newton at gmail dot com
@ 2015-10-10 11:01 ` ramana at gcc dot gnu.org
2021-08-16 6:38 ` [Bug middle-end/60919] " pinskia at gcc dot gnu.org
2021-08-16 6:39 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-10-10 11:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60919
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-10-10
CC| |ramana at gcc dot gnu.org
Component|target |tree-optimization
Ever confirmed|0 |1
Severity|minor |enhancement
--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/60919] [arm] gcc fails to tail call __builtin_ffsll
2014-04-22 9:59 [Bug target/60919] New: gcc fails to tail call __builtin_ffsll will.newton at gmail dot com
2015-10-10 11:01 ` [Bug tree-optimization/60919] [arm] " ramana at gcc dot gnu.org
@ 2021-08-16 6:38 ` pinskia at gcc dot gnu.org
2021-08-16 6:39 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-16 6:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60919
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |middle-end
Keywords| |missed-optimization
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, the tree level has:
_2 = __builtin_ffsll (x_1(D)); [tail call]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/60919] [arm] gcc fails to tail call __builtin_ffsll
2014-04-22 9:59 [Bug target/60919] New: gcc fails to tail call __builtin_ffsll will.newton at gmail dot com
2015-10-10 11:01 ` [Bug tree-optimization/60919] [arm] " ramana at gcc dot gnu.org
2021-08-16 6:38 ` [Bug middle-end/60919] " pinskia at gcc dot gnu.org
@ 2021-08-16 6:39 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-16 6:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60919
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |15473
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect this is due to sibcalling infomation is not transfered when doing a
libcall. So this is similar to PR 15473.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15473
[Bug 15473] Sibcall optimization for libcalls.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-16 6:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 9:59 [Bug target/60919] New: gcc fails to tail call __builtin_ffsll will.newton at gmail dot com
2015-10-10 11:01 ` [Bug tree-optimization/60919] [arm] " ramana at gcc dot gnu.org
2021-08-16 6:38 ` [Bug middle-end/60919] " pinskia at gcc dot gnu.org
2021-08-16 6:39 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).