https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96930
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I can't reproduce that. I get: movl %edi, %eax movl %esi, %ecx shrl %cl, %eax ret for that function, and LLVM emits the same code with the first two insns swapped. Only in baz above I get: movl %edi, %eax movl %esi, %ecx shrq %cl, %rax ret which is the 64-bit shift instead (but I doubt on x86_64 there is any difference except the 1 byte in code size).