This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15241] [tree-ssa] Convert a <= 7 && b <= 7 into (a | b) <= 7.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 May 2004 13:10:45 -0000
- Subject: [Bug optimization/15241] [tree-ssa] Convert a <= 7 && b <= 7 into (a | b) <= 7.
- References: <20040501125833.15241.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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