[Bug rtl-optimization/11826] [ARM] Minor register allocation problem before function return

rearnsha at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Mar 17 11:19:00 GMT 2009



------- 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



More information about the Gcc-bugs mailing list