[Bug rtl-optimization/44025] Multiple load 0 to register
steven at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 24 18:17:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44025
--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> 2012-07-24 18:16:17 UTC ---
Prototype patch attached to this email:
http://gcc.gnu.org/ml/gcc/2012-07/msg00189.html
It's not a finished patch, but it should be a good starting point for anyone
who really wants to fix this problem:
bar4:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
mov r3, r0
ldr r0, [r0, #520]
push {r4, r5, r6, lr}
mov r2, r3
mov r1, r3
adds r0, r3, r0
movs r6, #0
b .L9
.L4:
ldrb r5, [r2], #1 @ zero_extendqisi2
cmp r5, #10
bne .L9
mov r1, r2
movs r4, #0
strb r6, [r2, #-1]
.L9:
subs r5, r0, r2
cmp r5, #0
bgt .L4
cmp r1, r3
bne .L5
strb r4, [r1, #512]
pop {r4, r5, r6, pc}
.L10:
subs r4, r1, r3
mov r0, r3
mov r2, r4
bl memmove
mov r3, r0
.L11:
str r4, [r3, #520]
pop {r4, r5, r6, pc}
.L5:
ldr r2, [r3, #520]
adds r2, r3, r2
cmp r1, r2
bcs .L11
b .L10
More information about the Gcc-bugs
mailing list