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 tree-optimization/28364] poor optimization choices when iterating over a std::string (probably not c++-specific)



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-07-12 22:52 -------
For me on PPC-darwin, it generates pretty good code at just -O2 even though
there is a duplicated "header".  The loop is pretty good at scheduling the code
too:
L9:
        lbz r0,0(r3)
        cmplwi cr7,r0,31
        extsb r0,r0
        cmpwi cr1,r0,127
        cmpwi cr6,r0,92
        ble- cr7,L4
        beq- cr6,L4
        beq- cr1,L4
L8:
        addi r3,r3,1
        bdnz L9

Though the branches throw off everything (though that is a different issue),
for the Cell really cror should be used (I think).


-- 


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


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