Example:
[EMAIL PROTECTED]:/tmp% cat test.c
int f(int x) { return x && (x & 0x55); }
[EMAIL PROTECTED]:/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