This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/58033] counterproductive bb-reorder
- 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: Mon, 25 Nov 2013 18:44:33 +0000
- Subject: [Bug rtl-optimization/58033] counterproductive bb-reorder
- Auto-submitted: auto-generated
- References: <bug-58033-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58033
--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Another somewhat related SH example, compiled with -m4 -O2 -ml on rev 205313:
int
foo1 (long long value)
{
const long long constant = 0xc000000080000000LL;
if (value < constant)
return 1;
else
return 2;
}
mov.l .L12,r1
cmp/ge r1,r5
bt/s .L10 <<< should branch to L10
cmp/gt r1,r5
mov #1,r0
.L6:
rts
nop
.align 1
.L10:
bf .L11 <<< never branches, always falls through
.L5:
rts
mov #2,r0
.align 1
.L11:
mov.l .L13,r1
cmp/hs r1,r4
bt .L5
mov #1,r0
bra .L6 <<< could just duplicate BB from L6 here
nop (see also PR 58615)