void divrow(double m[3], double a[3], double d) {
  m[0] /= d, m[1] /= d, m[2] /= d;
  a[0] /= d, a[1] /= d, a[2] /= d;
}


x86 assembly (clang, -O0):
<divrow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x18(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x18(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<divrow>:
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
divpd  %xmm2,%xmm1
movupd %xmm1,(%rdi)
movsd  0x10(%rdi),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rdi)
movupd (%rsi),%xmm1
divpd  %xmm2,%xmm1
movupd %xmm1,(%rsi)
movsd  0x10(%rsi),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsi)
ret

LLVM IR (-O0):
define void @divrow(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fdiv double %10, %7
store double %11, double* %9
%12 = load double, double* %6
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = fdiv double %15, %12
store double %16, double* %14
%17 = load double, double* %6
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 2
%20 = load double, double* %19
%21 = fdiv double %20, %17
store double %21, double* %19
%22 = load double, double* %6
%23 = load double*, double** %5
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = fdiv double %25, %22
store double %26, double* %24
%27 = load double, double* %6
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 1
%30 = load double, double* %29
%31 = fdiv double %30, %27
store double %31, double* %29
%32 = load double, double* %6
%33 = load double*, double** %5
%34 = getelementptr inbounds double, double* %33, i64 2
%35 = load double, double* %34
%36 = fdiv double %35, %32
store double %36, double* %34
ret void
}

LLVM IR (-O2):
define void @divrow(double* nocapture %0, double* nocapture %1, double %2) {
%4 = bitcast double* %0 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = insertelement <2 x double> poison, double %2, i64 0
%7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> zeroinitializer
%8 = fdiv <2 x double> %5, %7
%9 = bitcast double* %0 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
%10 = getelementptr inbounds double, double* %0, i64 2
%11 = load double, double* %10
%12 = fdiv double %11, %2
store double %12, double* %10
%13 = bitcast double* %1 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = fdiv <2 x double> %14, %7
%16 = bitcast double* %1 to <2 x double>*
store <2 x double> %15, <2 x double>* %16
%17 = getelementptr inbounds double, double* %1, i64 2
%18 = load double, double* %17
%19 = fdiv double %18, %2
store double %19, double* %17
ret void
}