http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49984
Summary: VRP does not handle BIT_XOR_EXPR Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rgue...@gcc.gnu.org In int f(int x) { if (x >= 0 && x <= 3) { x = x ^ 3; x = x & 3; } return x; } the x = x & 3 statement should be removed by simplify_bit_ops_using_ranges, but propagation does not handle BIT_XOR_EXPR and thus the input range to this statement is VARYING.