zansari added a comment. Depending on the cost of imull, you can avoid it with: movzbl 4(%esp), %ecx movl %ecx, %eax shll $8, %eax orl %eax, %ecx movl %ecx, %edx shll $16, %edx orl %edx, %ecx movd %ecx, %xmm0 pshufd $0, %xmm0, %xmm1 http://reviews.llvm.org/D18566