Comment by caf

3 years ago

It's not the assignment. It's the multiplication x * 0x1ff.

The compiler has done range analysis and knows that at this point, x is non-negative. The programmer has dilgently ensured that values are such that the multiplication can't overflow, therefore the result of it is also non-negative. That means the later check for i being non-negative is trivially true.