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