double det3(double *A) {
  double r;
  r = (A[0] * A[4] * A[8] + A[2] * A[3] * A[7] + A[1] * A[5] * A[6]);
  r -= (A[2] * A[4] * A[6] + A[0] * A[5] * A[7] + A[1] * A[3] * A[8]);
  return (r);
}


x86 assembly (clang, -O0):
<det3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x38(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x38(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<det3>:
movsd  0x20(%rdi),%xmm0
unpcklpd %xmm0,%xmm0
movsd  (%rdi),%xmm2
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm3
movsd  0x18(%rdi),%xmm4
movapd %xmm2,%xmm5
unpcklpd %xmm3,%xmm5
mulpd  %xmm0,%xmm5
unpcklpd %xmm2,%xmm3
movsd  0x28(%rdi),%xmm2
movapd %xmm4,%xmm0
unpcklpd %xmm2,%xmm0
mulpd  %xmm3,%xmm0
movsd  0x38(%rdi),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm0,%xmm3
movsd  0x30(%rdi),%xmm0
movsd  0x40(%rdi),%xmm6
movapd %xmm6,%xmm7
unpcklpd %xmm0,%xmm7
mulpd  %xmm5,%xmm7
addpd  %xmm3,%xmm7
unpcklpd %xmm4,%xmm2
unpcklpd %xmm1,%xmm1
mulpd  %xmm2,%xmm1
unpcklpd %xmm6,%xmm0
mulpd  %xmm1,%xmm0
addpd  %xmm7,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @det3(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 4
%9 = load double, double* %8
%10 = fmul double %6, %9
%11 = load double*, double** %2
%12 = getelementptr inbounds double, double* %11, i64 8
%13 = load double, double* %12
%14 = load double*, double** %2
%15 = getelementptr inbounds double, double* %14, i64 2
%16 = load double, double* %15
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 3
%19 = load double, double* %18
%20 = fmul double %16, %19
%21 = load double*, double** %2
%22 = getelementptr inbounds double, double* %21, i64 7
%23 = load double, double* %22
%24 = fmul double %20, %23
%25 = call double @llvm.fmuladd.f64(double %10, double %13, double %24)
%26 = load double*, double** %2
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
%29 = load double*, double** %2
%30 = getelementptr inbounds double, double* %29, i64 5
%31 = load double, double* %30
%32 = fmul double %28, %31
%33 = load double*, double** %2
%34 = getelementptr inbounds double, double* %33, i64 6
%35 = load double, double* %34
%36 = call double @llvm.fmuladd.f64(double %32, double %35, double %25)
store double %36, double* %3
%37 = load double*, double** %2
%38 = getelementptr inbounds double, double* %37, i64 2
%39 = load double, double* %38
%40 = load double*, double** %2
%41 = getelementptr inbounds double, double* %40, i64 4
%42 = load double, double* %41
%43 = fmul double %39, %42
%44 = load double*, double** %2
%45 = getelementptr inbounds double, double* %44, i64 6
%46 = load double, double* %45
%47 = load double*, double** %2
%48 = getelementptr inbounds double, double* %47, i64 0
%49 = load double, double* %48
%50 = load double*, double** %2
%51 = getelementptr inbounds double, double* %50, i64 5
%52 = load double, double* %51
%53 = fmul double %49, %52
%54 = load double*, double** %2
%55 = getelementptr inbounds double, double* %54, i64 7
%56 = load double, double* %55
%57 = fmul double %53, %56
%58 = call double @llvm.fmuladd.f64(double %43, double %46, double %57)
%59 = load double*, double** %2
%60 = getelementptr inbounds double, double* %59, i64 1
%61 = load double, double* %60
%62 = load double*, double** %2
%63 = getelementptr inbounds double, double* %62, i64 3
%64 = load double, double* %63
%65 = fmul double %61, %64
%66 = load double*, double** %2
%67 = getelementptr inbounds double, double* %66, i64 8
%68 = load double, double* %67
%69 = call double @llvm.fmuladd.f64(double %65, double %68, double %58)
%70 = load double, double* %3
%71 = fsub double %70, %69
store double %71, double* %3
%72 = load double, double* %3
ret double %72
}

LLVM IR (-O2):
define double @det3(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 4
%4 = load double, double* %3
%5 = getelementptr inbounds double, double* %0, i64 8
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 3
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %0, i64 7
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %0, i64 1
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %0, i64 5
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %0, i64 6
%18 = load double, double* %17
%19 = insertelement <2 x double> poison, double %4, i64 0
%20 = shufflevector <2 x double> %19, <2 x double> poison, <2 x i32> zeroinitializer
%21 = insertelement <2 x double> poison, double %2, i64 0
%22 = insertelement <2 x double> %21, double %8, i64 1
%23 = fmul <2 x double> %20, %22
%24 = insertelement <2 x double> poison, double %8, i64 0
%25 = insertelement <2 x double> %24, double %2, i64 1
%26 = insertelement <2 x double> poison, double %10, i64 0
%27 = insertelement <2 x double> %26, double %16, i64 1
%28 = fmul <2 x double> %25, %27
%29 = insertelement <2 x double> poison, double %12, i64 0
%30 = shufflevector <2 x double> %29, <2 x double> poison, <2 x i32> zeroinitializer
%31 = fmul <2 x double> %28, %30
%32 = insertelement <2 x double> poison, double %6, i64 0
%33 = insertelement <2 x double> %32, double %18, i64 1
%34 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %23, <2 x double> %33, <2 x double> %31)
%35 = insertelement <2 x double> poison, double %16, i64 0
%36 = insertelement <2 x double> %35, double %10, i64 1
%37 = insertelement <2 x double> poison, double %14, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = fmul <2 x double> %36, %38
%40 = insertelement <2 x double> poison, double %18, i64 0
%41 = insertelement <2 x double> %40, double %6, i64 1
%42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %41, <2 x double> %34)
%43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%44 = fsub <2 x double> %42, %43
%45 = extractelement <2 x double> %44, i64 0
ret double %45
}