This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/39871] [4.3/4.4/4.5 regression] Code size increase on ARM due to inferior CSE
- From: "mikpe at it dot uu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jun 2009 10:24:03 -0000
- Subject: [Bug rtl-optimization/39871] [4.3/4.4/4.5 regression] Code size increase on ARM due to inferior CSE
- References: <bug-39871-17592@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mikpe at it dot uu dot se 2009-06-14 10:24 -------
(In reply to comment #1)
> With 4.5 I see
> With 4.5.0 I see:
>
> push {lr}
> sub sp, sp, #12
> ldr r2, [r0]
> ldr r1, [r0, #4]
> mov r0, sp
> str r2, [sp, #4]
> bl func
> add sp, sp, #12
> pop {pc}
However, gcc-4.5-20090611 generates the longer 10-instruction code:
push {lr}
ldr r2, [r0]
sub sp, sp, #20
add r3, sp, #4
ldr r1, [r0, #4]
str r2, [r3, #4]
mov r0, r3
bl func
add sp, sp, #20
pop {pc}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39871