------- Additional Comments From steven at gcc dot gnu dot org 2005-01-23
13:30 -------
GCC mainline as of 2005-01-23 produces this with -O2 -fomit-frame-pointer:
f:
xorl %edx, %edx
.p2align 4,,7
.L2:
movl b(,%edx,4), %eax
movl %eax, a(,%edx,4)
leal 1(%edx), %eax
cmpl $20, %eax
movl %eax, %edx
jne .L2
rep ; ret
I'm not sure why we use leal, but otherwise this code looks pretty much
optimial.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9553