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