My patch caused GCC to infer that x & 7 > 7 is false. But I couldn't think of a quick way to use this to optimize away the check, because then GCC crashed.Why can't this information be used to optimize comparisons?
Does it work only for consecutive ands? Or is it just an early constant folding: return (x + 1) & (0x0f & 0x0c & 0x3ff & 0xff); ?
In this case, it is. Paolo