[Bug target/67763] New: [SH] Redirect conditional branches
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 29 13:18:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67763
Bug ID: 67763
Summary: [SH] Redirect conditional branches
Product: gcc
Version: unknown
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*-*-*
In CSiBE renderMite.c there's the following sequence when compiled with -O2 -m4
-ml:
mov.l @(16,r12),r4
tst r0,r0
mov r0,r11
movt r9
bt/s .L40 // (1)
mov r9,r0
mov.l .L74,r0
mov r11,r5
jsr @r0
mov.l @(16,r12),r4
or r9,r0
.L40:
// if predecessor block is (1), then
// T = r0 = 1
tst r0,r0 T = !r0 = 0
bf .L42 (2) always branch
bra .L41
mov r14,r9
.L42:
mov.l .L87,r0
mov r15,r6
mov.l .L76,r5
add #16,r6
The branch (1) can be "straightened" by redirecting it to .L42.
More information about the Gcc-bugs
mailing list