https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31593
--- Comment #50 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #49) > The second loop: > > .L3: > leaq 8(%rsp), %rdi > call intent_in_ > movl %ebx, 8(%rsp) > addl $1, %ebx > cmpl $12, %ebx > jne .L3 > > No reload from the stack, but not quite ideal yet. That > movl %ebx, 8(%rsp) would have been unneeded had one of the > callee-saved registers been used. Actually, that comment is not correct - we need to store the value of the argument so the subroutine an access it. So, we're just seeing the inevitable overhead of passing by reference here.