void cpy3x3(double *restrict a, double *restrict b) {
  do {
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
    *b++ = *a++;
  } while (0);
}


x86 assembly (clang, -O0):
<cpy3x3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy3x3>:
movups (%rdi),%xmm0
movups %xmm0,(%rsi)
movups 0x10(%rdi),%xmm0
movups %xmm0,0x10(%rsi)
movups 0x20(%rdi),%xmm0
movups %xmm0,0x20(%rsi)
movups 0x30(%rdi),%xmm0
movups %xmm0,0x30(%rsi)
movsd  0x40(%rdi),%xmm0
movsd  %xmm0,0x40(%rsi)
ret

LLVM IR (-O0):
define void @cpy3x3(double* noalias %0, double* noalias %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
br label %5
5: ; preds = %2
%6 = load double*, double** %3
%7 = getelementptr inbounds double, double* %6, i32 1
store double* %7, double** %3
%8 = load double, double* %6
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i32 1
store double* %10, double** %4
store double %8, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i32 1
store double* %12, double** %3
%13 = load double, double* %11
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i32 1
store double* %15, double** %4
store double %13, double* %14
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i32 1
store double* %17, double** %3
%18 = load double, double* %16
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i32 1
store double* %20, double** %4
store double %18, double* %19
%21 = load double*, double** %3
%22 = getelementptr inbounds double, double* %21, i32 1
store double* %22, double** %3
%23 = load double, double* %21
%24 = load double*, double** %4
%25 = getelementptr inbounds double, double* %24, i32 1
store double* %25, double** %4
store double %23, double* %24
%26 = load double*, double** %3
%27 = getelementptr inbounds double, double* %26, i32 1
store double* %27, double** %3
%28 = load double, double* %26
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i32 1
store double* %30, double** %4
store double %28, double* %29
%31 = load double*, double** %3
%32 = getelementptr inbounds double, double* %31, i32 1
store double* %32, double** %3
%33 = load double, double* %31
%34 = load double*, double** %4
%35 = getelementptr inbounds double, double* %34, i32 1
store double* %35, double** %4
store double %33, double* %34
%36 = load double*, double** %3
%37 = getelementptr inbounds double, double* %36, i32 1
store double* %37, double** %3
%38 = load double, double* %36
%39 = load double*, double** %4
%40 = getelementptr inbounds double, double* %39, i32 1
store double* %40, double** %4
store double %38, double* %39
%41 = load double*, double** %3
%42 = getelementptr inbounds double, double* %41, i32 1
store double* %42, double** %3
%43 = load double, double* %41
%44 = load double*, double** %4
%45 = getelementptr inbounds double, double* %44, i32 1
store double* %45, double** %4
store double %43, double* %44
%46 = load double*, double** %3
%47 = getelementptr inbounds double, double* %46, i32 1
store double* %47, double** %3
%48 = load double, double* %46
%49 = load double*, double** %4
%50 = getelementptr inbounds double, double* %49, i32 1
store double* %50, double** %4
store double %48, double* %49
br label %51
51: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @cpy3x3(double* noalias nocapture %0, double* noalias nocapture writeonly %1) {
%3 = getelementptr inbounds double, double* %0, i64 2
%4 = bitcast double* %0 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = getelementptr inbounds double, double* %1, i64 2
%7 = bitcast double* %1 to <2 x double>*
store <2 x double> %5, <2 x double>* %7
%8 = getelementptr inbounds double, double* %0, i64 4
%9 = bitcast double* %3 to <2 x double>*
%10 = load <2 x double>, <2 x double>* %9
%11 = getelementptr inbounds double, double* %1, i64 4
%12 = bitcast double* %6 to <2 x double>*
store <2 x double> %10, <2 x double>* %12
%13 = getelementptr inbounds double, double* %0, i64 6
%14 = bitcast double* %8 to <2 x double>*
%15 = load <2 x double>, <2 x double>* %14
%16 = getelementptr inbounds double, double* %1, i64 6
%17 = bitcast double* %11 to <2 x double>*
store <2 x double> %15, <2 x double>* %17
%18 = getelementptr inbounds double, double* %0, i64 8
%19 = bitcast double* %13 to <2 x double>*
%20 = load <2 x double>, <2 x double>* %19
%21 = getelementptr inbounds double, double* %1, i64 8
%22 = bitcast double* %16 to <2 x double>*
store <2 x double> %20, <2 x double>* %22
%23 = load double, double* %18
store double %23, double* %21
ret void
}