This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/9553] No induction variable elimination


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]