[Bug target/64036] [SH] Evaluate re-enabling scheduling before RA
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 25 11:21:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64036
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
For this test case
static volatile int* const g_0 = (volatile int*)0x1240;
static volatile int* const g_1 = (volatile int*)0x1244;
static volatile int* const g_2 = (volatile int*)0x1248;
static volatile int* const g_3 = (volatile int*)0x124C;
int fun (void)
{
return *g_0 + *g_1 + *g_2 + *g_3;
}
I'm getting the following with -O2 with AMS (without sched1):
mov.w .L2,r1
mov.l @r1,r0
mov.l @(4,r1),r3
mov.l @(8,r1),r2
mov.l @(12,r1),r1
add r3,r0
add r2,r0
rts
add r1,r0
.align 1
.L2:
.short 4672
And with sched1:
mov.w .L2,r1
mov.w .L3,r2
mov.l @r1+,r0
mov.l @r1,r1
mov.l @r2,r2
add r1,r0
mov.w .L4,r1
add r2,r0
mov.l @r1,r1
rts
add r1,r0
.align 1
.L2:
.short 4672
.L3:
.short 4680
.L4:
.short 4684
This is one of the cases where sched1 makes things worse.
More information about the Gcc-bugs
mailing list