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/18612] Loop optimiser generates incorrect code.


------- Additional Comments From bernie at develer dot com  2004-12-13 08:53 -------
What happens here is that func2() is inlined
inside func(), and j loaded into %a0 before
entering the loop, for improved speed.

The test for Array[i] > 0 is correctly
performed *inside* the loop.

This PR appears to be invalid to me, but I'll
wait for a clarification before closing it.


func:
        link.w %a6,#0
        clr.b %d0
        lea Array,%a1
        moveq #0,%d1
        move.l j,%a0
        .align  2
.L8:
        move.b %d0,%d1
        tst.b (%a1,%d1.l)
        jbeq .L5
        addq.l #1,%a0
.L5:
        addq.b #1,%d0
        cmp.b #5,%d0
        jbls .L8
        move.l %a0,j
        unlk %a6
        rts


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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