try to optimize away "if (x | 0) == x" checks