void __attribute__((no, noclone))
vec_slp_double(double *restrict a, double *restrict b) {
  for (int i = 0; i < (19 * 2); ++i) {
    a[i] += 1;
    b[i * 4] += 2;
    b[i * 4 + 1] += 3;
    b[i * 4 + 2] += 4;
    b[i * 4 + 3] += 5;
  }
}


x86 assembly (clang, -O0):
<vec_slp_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x26,-0x14(%rbp)
jge    11ca <vec_slp_double+0xca>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xef3(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xecc(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xea2(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xe78(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  0xe4e(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <vec_slp_double+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec_slp_double>:
xor    %eax,%eax
movapd 0xef5(%rip),%xmm8
movapd 0xefc(%rip),%xmm9
movapd 0xf03(%rip),%xmm10
movapd 0xf0b(%rip),%xmm3
movapd 0xf13(%rip),%xmm4
nopl   (%rax)
movupd (%rdi,%rax,1),%xmm5
addpd  %xmm8,%xmm5
movupd %xmm5,(%rdi,%rax,1)
movupd (%rsi,%rax,4),%xmm5
movupd 0x10(%rsi,%rax,4),%xmm6
movupd 0x20(%rsi,%rax,4),%xmm7
movupd 0x30(%rsi,%rax,4),%xmm0
movapd %xmm5,%xmm1
unpcklpd %xmm7,%xmm1
unpckhpd %xmm7,%xmm5
movapd %xmm6,%xmm7
unpcklpd %xmm0,%xmm7
unpckhpd %xmm0,%xmm6
addpd  %xmm9,%xmm1
addpd  %xmm10,%xmm5
addpd  %xmm3,%xmm7
addpd  %xmm4,%xmm6
movapd %xmm7,%xmm0
unpcklpd %xmm6,%xmm0
movapd %xmm1,%xmm2
unpcklpd %xmm5,%xmm2
movhlps %xmm7,%xmm6
movhlps %xmm1,%xmm5
movups %xmm5,0x20(%rsi,%rax,4)
movups %xmm6,0x30(%rsi,%rax,4)
movupd %xmm2,(%rsi,%rax,4)
movupd %xmm0,0x10(%rsi,%rax,4)
add    $0x10,%rax
cmp    $0x130,%rax
jne    1130 <vec_slp_double+0x30>
ret

LLVM IR (-O0):
define void @vec_slp_double(double* noalias %0, double* noalias %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %47, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 38
br i1 %8, label %9, label %50
9: ; preds = %6
%10 = load double*, double** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %10, i64 %12
%14 = load double, double* %13
%15 = fadd double %14, 1.000000e+00
store double %15, double* %13
%16 = load double*, double** %4
%17 = load i32, i32* %5
%18 = mul nsw i32 %17, 4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %16, i64 %19
%21 = load double, double* %20
%22 = fadd double %21, 2.000000e+00
store double %22, double* %20
%23 = load double*, double** %4
%24 = load i32, i32* %5
%25 = mul nsw i32 %24, 4
%26 = add nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %23, i64 %27
%29 = load double, double* %28
%30 = fadd double %29, 3.000000e+00
store double %30, double* %28
%31 = load double*, double** %4
%32 = load i32, i32* %5
%33 = mul nsw i32 %32, 4
%34 = add nsw i32 %33, 2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %31, i64 %35
%37 = load double, double* %36
%38 = fadd double %37, 4.000000e+00
store double %38, double* %36
%39 = load double*, double** %4
%40 = load i32, i32* %5
%41 = mul nsw i32 %40, 4
%42 = add nsw i32 %41, 3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %39, i64 %43
%45 = load double, double* %44
%46 = fadd double %45, 5.000000e+00
store double %46, double* %44
br label %47
47: ; preds = %9
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %6
50: ; preds = %6
ret void
}

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