[Bug target/42500] unnecessary register move
ramana at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Dec 30 00:10:00 GMT 2009
------- Comment #2 from ramana at gcc dot gnu dot org 2009-12-30 00:10 -------
(In reply to comment #1)
> What architecture options are you using ? With .ident "GCC: (GNU)
> 4.5.0 20091229 (experimental)" and -O2 I get the redundant move into r4 of sp .
>
> But for -Os I get the following very different code. I don't see the call to
> memset ever. \
Sorry I meant this rather than the code in comment #1
bar:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r0, r1, r2, r3, r4, lr}
str r0, [sp, #0]
mov r0, sp
stmib sp, {r1, r2, r3} @ phole stm
bl foo
mov r0, sp
mov r4, sp
bl foo
ldmfd sp!, {r0, r1, r2, r3, r4, pc}
.size bar, .-bar
.ident "GCC: (GNU) 4.5.0 20091229 (experimental)"
.section .note.GNU-stack,"",%progbits
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42500
More information about the Gcc-bugs
mailing list