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 optimization/15241] [tree-ssa] Convert a <= 7 && b <= 7 into (a | b) <= 7.


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-01 13:10 -------
On PPC the former is much worse than the later:
_foo:
        subfic r3,r3,7
        li r3,0
        adde r3,r3,r3 // <-- r3 == r3 <=7 on some processors this is serializing
        subfic r4,r4,7
        li r4,0
        adde r4,r4,r4 // <--r4 == r4 <=7 on some processors this is serializing
        and. r0,r3,r4 // r0 = r4 & r3, cr0 = (rs3 & r4) == 0
        beqlr- cr0  // return if cr0(equal) is true
        b L_baz$stub
        .align 2
        .globl _bar
_bar:
        or r4,r3,r4
        cmplwi cr7,r4,7
        bgtlr- cr7
        b L_baz$stub

-- 


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


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