At tree level, we would like to canonicalize (a >> 2) & 1 != 0 into a & 4 != 0.
Currently, void bar (void); void foo (int a) { if ((a >> 2) & 1) bar (); } turns into foo (a) { int D.1235; int D.1236; _Bool D.1237; D.1235 = a >> 2; D.1236 = D.1235 & 1; D.1237 = (_Bool) D.1236; if (D.1237) { bar (); } else { } } -- Summary: Convert (a >> 2) & 1 != 0 into a & 4 != 0 Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kazu at cs dot umass dot edu CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21137