void __attribute__((no, noclone))
df_g2(double *__restrict a, double *__restrict b, double *__restrict c) {
  for (int i = 0; i < 1024; ++i) {
    c[i * 2] = a[i];
    c[i * 2 + 1] = b[i];
  }
}


x86 assembly (clang, -O0):
<df_g2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x400,-0x1c(%rbp)
jge    1173 <df_g2+0x73>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <df_g2+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_g2>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups (%rdi,%rax,1),%xmm0
movups (%rsi,%rax,1),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movups %xmm0,0x10(%rdx,%rax,2)
movups %xmm2,(%rdx,%rax,2)
movups 0x10(%rdi,%rax,1),%xmm0
movups 0x10(%rsi,%rax,1),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movups %xmm0,0x30(%rdx,%rax,2)
movups %xmm2,0x20(%rdx,%rax,2)
add    $0x20,%rax
cmp    $0x2000,%rax
jne    1110 <df_g2+0x10>
ret

LLVM IR (-O0):
define void @df_g2(double* noalias %0, double* noalias %1, double* noalias %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %7
br label %8
8: ; preds = %33, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 1024
br i1 %10, label %11, label %36
11: ; preds = %8
%12 = load double*, double** %4
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = load double*, double** %6
%18 = load i32, i32* %7
%19 = mul nsw i32 %18, 2
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %17, i64 %20
store double %16, double* %21
%22 = load double*, double** %5
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double, double* %25
%27 = load double*, double** %6
%28 = load i32, i32* %7
%29 = mul nsw i32 %28, 2
%30 = add nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %27, i64 %31
store double %26, double* %32
br label %33
33: ; preds = %11
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %8
36: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @df_g2(double* noalias nocapture %0, double* noalias nocapture %1, double* noalias nocapture writeonly %2) {
%4 = getelementptr inbounds double, double* %2, i64 -1
%5 = getelementptr inbounds double, double* %2, i64 -1
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ 0, %3 ], [ %31, %6 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = bitcast double* %8 to <2 x double>*
%10 = load <2 x double>, <2 x double>* %9
%11 = shl nuw nsw i64 %7, 1
%12 = getelementptr inbounds double, double* %1, i64 %7
%13 = bitcast double* %12 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = or i64 %11, 1
%16 = getelementptr inbounds double, double* %4, i64 %15
%17 = bitcast double* %16 to <4 x double>*
%18 = shufflevector <2 x double> %10, <2 x double> %14, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
store <4 x double> %18, <4 x double>* %17
%19 = or i64 %7, 2
%20 = getelementptr inbounds double, double* %0, i64 %19
%21 = bitcast double* %20 to <2 x double>*
%22 = load <2 x double>, <2 x double>* %21
%23 = shl nuw nsw i64 %19, 1
%24 = getelementptr inbounds double, double* %1, i64 %19
%25 = bitcast double* %24 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = or i64 %23, 1
%28 = getelementptr inbounds double, double* %5, i64 %27
%29 = bitcast double* %28 to <4 x double>*
%30 = shufflevector <2 x double> %22, <2 x double> %26, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
store <4 x double> %30, <4 x double>* %29
%31 = add nuw nsw i64 %7, 4
%32 = icmp eq i64 %31, 1024
br i1 %32, label %33, label %6
33: ; preds = %6
ret void
}