void kernel_dtrmm_nt_l_2x2_lib4(int kmax, double *A, double *B, double *D) {
  const int lda = 4;
  const int ldc = 4;
  int k;
  double a_0, a_1, b_0, b_1, c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0;
  for (k = 0; k < kmax - 4; k += 4) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    a_0 = A[0 + lda * 1];
    a_1 = A[1 + lda * 1];
    b_0 = B[0 + lda * 1];
    b_1 = B[1 + lda * 1];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    a_0 = A[0 + lda * 2];
    a_1 = A[1 + lda * 2];
    b_0 = B[0 + lda * 2];
    b_1 = B[1 + lda * 2];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    a_0 = A[0 + lda * 3];
    a_1 = A[1 + lda * 3];
    b_0 = B[0 + lda * 3];
    b_1 = B[1 + lda * 3];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    A += 16;
    B += 16;
  }
  a_0 = A[0 + lda * 0];
  a_1 = A[1 + lda * 0];
  b_0 = B[0 + lda * 0];
  b_1 = B[1 + lda * 0];
  c_00 += a_0 * b_0;
  c_10 += a_1 * b_0;
  D[0 + ldc * 0] = c_00;
  D[1 + ldc * 0] = c_10;
  c_01 += a_0 * b_1;
  c_11 += a_1 * b_1;
  a_0 = A[0 + lda * 1];
  a_1 = A[1 + lda * 1];
  b_1 = B[1 + lda * 1];
  c_01 += a_0 * b_1;
  c_11 += a_1 * b_1;
  D[0 + ldc * 1] = c_01;
  D[1 + ldc * 1] = c_11;
}


x86 assembly (clang, -O0):
<kernel_dtrmm_nt_l_2x2_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x4,%ecx
cmp    %ecx,%eax
jge    1421 <kernel_dtrmm_nt_l_2x2_lib4+0x321>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x2c(%rbp)
jmp    1148 <kernel_dtrmm_nt_l_2x2_lib4+0x48>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dtrmm_nt_l_2x2_lib4>:
xorpd  %xmm0,%xmm0
cmp    $0x5,%edi
jl     11e5 <kernel_dtrmm_nt_l_2x2_lib4+0xe5>
add    $0xfffffffc,%edi
xorpd  %xmm3,%xmm3
xor    %eax,%eax
xorpd  %xmm5,%xmm5
nopw   0x0(%rax,%rax,1)
movupd (%rsi),%xmm4
movupd 0x20(%rsi),%xmm6
movupd 0x40(%rsi),%xmm9
movupd 0x60(%rsi),%xmm8
movsd  (%rdx),%xmm7
movsd  0x8(%rdx),%xmm1
movsd  0x20(%rdx),%xmm0
movsd  0x28(%rdx),%xmm2
unpcklpd %xmm7,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm3,%xmm7
unpcklpd %xmm1,%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm5,%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm6,%xmm0
addpd  %xmm7,%xmm0
unpcklpd %xmm2,%xmm2
mulpd  %xmm6,%xmm2
addpd  %xmm1,%xmm2
movsd  0x40(%rdx),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm9,%xmm4
addpd  %xmm0,%xmm4
movsd  0x48(%rdx),%xmm6
unpcklpd %xmm6,%xmm6
mulpd  %xmm9,%xmm6
addpd  %xmm2,%xmm6
movsd  0x60(%rdx),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm3
addpd  %xmm4,%xmm3
movsd  0x68(%rdx),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm8,%xmm2
movapd %xmm2,%xmm5
addpd  %xmm6,%xmm5
sub    $0xffffffffffffff80,%rsi
sub    $0xffffffffffffff80,%rdx
add    $0x4,%eax
cmp    %edi,%eax
jl     1120 <kernel_dtrmm_nt_l_2x2_lib4+0x20>
addpd  %xmm6,%xmm2
addpd  %xmm4,%xmm0
jmp    11e9 <kernel_dtrmm_nt_l_2x2_lib4+0xe9>
xorpd  %xmm2,%xmm2
movupd (%rsi),%xmm1
movsd  (%rdx),%xmm3
movsd  0x8(%rdx),%xmm4
unpcklpd %xmm3,%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm0,%xmm3
movupd %xmm3,(%rcx)
unpcklpd %xmm4,%xmm4
mulpd  %xmm1,%xmm4
addpd  %xmm2,%xmm4
movupd 0x20(%rsi),%xmm0
movsd  0x28(%rdx),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm4,%xmm1
movupd %xmm1,0x20(%rcx)
ret

LLVM IR (-O0):
define void @kernel_dtrmm_nt_l_2x2_lib4(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store i32 4, i32* %9
store i32 4, i32* %10
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store i32 0, i32* %11
br label %20
20: ; preds = %142, %4
%21 = load i32, i32* %11
%22 = load i32, i32* %5
%23 = sub nsw i32 %22, 4
%24 = icmp slt i32 %21, %23
br i1 %24, label %25, label %145
25: ; preds = %20
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
store double %28, double* %12
%29 = load double*, double** %6
%30 = getelementptr inbounds double, double* %29, i64 1
%31 = load double, double* %30
store double %31, double* %13
%32 = load double*, double** %7
%33 = getelementptr inbounds double, double* %32, i64 0
%34 = load double, double* %33
store double %34, double* %14
%35 = load double*, double** %7
%36 = getelementptr inbounds double, double* %35, i64 1
%37 = load double, double* %36
store double %37, double* %15
%38 = load double, double* %12
%39 = load double, double* %14
%40 = load double, double* %16
%41 = call double @llvm.fmuladd.f64(double %38, double %39, double %40)
store double %41, double* %16
%42 = load double, double* %13
%43 = load double, double* %14
%44 = load double, double* %18
%45 = call double @llvm.fmuladd.f64(double %42, double %43, double %44)
store double %45, double* %18
%46 = load double, double* %12
%47 = load double, double* %15
%48 = load double, double* %17
%49 = call double @llvm.fmuladd.f64(double %46, double %47, double %48)
store double %49, double* %17
%50 = load double, double* %13
%51 = load double, double* %15
%52 = load double, double* %19
%53 = call double @llvm.fmuladd.f64(double %50, double %51, double %52)
store double %53, double* %19
%54 = load double*, double** %6
%55 = getelementptr inbounds double, double* %54, i64 4
%56 = load double, double* %55
store double %56, double* %12
%57 = load double*, double** %6
%58 = getelementptr inbounds double, double* %57, i64 5
%59 = load double, double* %58
store double %59, double* %13
%60 = load double*, double** %7
%61 = getelementptr inbounds double, double* %60, i64 4
%62 = load double, double* %61
store double %62, double* %14
%63 = load double*, double** %7
%64 = getelementptr inbounds double, double* %63, i64 5
%65 = load double, double* %64
store double %65, double* %15
%66 = load double, double* %12
%67 = load double, double* %14
%68 = load double, double* %16
%69 = call double @llvm.fmuladd.f64(double %66, double %67, double %68)
store double %69, double* %16
%70 = load double, double* %13
%71 = load double, double* %14
%72 = load double, double* %18
%73 = call double @llvm.fmuladd.f64(double %70, double %71, double %72)
store double %73, double* %18
%74 = load double, double* %12
%75 = load double, double* %15
%76 = load double, double* %17
%77 = call double @llvm.fmuladd.f64(double %74, double %75, double %76)
store double %77, double* %17
%78 = load double, double* %13
%79 = load double, double* %15
%80 = load double, double* %19
%81 = call double @llvm.fmuladd.f64(double %78, double %79, double %80)
store double %81, double* %19
%82 = load double*, double** %6
%83 = getelementptr inbounds double, double* %82, i64 8
%84 = load double, double* %83
store double %84, double* %12
%85 = load double*, double** %6
%86 = getelementptr inbounds double, double* %85, i64 9
%87 = load double, double* %86
store double %87, double* %13
%88 = load double*, double** %7
%89 = getelementptr inbounds double, double* %88, i64 8
%90 = load double, double* %89
store double %90, double* %14
%91 = load double*, double** %7
%92 = getelementptr inbounds double, double* %91, i64 9
%93 = load double, double* %92
store double %93, double* %15
%94 = load double, double* %12
%95 = load double, double* %14
%96 = load double, double* %16
%97 = call double @llvm.fmuladd.f64(double %94, double %95, double %96)
store double %97, double* %16
%98 = load double, double* %13
%99 = load double, double* %14
%100 = load double, double* %18
%101 = call double @llvm.fmuladd.f64(double %98, double %99, double %100)
store double %101, double* %18
%102 = load double, double* %12
%103 = load double, double* %15
%104 = load double, double* %17
%105 = call double @llvm.fmuladd.f64(double %102, double %103, double %104)
store double %105, double* %17
%106 = load double, double* %13
%107 = load double, double* %15
%108 = load double, double* %19
%109 = call double @llvm.fmuladd.f64(double %106, double %107, double %108)
store double %109, double* %19
%110 = load double*, double** %6
%111 = getelementptr inbounds double, double* %110, i64 12
%112 = load double, double* %111
store double %112, double* %12
%113 = load double*, double** %6
%114 = getelementptr inbounds double, double* %113, i64 13
%115 = load double, double* %114
store double %115, double* %13
%116 = load double*, double** %7
%117 = getelementptr inbounds double, double* %116, i64 12
%118 = load double, double* %117
store double %118, double* %14
%119 = load double*, double** %7
%120 = getelementptr inbounds double, double* %119, i64 13
%121 = load double, double* %120
store double %121, double* %15
%122 = load double, double* %12
%123 = load double, double* %14
%124 = load double, double* %16
%125 = call double @llvm.fmuladd.f64(double %122, double %123, double %124)
store double %125, double* %16
%126 = load double, double* %13
%127 = load double, double* %14
%128 = load double, double* %18
%129 = call double @llvm.fmuladd.f64(double %126, double %127, double %128)
store double %129, double* %18
%130 = load double, double* %12
%131 = load double, double* %15
%132 = load double, double* %17
%133 = call double @llvm.fmuladd.f64(double %130, double %131, double %132)
store double %133, double* %17
%134 = load double, double* %13
%135 = load double, double* %15
%136 = load double, double* %19
%137 = call double @llvm.fmuladd.f64(double %134, double %135, double %136)
store double %137, double* %19
%138 = load double*, double** %6
%139 = getelementptr inbounds double, double* %138, i64 16
store double* %139, double** %6
%140 = load double*, double** %7
%141 = getelementptr inbounds double, double* %140, i64 16
store double* %141, double** %7
br label %142
142: ; preds = %25
%143 = load i32, i32* %11
%144 = add nsw i32 %143, 4
store i32 %144, i32* %11
br label %20
145: ; preds = %20
%146 = load double*, double** %6
%147 = getelementptr inbounds double, double* %146, i64 0
%148 = load double, double* %147
store double %148, double* %12
%149 = load double*, double** %6
%150 = getelementptr inbounds double, double* %149, i64 1
%151 = load double, double* %150
store double %151, double* %13
%152 = load double*, double** %7
%153 = getelementptr inbounds double, double* %152, i64 0
%154 = load double, double* %153
store double %154, double* %14
%155 = load double*, double** %7
%156 = getelementptr inbounds double, double* %155, i64 1
%157 = load double, double* %156
store double %157, double* %15
%158 = load double, double* %12
%159 = load double, double* %14
%160 = load double, double* %16
%161 = call double @llvm.fmuladd.f64(double %158, double %159, double %160)
store double %161, double* %16
%162 = load double, double* %13
%163 = load double, double* %14
%164 = load double, double* %18
%165 = call double @llvm.fmuladd.f64(double %162, double %163, double %164)
store double %165, double* %18
%166 = load double, double* %16
%167 = load double*, double** %8
%168 = getelementptr inbounds double, double* %167, i64 0
store double %166, double* %168
%169 = load double, double* %18
%170 = load double*, double** %8
%171 = getelementptr inbounds double, double* %170, i64 1
store double %169, double* %171
%172 = load double, double* %12
%173 = load double, double* %15
%174 = load double, double* %17
%175 = call double @llvm.fmuladd.f64(double %172, double %173, double %174)
store double %175, double* %17
%176 = load double, double* %13
%177 = load double, double* %15
%178 = load double, double* %19
%179 = call double @llvm.fmuladd.f64(double %176, double %177, double %178)
store double %179, double* %19
%180 = load double*, double** %6
%181 = getelementptr inbounds double, double* %180, i64 4
%182 = load double, double* %181
store double %182, double* %12
%183 = load double*, double** %6
%184 = getelementptr inbounds double, double* %183, i64 5
%185 = load double, double* %184
store double %185, double* %13
%186 = load double*, double** %7
%187 = getelementptr inbounds double, double* %186, i64 5
%188 = load double, double* %187
store double %188, double* %15
%189 = load double, double* %12
%190 = load double, double* %15
%191 = load double, double* %17
%192 = call double @llvm.fmuladd.f64(double %189, double %190, double %191)
store double %192, double* %17
%193 = load double, double* %13
%194 = load double, double* %15
%195 = load double, double* %19
%196 = call double @llvm.fmuladd.f64(double %193, double %194, double %195)
store double %196, double* %19
%197 = load double, double* %17
%198 = load double*, double** %8
%199 = getelementptr inbounds double, double* %198, i64 4
store double %197, double* %199
%200 = load double, double* %19
%201 = load double*, double** %8
%202 = getelementptr inbounds double, double* %201, i64 5
store double %200, double* %202
ret void
}

LLVM IR (-O2):
define void @kernel_dtrmm_nt_l_2x2_lib4(i32 %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = add nsw i32 %0, -4
%6 = icmp sgt i32 %0, 4
br i1 %6, label %7, label %76
7: ; preds = %4, %7
%8 = phi i32 [ %65, %7 ], [ 0, %4 ]
%9 = phi double* [ %63, %7 ], [ %1, %4 ]
%10 = phi double* [ %64, %7 ], [ %2, %4 ]
%11 = phi <2 x double> [ %59, %7 ], [ zeroinitializer, %4 ]
%12 = phi <2 x double> [ %62, %7 ], [ zeroinitializer, %4 ]
%13 = bitcast double* %9 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = load double, double* %10
%16 = getelementptr inbounds double, double* %10, i64 1
%17 = load double, double* %16
%18 = insertelement <2 x double> poison, double %15, i64 0
%19 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> zeroinitializer
%20 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %14, <2 x double> %19, <2 x double> %11)
%21 = insertelement <2 x double> poison, double %17, i64 0
%22 = shufflevector <2 x double> %21, <2 x double> poison, <2 x i32> zeroinitializer
%23 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %14, <2 x double> %22, <2 x double> %12)
%24 = getelementptr inbounds double, double* %9, i64 4
%25 = bitcast double* %24 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = getelementptr inbounds double, double* %10, i64 4
%28 = load double, double* %27
%29 = getelementptr inbounds double, double* %10, i64 5
%30 = load double, double* %29
%31 = insertelement <2 x double> poison, double %28, i64 0
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
%33 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %32, <2 x double> %20)
%34 = insertelement <2 x double> poison, double %30, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %35, <2 x double> %23)
%37 = getelementptr inbounds double, double* %9, i64 8
%38 = bitcast double* %37 to <2 x double>*
%39 = load <2 x double>, <2 x double>* %38
%40 = getelementptr inbounds double, double* %10, i64 8
%41 = load double, double* %40
%42 = getelementptr inbounds double, double* %10, i64 9
%43 = load double, double* %42
%44 = insertelement <2 x double> poison, double %41, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %45, <2 x double> %33)
%47 = insertelement <2 x double> poison, double %43, i64 0
%48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
%49 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %48, <2 x double> %36)
%50 = getelementptr inbounds double, double* %9, i64 12
%51 = bitcast double* %50 to <2 x double>*
%52 = load <2 x double>, <2 x double>* %51
%53 = getelementptr inbounds double, double* %10, i64 12
%54 = load double, double* %53
%55 = getelementptr inbounds double, double* %10, i64 13
%56 = load double, double* %55
%57 = insertelement <2 x double> poison, double %54, i64 0
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> %58, <2 x double> %46)
%60 = insertelement <2 x double> poison, double %56, i64 0
%61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> %61, <2 x double> %49)
%63 = getelementptr inbounds double, double* %9, i64 16
%64 = getelementptr inbounds double, double* %10, i64 16
%65 = add nuw nsw i32 %8, 4
%66 = icmp slt i32 %65, %5
br i1 %66, label %7, label %67
67: ; preds = %7
%68 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %14, <2 x double> %22, <2 x double> %12)
%69 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %35, <2 x double> %68)
%70 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %48, <2 x double> %69)
%71 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> %61, <2 x double> %70)
%72 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %14, <2 x double> %19, <2 x double> %11)
%73 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %32, <2 x double> %72)
%74 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %45, <2 x double> %73)
%75 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> %58, <2 x double> %74)
br label %76
76: ; preds = %67, %4
%77 = phi double* [ %2, %4 ], [ %64, %67 ]
%78 = phi double* [ %1, %4 ], [ %63, %67 ]
%79 = phi <2 x double> [ zeroinitializer, %4 ], [ %75, %67 ]
%80 = phi <2 x double> [ zeroinitializer, %4 ], [ %71, %67 ]
%81 = bitcast double* %78 to <2 x double>*
%82 = load <2 x double>, <2 x double>* %81
%83 = load double, double* %77
%84 = getelementptr inbounds double, double* %77, i64 1
%85 = load double, double* %84
%86 = insertelement <2 x double> poison, double %83, i64 0
%87 = shufflevector <2 x double> %86, <2 x double> poison, <2 x i32> zeroinitializer
%88 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %87, <2 x double> %79)
%89 = bitcast double* %3 to <2 x double>*
store <2 x double> %88, <2 x double>* %89
%90 = insertelement <2 x double> poison, double %85, i64 0
%91 = shufflevector <2 x double> %90, <2 x double> poison, <2 x i32> zeroinitializer
%92 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %91, <2 x double> %80)
%93 = getelementptr inbounds double, double* %78, i64 4
%94 = bitcast double* %93 to <2 x double>*
%95 = load <2 x double>, <2 x double>* %94
%96 = getelementptr inbounds double, double* %77, i64 5
%97 = load double, double* %96
%98 = insertelement <2 x double> poison, double %97, i64 0
%99 = shufflevector <2 x double> %98, <2 x double> poison, <2 x i32> zeroinitializer
%100 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %99, <2 x double> %92)
%101 = getelementptr inbounds double, double* %3, i64 4
%102 = bitcast double* %101 to <2 x double>*
store <2 x double> %100, <2 x double>* %102
ret void
}