Standard is a contract between authors of program and authors of
C implementation; if program invokes undefined behaviour, all bets
are off. It is allowed to compile the check in question into "check
if addition had triggered an overflow; if it had, before bothering
with any comparisons do unto luser what Simon would have done
on a particulary bad day".
It can also turn that into "if addition overflows, take the value of
first argument". And optimize according to that.
It's not a matter of optimizing your comparisons away; it's a matter
of addition having no prescribed semantics in case of overflows,
regardless of optimizations.