[Bug rtl-optimization/17931] andl and testb are not combined

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Oct 11 14:06:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-11 14:06 -------
Note PPC's resulting asm is so much better:
        lwz r3,0(r3)
        li r0,1
        cmpwi cr7,r3,0
        blt- cr7,L4
        rlwinm r0,r3,2,31,31
L4:
        mr r3,r0
        blr

But can be improved still down to (but that is a register allocator problem):
        lwz r0,0(r3)
        cmpwi cr7,r0,0
        li r3,1
        bltlr- cr7
        rlwinm r3,r0,2,31,31
        blr

-- 


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



More information about the Gcc-bugs mailing list