#define MAX_NR 123
return ((nr >= 0) && (nr < MAX_NR));
which is supposed to be compiled into the following instruction set:
The fun part begins when optimizer touches the code. Compiler can
prove that with the above limitation [0, MAX_NR) it's actually safe
to eliminate one of the checks by casting signed int nr to unsigned
int nr, thus shortening the instruction set to:
Future is awesome!