Clang's x86 codegen loves to do that too A for loop turns into a check for the case that zero iterations would be needed, followed by a loop with the check at the end So if you wanted to, you could probably find official reason for that in the open source LLVM repo Though it's probably for the reason you stated