From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30943 invoked by alias); 8 May 2006 19:28:07 -0000 Received: (qmail 30928 invoked by uid 48); 8 May 2006 19:27:59 -0000 Date: Mon, 08 May 2006 19:28:00 -0000 Subject: [Bug tree-optimization/27504] New: x && (x & y) not optimized to x & y X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "falk at debian dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg00837.txt.bz2 List-Id: 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 : 0: 00 04 ff 47 clr v0 4: 02 00 00 e6 beq a0,10 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