* [Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return
[not found] <bug-11826-5666@http.gcc.gnu.org/bugzilla/>
@ 2008-02-08 16:52 ` alexandre dot nunes at gmail dot com
2008-11-29 19:29 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: alexandre dot nunes at gmail dot com @ 2008-02-08 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from alexandre dot nunes at gmail dot com 2008-02-08 16:51 -------
I suggest closing this unless reproductible on gcc 4.3.x, since at least
vanilla arm-elf-gcc 4.2.2 is correct:
foo:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
cmn r1, r0
rsbeq r0, r1, r0
rsbne r0, r0, r1
@ lr needed for prologue
bx lr
.size foo, .-foo
.ident "GCC: (GNU) 4.2.2"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return
[not found] <bug-11826-5666@http.gcc.gnu.org/bugzilla/>
2008-02-08 16:52 ` [Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return alexandre dot nunes at gmail dot com
@ 2008-11-29 19:29 ` steven at gcc dot gnu dot org
2009-03-13 12:28 ` ramana dot r at gmail dot com
2009-03-17 11:19 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-11-29 19:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from steven at gcc dot gnu dot org 2008-11-29 19:28 -------
Can an ARM maintainer please check this bug? Comment #4 suggests this bug is
fixed, but it needs re-checking now that IRA has been merged.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pbrook at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return
[not found] <bug-11826-5666@http.gcc.gnu.org/bugzilla/>
2008-02-08 16:52 ` [Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return alexandre dot nunes at gmail dot com
2008-11-29 19:29 ` steven at gcc dot gnu dot org
@ 2009-03-13 12:28 ` ramana dot r at gmail dot com
2009-03-17 11:19 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: ramana dot r at gmail dot com @ 2009-03-13 12:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ramana dot r at gmail dot com 2009-03-13 12:28 -------
(In reply to comment #5)
> Can an ARM maintainer please check this bug? Comment #4 suggests this bug is
> fixed, but it needs re-checking now that IRA has been merged.
This is now fixed on mainline even after IRA . This bug can now be closed.
foo:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
mov r3, r0
cmn r1, r0
rsbeq r0, r1, r0
rsbne r0, r3, r1
bx lr
.size foo, .-foo
.ident "GCC: (GNU) 4.4.0 20090312 (experimental)"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11826
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return
[not found] <bug-11826-5666@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2009-03-13 12:28 ` ramana dot r at gmail dot com
@ 2009-03-17 11:19 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-03-17 11:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rearnsha at gcc dot gnu dot org 2009-03-17 11:19 -------
(In reply to comment #6)
> foo:
> mov r3, r0
> cmn r1, r0
> rsbeq r0, r1, r0
> rsbne r0, r3, r1
> bx lr
This appears to be the code generated at -O1 and although the return is fixed,
the redundant insn has now moved to the prologue...
Fortunately at -Os and -O2 the output is sensible:
foo:
cmn r1, r0
rsbeq r0, r1, r0
rsbne r0, r0, r1
bx lr
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11826
^ permalink raw reply [flat|nested] 6+ messages in thread