This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/72711] New: [SH] Missed delay slot with epilogue
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Jul 2016 17:01:33 +0000
- Subject: [Bug target/72711] New: [SH] Missed delay slot with epilogue
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72711
Bug ID: 72711
Summary: [SH] Missed delay slot with epilogue
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Target Milestone: ---
Target: sh*-*-*
The following example shows that the delay slot pass stops looking for
candidates when it hits the beginning of the epilogue.
unsigned short bar (int);
unsigned short foo (int x)
{
return bar (x) + 1;
}
Compiled with -O2 for SH:
_foo:
mov.l .L3,r0
sts.l pr,@-r15
jsr @r0
nop
add #1,r0
extu.w r0,r0 <<< delay slot candidate
lds.l @r15+,pr
rts
nop <<< unused delay slot
.L4:
.align 2
.L3:
.long _bar