void sse_test(void) {
  char buf0[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
  char buf1[] = {16, 17, 18, 19, 20, 21, 22, 23,
                 24, 25, 26, 27, 28, 29, 30, 31};
  char buf2[] = {32, 33, 34, 35, 36, 37, 38, 39,
                 40, 41, 42, 43, 44, 45, 46, 47};
  asm("movupd %0, %%xmm0" : "=m"(buf0));
  asm("movupd %0, %%xmm1" : "=m"(buf1));
  asm("movupd %0, %%xmm2" : "=m"(buf2));
  asm("addpd %xmm0, %xmm1");
  asm("addps %xmm1, %xmm2");
  asm("addsd %xmm2, %xmm1");
  asm("addss %xmm1, %xmm0");
  asm("addsubpd %xmm0, %xmm2");
  asm("addsubps %xmm0, %xmm1");
  asm("andpd %xmm1, %xmm2");
  asm("andps %xmm2, %xmm1");
  asm("cmppd $3, %xmm0, %xmm1");
  asm("cmpps $4, %xmm1, %xmm2");
  asm("cmpsd $5, %xmm2, %xmm1");
  asm("cmpss $6, %xmm1, %xmm0");
  asm("comisd %xmm0, %xmm2");
  asm("comiss %xmm0, %xmm1");
  asm("cvtdq2pd %xmm1, %xmm2");
  asm("cvtdq2ps %xmm2, %xmm1");
  asm("cvtpd2dq %xmm1, %xmm0");
  asm("cvtpd2ps %xmm0, %xmm1");
  asm("divpd %xmm1, %xmm2");
  asm("divps %xmm2, %xmm1");
  asm("divsd %xmm1, %xmm0");
  asm("divss %xmm0, %xmm2");
  asm("mulpd %xmm0, %xmm1");
  asm("mulps %xmm1, %xmm2");
  asm("mulsd %xmm2, %xmm1");
  asm("mulss %xmm1, %xmm0");
  asm("orpd %xmm2, %xmm0");
  asm("orps %xmm0, %xmm1");
  asm("packsswb %xmm0, %xmm2");
  asm("packssdw %xmm0, %xmm1");
  asm("ucomisd %xmm1, %xmm2");
  asm("ucomiss %xmm2, %xmm1");
  asm("unpckhpd %xmm1, %xmm0");
  asm("unpckhps %xmm2, %xmm0");
  asm("xorpd %xmm0, %xmm1");
  asm("xorps %xmm1, %xmm2");
}


x86 assembly (clang, -O0):
<sse_test>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeec(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x28(%rbp)
movupd -0x10(%rbp),%xmm0
movupd -0x20(%rbp),%xmm1
movupd -0x30(%rbp),%xmm2
addpd  %xmm0,%xmm1
addps  %xmm1,%xmm2
addsd  %xmm2,%xmm1
addss  %xmm1,%xmm0
addsubpd %xmm0,%xmm2
addsubps %xmm0,%xmm1
andpd  %xmm1,%xmm2
andps  %xmm2,%xmm1
cmpunordpd %xmm0,%xmm1
cmpneqps %xmm1,%xmm2
cmpnltsd %xmm2,%xmm1
cmpnless %xmm1,%xmm0
comisd %xmm0,%xmm2
comiss %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm2
cvtdq2ps %xmm2,%xmm1
cvtpd2dq %xmm1,%xmm0
cvtpd2ps %xmm0,%xmm1
divpd  %xmm1,%xmm2
divps  %xmm2,%xmm1
divsd  %xmm1,%xmm0
divss  %xmm0,%xmm2
mulpd  %xmm0,%xmm1
mulps  %xmm1,%xmm2
mulsd  %xmm2,%xmm1
mulss  %xmm1,%xmm0
orpd   %xmm2,%xmm0
orps   %xmm0,%xmm1
packsswb %xmm0,%xmm2
packssdw %xmm0,%xmm1
ucomisd %xmm1,%xmm2
ucomiss %xmm2,%xmm1
unpckhpd %xmm1,%xmm0
unpckhps %xmm2,%xmm0
xorpd  %xmm0,%xmm1
xorps  %xmm1,%xmm2
pop    %rbp
ret

x86 assembly (clang, -O2):
<sse_test>:
movaps 0xef9(%rip),%xmm0
movaps %xmm0,-0x18(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,-0x28(%rsp)
movaps 0xf01(%rip),%xmm0
movaps %xmm0,-0x38(%rsp)
movupd -0x18(%rsp),%xmm0
movupd -0x28(%rsp),%xmm1
movupd -0x38(%rsp),%xmm2
addpd  %xmm0,%xmm1
addps  %xmm1,%xmm2
addsd  %xmm2,%xmm1
addss  %xmm1,%xmm0
addsubpd %xmm0,%xmm2
addsubps %xmm0,%xmm1
andpd  %xmm1,%xmm2
andps  %xmm2,%xmm1
cmpunordpd %xmm0,%xmm1
cmpneqps %xmm1,%xmm2
cmpnltsd %xmm2,%xmm1
cmpnless %xmm1,%xmm0
comisd %xmm0,%xmm2
comiss %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm2
cvtdq2ps %xmm2,%xmm1
cvtpd2dq %xmm1,%xmm0
cvtpd2ps %xmm0,%xmm1
divpd  %xmm1,%xmm2
divps  %xmm2,%xmm1
divsd  %xmm1,%xmm0
divss  %xmm0,%xmm2
mulpd  %xmm0,%xmm1
mulps  %xmm1,%xmm2
mulsd  %xmm2,%xmm1
mulss  %xmm1,%xmm0
orpd   %xmm2,%xmm0
orps   %xmm0,%xmm1
packsswb %xmm0,%xmm2
packssdw %xmm0,%xmm1
ucomisd %xmm1,%xmm2
ucomiss %xmm2,%xmm1
unpckhpd %xmm1,%xmm0
unpckhps %xmm2,%xmm0
xorpd  %xmm0,%xmm1
xorps  %xmm1,%xmm2
ret

LLVM IR (-O0):
@__const.sse_test.buf0 = [16 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.sse_test.buf1 = [16 x i8] c"\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.sse_test.buf2 = [16 x i8] c" !\22#$%&'()*+,-./"
define void @sse_test() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = bitcast [16 x i8]* %1 to i8*
%5 = bitcast [16 x i8]* %2 to i8*
%6 = bitcast [16 x i8]* %3 to i8*
ret void
}

LLVM IR (-O2):
@__const.sse_test.buf0 = [16 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.sse_test.buf1 = [16 x i8] c"\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.sse_test.buf2 = [16 x i8] c" !\22#$%&'()*+,-./"
define void @sse_test() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
ret void
}