https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114415
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
BTW, with additional -mno-red-zone there is still movement of these insns,
though they
leaq 128(%rbx), %rsp ! level 0
movq %r13, %rsi
movl %r10d, %edx
rep stosl
andq $0, -424(%rbp)
movq %r12, %rdi
leaq -112(%rbp), %rax
movq $1, -432(%rbp)
pushq $16
popq %rcx
rep movsl ! fill in second argument - at %rsp - 64
pushq $16 ! again overwrite last 8 bytes of the
second argument
movq %rbx, %rdi
leaq -240(%rbp), %rsi
popq %rcx
movq %r12, %rsp ! level 64
movq %rbx, %rsp ! level 128
rep movsl ! fill in first argument
xchgq %rax, %rdi
call bar1
Ah, and it is sched2 pass which moves the movq %r12, %rsp and movq %rbx, %rsp
instructions before the second rep movsl.