This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/64793] New: [SH] missed delay slot
- 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: Sun, 25 Jan 2015 23:06:11 +0000
- Subject: [Bug target/64793] New: [SH] missed delay slot
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64793
Bug ID: 64793
Summary: [SH] missed delay slot
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*-*-*
The following test case
int test0 (const char* x, int a, int b, int c)
{
if (x[a] == 92)
return b;
return c;
}
compiled with -O2 -m4 results in:
mov r5,r0
mov.b @(r0,r4),r1
mov r1,r0
cmp/eq #92,r0
bt .L3
mov r7,r0 <<< this insn
rts
nop <<< should go into the delay slot
.L3:
rts
mov r6,r0