From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29649 invoked by alias); 22 Apr 2007 11:34:14 -0000 Received: (qmail 29604 invoked by uid 48); 22 Apr 2007 11:34:05 -0000 Date: Sun, 22 Apr 2007 11:34:00 -0000 Subject: [Bug tree-optimization/31657] New: Should combine bit tests in if stmts X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg01608.txt.bz2 1) if (X & (1 << a)) if (X & (1 << b)) should be combined to tmp = (1 << a) | (1 << b) if (X & tmp == tmp) 2) if (X & a) goto doit; else if (X & b) goto doit doit: (i.e. the CFG form of (X & a || X & b)) should be combined to if (X & (a | b)) goto doit The first form happens in SPEC2k6 libquantum hottest loop. The patch I have for this should also be made to address PR15353. -- Summary: Should combine bit tests in if stmts Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: rguenth at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org OtherBugsDependingO 15353,15357,26163 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31657