This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/18612] Loop optimiser generates incorrect code.
- From: "bernie at develer dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2004 08:53:22 -0000
- Subject: [Bug rtl-optimization/18612] Loop optimiser generates incorrect code.
- References: <20041122191154.18612.gccbug@sarek.cc>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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