News for hackers. Stuff that matters.
Re:GodBolt: Enter C, get Assembly by syncsynchalt on Thursday December 15, 2016 @05:44PM (#13189358)
"xor r,r" is intel-ese for "set r to zero". For various reasons it's faster and smaller than the more obvious "mov r,0".

From this we can see that gcc and clang have figured out that the "if" can never be true, then they elided the loop, then optimized out the variable, ending in the equivalent of "return 0;".

There are no comments on this comment yet.