void __attribute__((no, noclone)) test_double(double *a, double *b) {
  for (int i = 0; i < 200; i += 2) {
    a[i + 0] = b[i + 0] + 2;
    a[i + 1] = b[i + 1] + 3;
  }
}


x86 assembly (clang, -O0):
<test_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xc8,-0x14(%rbp)
jge    1186 <test_double+0x86>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  0xed3(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xe9f(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_double+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_double>:
lea    0x640(%rsi),%rax
cmp    %rdi,%rax
jbe    1181 <test_double+0x81>
lea    0x640(%rdi),%rax
cmp    %rsi,%rax
jbe    1181 <test_double+0x81>
mov    $0xfffffffffffffffe,%rax
movsd  0xef9(%rip),%xmm0
movsd  0xef9(%rip),%xmm1
nop
movsd  0x10(%rsi,%rax,8),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rdi,%rax,8)
movsd  0x18(%rsi,%rax,8),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x18(%rdi,%rax,8)
movsd  0x20(%rsi,%rax,8),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x20(%rdi,%rax,8)
movsd  0x28(%rsi,%rax,8),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x28(%rdi,%rax,8)
add    $0x4,%rax
cmp    $0xc6,%rax
jb     1130 <test_double+0x30>
jmp    1216 <test_double+0x116>
mov    $0x20,%eax
movapd 0xe72(%rip),%xmm0
movapd 0xe7a(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
movupd -0x20(%rsi,%rax,1),%xmm2
movupd -0x10(%rsi,%rax,1),%xmm3
movapd %xmm2,%xmm4
unpcklpd %xmm3,%xmm4
unpckhpd %xmm3,%xmm2
addpd  %xmm0,%xmm4
addpd  %xmm1,%xmm2
movapd %xmm4,%xmm3
unpcklpd %xmm2,%xmm3
movhlps %xmm4,%xmm2
movups %xmm2,-0x10(%rdi,%rax,1)
movupd %xmm3,-0x20(%rdi,%rax,1)
movupd (%rsi,%rax,1),%xmm2
movupd 0x10(%rsi,%rax,1),%xmm3
movapd %xmm2,%xmm4
unpcklpd %xmm3,%xmm4
unpckhpd %xmm3,%xmm2
addpd  %xmm0,%xmm4
addpd  %xmm1,%xmm2
movapd %xmm4,%xmm3
unpcklpd %xmm2,%xmm3
movhlps %xmm4,%xmm2
movups %xmm2,0x10(%rdi,%rax,1)
movupd %xmm3,(%rdi,%rax,1)
add    $0x40,%rax
cmp    $0x660,%rax
jne    11a0 <test_double+0xa0>
ret

LLVM IR (-O0):
define void @test_double(double* %0, double* %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 = %34, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 200
br i1 %8, label %9, label %37
9: ; preds = %6
%10 = load double*, double** %4
%11 = load i32, i32* %5
%12 = add nsw i32 %11, 0
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %10, i64 %13
%15 = load double, double* %14
%16 = fadd double %15, 2.000000e+00
%17 = load double*, double** %3
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 0
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %17, i64 %20
store double %16, double* %21
%22 = load double*, double** %4
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %22, i64 %25
%27 = load double, double* %26
%28 = fadd double %27, 3.000000e+00
%29 = load double*, double** %3
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %29, i64 %32
store double %28, double* %33
br label %34
34: ; preds = %9
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 2
store i32 %36, i32* %5
br label %6
37: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @test_double(double* nocapture writeonly %0, double* nocapture %1) {
%3 = getelementptr double, double* %0, i64 200
%4 = getelementptr double, double* %1, i64 200
%5 = icmp ugt double* %4, %0
%6 = icmp ugt double* %3, %1
%7 = and i1 %5, %6
br i1 %7, label %41, label %8
8: ; preds = %2
%9 = getelementptr inbounds double, double* %0, i64 -1
%10 = getelementptr inbounds double, double* %0, i64 -1
br label %11
11: ; preds = %11, %8
%12 = phi i64 [ 0, %8 ], [ %38, %11 ]
%13 = shl nuw i64 %12, 1
%14 = getelementptr inbounds double, double* %1, i64 %13
%15 = bitcast double* %14 to <4 x double>*
%16 = load <4 x double>, <4 x double>* %15
%17 = shufflevector <4 x double> %16, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%18 = shufflevector <4 x double> %16, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%19 = fadd <2 x double> %17, <double 2.000000e+00, double 2.000000e+00>
%20 = or i64 %13, 1
%21 = fadd <2 x double> %18, <double 3.000000e+00, double 3.000000e+00>
%22 = getelementptr inbounds double, double* %9, i64 %20
%23 = bitcast double* %22 to <4 x double>*
%24 = shufflevector <2 x double> %19, <2 x double> %21, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
store <4 x double> %24, <4 x double>* %23
%25 = shl nuw i64 %12, 1
%26 = or i64 %25, 4
%27 = getelementptr inbounds double, double* %1, i64 %26
%28 = bitcast double* %27 to <4 x double>*
%29 = load <4 x double>, <4 x double>* %28
%30 = shufflevector <4 x double> %29, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%31 = shufflevector <4 x double> %29, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%32 = fadd <2 x double> %30, <double 2.000000e+00, double 2.000000e+00>
%33 = or i64 %25, 5
%34 = fadd <2 x double> %31, <double 3.000000e+00, double 3.000000e+00>
%35 = getelementptr inbounds double, double* %10, i64 %33
%36 = bitcast double* %35 to <4 x double>*
%37 = shufflevector <2 x double> %32, <2 x double> %34, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
store <4 x double> %37, <4 x double>* %36
%38 = add nuw nsw i64 %12, 4
%39 = icmp eq i64 %38, 100
br i1 %39, label %40, label %11
40: ; preds = %11, %41
ret void
41: ; preds = %2, %41
%42 = phi i64 [ %62, %41 ], [ 0, %2 ]
%43 = getelementptr inbounds double, double* %1, i64 %42
%44 = load double, double* %43
%45 = fadd double %44, 2.000000e+00
%46 = getelementptr inbounds double, double* %0, i64 %42
store double %45, double* %46
%47 = or i64 %42, 1
%48 = getelementptr inbounds double, double* %1, i64 %47
%49 = load double, double* %48
%50 = fadd double %49, 3.000000e+00
%51 = getelementptr inbounds double, double* %0, i64 %47
store double %50, double* %51
%52 = or i64 %42, 2
%53 = getelementptr inbounds double, double* %1, i64 %52
%54 = load double, double* %53
%55 = fadd double %54, 2.000000e+00
%56 = getelementptr inbounds double, double* %0, i64 %52
store double %55, double* %56
%57 = or i64 %42, 3
%58 = getelementptr inbounds double, double* %1, i64 %57
%59 = load double, double* %58
%60 = fadd double %59, 3.000000e+00
%61 = getelementptr inbounds double, double* %0, i64 %57
store double %60, double* %61
%62 = add nuw nsw i64 %42, 4
%63 = icmp ult i64 %52, 198
br i1 %63, label %41, label %40
}