------- Comment #10 from carrot at google dot com  2010-01-11 06:47 -------
(In reply to comment #9)
> With "GCC: (GNU) 4.5.0 20100108 (experimental) [trunk revision 155731]" and my
> patch for bug 20070 applied, I get the following code:
> 
> iterate:
>         push    {lr}
>         ldr     r3, [r1]
> .L6:
>         str     r3, [r0]
>         sub     r2, r3, #0
>         bne     .L5
>         b       .L3
> .L4:
>         ldr     r3, [r3, #8]
>         b       .L6
> .L5:
>         ldr     r1, [r3, #4]
>         cmp     r1, #0
>         beq     .L4
> .L3:
>         str     r2, [r0, #12]
>         @ sp needed for prologue
>         pop     {pc}
> 
> Carrot, could you please double-check that this is still correct code?
> 

Yes, it is correct.
There are still 13 instructions, I think it is related to unoptimized basic
block order.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40730

Reply via email to