https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82858
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Liu Hao from comment #2) > Trunk on <https://gcc.godbolt.org/> produces the following code: > > ``` > saturated_add(unsigned int, unsigned int): > add edi, esi > mov eax, -1 > cmovnc eax, edi > ret > ``` > > Condition moves are however, in my opinion, nothing better than branches, or > they could be something worse: <http://yarchive.net/comp/linux/cmov.html> Linus is talking about the Pentium 4. Hardware has evolved since then. On today's CPUs CMOV is fine.