void mtvm3x3(double *restrict a, double *restrict v, double *restrict r) {
  double *pv = v;
  *r -= *a++ * *pv++;
  *r -= *a++ * *pv++;
  *r++ -= *a++ * *pv;
  pv = v;
  *r -= *a++ * *pv++;
  *r -= *a++ * *pv++;
  *r++ -= *a++ * *pv;
  pv = v;
  *r -= *a++ * *pv++;
  *r -= *a++ * *pv++;
  *r -= *a * *pv;
}


x86 assembly (clang, -O0):
<mtvm3x3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtvm3x3>:
movsd  (%rsi),%xmm2
movsd  0x8(%rsi),%xmm1
movsd  0x10(%rsi),%xmm0
movupd (%rdx),%xmm3
movsd  (%rdi),%xmm4
movsd  0x8(%rdi),%xmm5
movsd  0x10(%rdi),%xmm6
movhpd 0x18(%rdi),%xmm4
movapd %xmm2,%xmm7
unpcklpd %xmm2,%xmm7
mulpd  %xmm4,%xmm7
subpd  %xmm7,%xmm3
movhpd 0x20(%rdi),%xmm5
movapd %xmm1,%xmm4
unpcklpd %xmm1,%xmm4
mulpd  %xmm5,%xmm4
movhpd 0x28(%rdi),%xmm6
subpd  %xmm4,%xmm3
movapd %xmm0,%xmm4
unpcklpd %xmm0,%xmm4
mulpd  %xmm6,%xmm4
subpd  %xmm4,%xmm3
movupd %xmm3,(%rdx)
movsd  0x10(%rdx),%xmm3
mulsd  0x30(%rdi),%xmm2
subsd  %xmm2,%xmm3
mulsd  0x38(%rdi),%xmm1
subsd  %xmm1,%xmm3
mulsd  0x40(%rdi),%xmm0
subsd  %xmm0,%xmm3
movsd  %xmm3,0x10(%rdx)
ret

LLVM IR (-O0):
define void @mtvm3x3(double* noalias %0, double* noalias %1, double* noalias %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %5
store double* %8, double** %7
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i32 1
store double* %10, double** %4
%11 = load double, double* %9
%12 = load double*, double** %7
%13 = getelementptr inbounds double, double* %12, i32 1
store double* %13, double** %7
%14 = load double, double* %12
%15 = load double*, double** %6
%16 = load double, double* %15
%17 = fneg double %11
%18 = call double @llvm.fmuladd.f64(double %17, double %14, double %16)
store double %18, double* %15
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i32 1
store double* %20, double** %4
%21 = load double, double* %19
%22 = load double*, double** %7
%23 = getelementptr inbounds double, double* %22, i32 1
store double* %23, double** %7
%24 = load double, double* %22
%25 = load double*, double** %6
%26 = load double, double* %25
%27 = fneg double %21
%28 = call double @llvm.fmuladd.f64(double %27, double %24, double %26)
store double %28, double* %25
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i32 1
store double* %30, double** %4
%31 = load double, double* %29
%32 = load double*, double** %7
%33 = load double, double* %32
%34 = load double*, double** %6
%35 = getelementptr inbounds double, double* %34, i32 1
store double* %35, double** %6
%36 = load double, double* %34
%37 = fneg double %31
%38 = call double @llvm.fmuladd.f64(double %37, double %33, double %36)
store double %38, double* %34
%39 = load double*, double** %5
store double* %39, double** %7
%40 = load double*, double** %4
%41 = getelementptr inbounds double, double* %40, i32 1
store double* %41, double** %4
%42 = load double, double* %40
%43 = load double*, double** %7
%44 = getelementptr inbounds double, double* %43, i32 1
store double* %44, double** %7
%45 = load double, double* %43
%46 = load double*, double** %6
%47 = load double, double* %46
%48 = fneg double %42
%49 = call double @llvm.fmuladd.f64(double %48, double %45, double %47)
store double %49, double* %46
%50 = load double*, double** %4
%51 = getelementptr inbounds double, double* %50, i32 1
store double* %51, double** %4
%52 = load double, double* %50
%53 = load double*, double** %7
%54 = getelementptr inbounds double, double* %53, i32 1
store double* %54, double** %7
%55 = load double, double* %53
%56 = load double*, double** %6
%57 = load double, double* %56
%58 = fneg double %52
%59 = call double @llvm.fmuladd.f64(double %58, double %55, double %57)
store double %59, double* %56
%60 = load double*, double** %4
%61 = getelementptr inbounds double, double* %60, i32 1
store double* %61, double** %4
%62 = load double, double* %60
%63 = load double*, double** %7
%64 = load double, double* %63
%65 = load double*, double** %6
%66 = getelementptr inbounds double, double* %65, i32 1
store double* %66, double** %6
%67 = load double, double* %65
%68 = fneg double %62
%69 = call double @llvm.fmuladd.f64(double %68, double %64, double %67)
store double %69, double* %65
%70 = load double*, double** %5
store double* %70, double** %7
%71 = load double*, double** %4
%72 = getelementptr inbounds double, double* %71, i32 1
store double* %72, double** %4
%73 = load double, double* %71
%74 = load double*, double** %7
%75 = getelementptr inbounds double, double* %74, i32 1
store double* %75, double** %7
%76 = load double, double* %74
%77 = load double*, double** %6
%78 = load double, double* %77
%79 = fneg double %73
%80 = call double @llvm.fmuladd.f64(double %79, double %76, double %78)
store double %80, double* %77
%81 = load double*, double** %4
%82 = getelementptr inbounds double, double* %81, i32 1
store double* %82, double** %4
%83 = load double, double* %81
%84 = load double*, double** %7
%85 = getelementptr inbounds double, double* %84, i32 1
store double* %85, double** %7
%86 = load double, double* %84
%87 = load double*, double** %6
%88 = load double, double* %87
%89 = fneg double %83
%90 = call double @llvm.fmuladd.f64(double %89, double %86, double %88)
store double %90, double* %87
%91 = load double*, double** %4
%92 = load double, double* %91
%93 = load double*, double** %7
%94 = load double, double* %93
%95 = load double*, double** %6
%96 = load double, double* %95
%97 = fneg double %92
%98 = call double @llvm.fmuladd.f64(double %97, double %94, double %96)
store double %98, double* %95
ret void
}

LLVM IR (-O2):
define void @mtvm3x3(double* noalias nocapture %0, double* noalias nocapture %1, double* noalias nocapture %2) {
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %1
%8 = getelementptr inbounds double, double* %0, i64 2
%9 = load double, double* %4
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %6
%12 = getelementptr inbounds double, double* %0, i64 3
%13 = load double, double* %8
%14 = load double, double* %10
%15 = getelementptr inbounds double, double* %0, i64 4
%16 = load double, double* %12
%17 = bitcast double* %2 to <2 x double>*
%18 = load <2 x double>, <2 x double>* %17
%19 = insertelement <2 x double> poison, double %5, i64 0
%20 = insertelement <2 x double> %19, double %16, i64 1
%21 = fneg <2 x double> %20
%22 = insertelement <2 x double> poison, double %7, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
%24 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> %23, <2 x double> %18)
%25 = getelementptr inbounds double, double* %0, i64 5
%26 = load double, double* %15
%27 = insertelement <2 x double> poison, double %9, i64 0
%28 = insertelement <2 x double> %27, double %26, i64 1
%29 = fneg <2 x double> %28
%30 = insertelement <2 x double> poison, double %11, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> %31, <2 x double> %24)
%33 = getelementptr inbounds double, double* %0, i64 6
%34 = load double, double* %25
%35 = getelementptr inbounds double, double* %2, i64 2
%36 = insertelement <2 x double> poison, double %13, i64 0
%37 = insertelement <2 x double> %36, double %34, i64 1
%38 = fneg <2 x double> %37
%39 = insertelement <2 x double> poison, double %14, i64 0
%40 = shufflevector <2 x double> %39, <2 x double> poison, <2 x i32> zeroinitializer
%41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %38, <2 x double> %40, <2 x double> %32)
%42 = bitcast double* %2 to <2 x double>*
store <2 x double> %41, <2 x double>* %42
%43 = getelementptr inbounds double, double* %0, i64 7
%44 = load double, double* %33
%45 = load double, double* %35
%46 = fneg double %44
%47 = tail call double @llvm.fmuladd.f64(double %46, double %7, double %45)
%48 = getelementptr inbounds double, double* %0, i64 8
%49 = load double, double* %43
%50 = fneg double %49
%51 = tail call double @llvm.fmuladd.f64(double %50, double %11, double %47)
%52 = load double, double* %48
%53 = fneg double %52
%54 = tail call double @llvm.fmuladd.f64(double %53, double %14, double %51)
store double %54, double* %35
ret void
}