[Bug target/65374] New: [SH] Tail call optimization not done for libcalls
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 10 08:03:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65374
Bug ID: 65374
Summary: [SH] Tail call optimization not done for libcalls
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Target: sh*-*-*
This example function:
unsigned int test (unsigned int x)
{
return __builtin_clz (x);
}
Compiled with -m4 -O2:
_test:
mov.l .L3,r0
sts.l pr,@-r15
jsr @r0
nop
lds.l @r15+,pr
rts
nop
.L4:
.align 2
.L3:
.long ___clzsi2
For some reason, tail call optimization is not performed in this case.
More information about the Gcc-bugs
mailing list