------- Comment #13 from pinskia at gcc dot gnu dot org  2006-09-28 14:34 
-------
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #9)
> > > Oh, didn't I fix this?  See PR26726.
> > This is unrelated to that as the trees produced is defined but just looks 
> > weird
> > and really the one IV selection is messed up.  It should have chosen two IVs
> > for this loop instead of just one.
> > Actually unrolling is not need to produced the bad code:
> > .L2:
> >         lwz 0,0(9)
> >         stwx 0,11,9
> >         addi 9,9,4
> >         bdnz .L2
> > I bet a beer that loop.c actually fixed this crap up before.
> 
> I am bad at reading ppc assembler; could you please explain what exactly is
> wrong with the code you present?

One, there are two adds still there (just one is implicated)
so why not do the loop as:
 .L2:
         lwz r0,0(r9)
         stw r0,0(r11)
         addi r9,r9,4
         addi r11,r11,4
         bdnz .L2
Or:
 .L2:
         lwxz r0,r9,r12
         stwx r0,r11,r12
         addi r12,r12,4
         bdnz .L2


-- 


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

Reply via email to