void Vec2F_Copy3Gather(float *a0, float *a1, float *a2, float *b) {
  b[0] = a0[0];
  b[1] = a0[1];
  b[2] = a1[0];
  b[3] = a1[1];
  b[4] = a2[0];
  b[5] = a2[1];
}


x86 assembly (clang, -O0):
<Vec2F_Copy3Gather>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec2F_Copy3Gather>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rcx)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rcx)
movss  (%rsi),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0xc(%rcx)
movss  (%rdx),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x4(%rdx),%xmm0
movss  %xmm0,0x14(%rcx)
ret

LLVM IR (-O0):
define void @Vec2F_Copy3Gather(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float*, float** %5
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = load float*, float** %8
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %5
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %8
%18 = getelementptr inbounds float, float* %17, i64 1
store float %16, float* %18
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 0
%21 = load float, float* %20
%22 = load float*, float** %8
%23 = getelementptr inbounds float, float* %22, i64 2
store float %21, float* %23
%24 = load float*, float** %6
%25 = getelementptr inbounds float, float* %24, i64 1
%26 = load float, float* %25
%27 = load float*, float** %8
%28 = getelementptr inbounds float, float* %27, i64 3
store float %26, float* %28
%29 = load float*, float** %7
%30 = getelementptr inbounds float, float* %29, i64 0
%31 = load float, float* %30
%32 = load float*, float** %8
%33 = getelementptr inbounds float, float* %32, i64 4
store float %31, float* %33
%34 = load float*, float** %7
%35 = getelementptr inbounds float, float* %34, i64 1
%36 = load float, float* %35
%37 = load float*, float** %8
%38 = getelementptr inbounds float, float* %37, i64 5
store float %36, float* %38
ret void
}

LLVM IR (-O2):
define void @Vec2F_Copy3Gather(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture writeonly %3) {
%5 = load float, float* %0
store float %5, float* %3
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %3, i64 1
store float %7, float* %8
%9 = load float, float* %1
%10 = getelementptr inbounds float, float* %3, i64 2
store float %9, float* %10
%11 = getelementptr inbounds float, float* %1, i64 1
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %3, i64 3
store float %12, float* %13
%14 = load float, float* %2
%15 = getelementptr inbounds float, float* %3, i64 4
store float %14, float* %15
%16 = getelementptr inbounds float, float* %2, i64 1
%17 = load float, float* %16
%18 = getelementptr inbounds float, float* %3, i64 5
store float %17, float* %18
ret void
}