void corner_dtrmm_nt_u_4x1_lib4(double *A, double *B, double *C) {
  const int bs = 4;
  const int lda = bs;
  const int ldc = 4;
  double a_0, a_1, a_2, a_3, b_0, b_1, b_2, b_3, c_00 = 0, c_10 = 0, c_20 = 0,
                                                 c_30 = 0;
  a_0 = A[0 + lda * 0];
  a_1 = A[1 + lda * 0];
  a_2 = A[2 + lda * 0];
  a_3 = A[3 + lda * 0];
  b_0 = B[0 + lda * 0];
  c_00 += a_0 * b_0;
  c_10 += a_1 * b_0;
  c_20 += a_2 * b_0;
  c_30 += a_3 * b_0;
  C[0 + ldc * 0] = c_00;
  C[1 + ldc * 0] = c_10;
  C[2 + ldc * 0] = c_20;
  C[3 + ldc * 0] = c_30;
}


x86 assembly (clang, -O0):
<corner_dtrmm_nt_u_4x1_lib4>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x4,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_dtrmm_nt_u_4x1_lib4>:
movupd (%rdi),%xmm0
movupd 0x10(%rdi),%xmm1
movsd  (%rsi),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm2,%xmm0
xorpd  %xmm3,%xmm3
addpd  %xmm3,%xmm0
mulpd  %xmm1,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm0,(%rdx)
movupd %xmm2,0x10(%rdx)
ret

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

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