This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/27504] New: x && (x & y) not optimized to x & y
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2006 19:27:59 -0000
- Subject: [Bug tree-optimization/27504] New: x && (x & y) not optimized to x & y
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Example:
falk@juist:/tmp% cat test.c
int f(int x) { return x && (x & 0x55); }
falk@juist:/tmp% gcc -c -O3 test.c && objdump -d test.o
0000000000000000 <f>:
0: 00 04 ff 47 clr v0
4: 02 00 00 e6 beq a0,10 <f+0x10>
8: 01 b0 0a 46 and a0,0x55,t0
c: a0 03 e1 43 cmpult zero,t0,v0
10: 01 80 fa 6b ret
--
Summary: x && (x & y) not optimized to x & y
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27504