This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/9553] No induction variable elimination
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2005 13:30:49 -0000
- Subject: [Bug rtl-optimization/9553] No induction variable elimination
- References: <20030203201601.9553.binsh00@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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