optimizing gcc output for ARM

Richard Earnshaw rearnsha@arm.com
Wed Nov 22 11:07:00 GMT 2000


> 
>   In message < 200011221759.RAA14019@cam-mail2.cambridge.arm.com >you write:
>   > gives me (gcc -O2):
>   > 
>   > bar:
>   >         mul     r1, r0, r1
>   >         mov     r3, #9
>   > .L13:
>   >         subs    r3, r3, #1
>   >         bpl     .L13
>   >         add     r0, r1, r1, asl #2
>   >         mov     r0, r0, asl #1
>   >         mov     pc, lr
> FWIW, the loop itself is completely useless too since the result of the
> entire loop is sum += (coeff * sample * 10)
> 
> We actually realize that the loop computes above expression, but don't
> actually remove the useless loop.

Indeed.  I'd noticed that as well.... 

Pity we don't remove it yet :-(

R.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list