https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116704
--- Comment #2 from Eyal Rozenberg <eyalroz1 at gmx dot com> --- (In reply to Andrew Pinski from comment #1) > NOTE on this is just a small size optimization and on modern processors the > setting of register to 0 is free. You mean, not taking cycles on a functional unit I assume? Yes, sure, but it still needs to be fetched decoded and... retired, I think is the term? When the register is actually updated? Anyway, sure, but just because in this example it's outside of a loop, doesn't mean it can't be inside the most tight loop in another piece of code.