void kernel_3mm(int ni, int nj, int nk, int nl, int nm,
                double E[800 + 0][900 + 0], double A[800 + 0][1000 + 0],
                double B[1000 + 0][900 + 0], double F[900 + 0][1100 + 0],
                double C[900 + 0][1200 + 0], double D[1200 + 0][1100 + 0],
                double G[800 + 0][1100 + 0]) {
  int i, j, k;
#pragma scop
  for (i = 0; i < ni; i++)
    for (j = 0; j < nj; j++) {
      E[i][j] = 0.0;
      for (k = 0; k < nk; ++k)
        E[i][j] += A[i][k] * B[k][j];
    }
  for (i = 0; i < nj; i++)
    for (j = 0; j < nl; j++) {
      F[i][j] = 0.0;
      for (k = 0; k < nm; ++k)
        F[i][j] += C[i][k] * D[k][j];
    }
  for (i = 0; i < ni; i++)
    for (j = 0; j < nl; j++) {
      G[i][j] = 0.0;
      for (k = 0; k < nj; ++k)
        G[i][j] += E[i][k] * F[k][j];
    }
#pragma endscop
}


x86 assembly (clang, -O0):
<kernel_3mm>:
push   %rbp
mov    %rsp,%rbp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1219 <kernel_3mm+0x119>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1206 <kernel_3mm+0x106>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x1c20,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11f3 <kernel_3mm+0xf3>
mov    0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x1c20,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x1c20,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117b <kernel_3mm+0x7b>
jmp    11f8 <kernel_3mm+0xf8>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    114a <kernel_3mm+0x4a>
jmp    120b <kernel_3mm+0x10b>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1137 <kernel_3mm+0x37>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1302 <kernel_3mm+0x202>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12ef <kernel_3mm+0x1ef>
mov    0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x2260,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12dc <kernel_3mm+0x1dc>
mov    0x28(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x2580,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x2260,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x2260,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1264 <kernel_3mm+0x164>
jmp    12e1 <kernel_3mm+0x1e1>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1233 <kernel_3mm+0x133>
jmp    12f4 <kernel_3mm+0x1f4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1220 <kernel_3mm+0x120>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13eb <kernel_3mm+0x2eb>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13d8 <kernel_3mm+0x2d8>
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x2260,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13c5 <kernel_3mm+0x2c5>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x1c20,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x2260,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   $0x2260,%rcx,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    134d <kernel_3mm+0x24d>
jmp    13ca <kernel_3mm+0x2ca>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    131c <kernel_3mm+0x21c>
jmp    13dd <kernel_3mm+0x2dd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1309 <kernel_3mm+0x209>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_3mm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %ecx,-0x10(%rsp)
mov    %edi,%eax
mov    %rax,-0x8(%rsp)
mov    %esi,%r12d
mov    %edi,-0xc(%rsp)
test   %edi,%edi
jle    1232 <kernel_3mm+0x132>
mov    0x38(%rsp),%rax
mov    %edx,%r11d
mov    %r11d,%r15d
and    $0xfffffffe,%r15d
lea    0x8(%rax),%rbx
xor    %r13d,%r13d
jmp    1156 <kernel_3mm+0x56>
nopl   0x0(%rax)
add    $0x1,%r13
add    $0x1f40,%rbx
cmp    -0x8(%rsp),%r13
je     1232 <kernel_3mm+0x132>
test   %esi,%esi
jle    1140 <kernel_3mm+0x40>
mov    0x40(%rsp),%r14
xor    %ebp,%ebp
jmp    117d <kernel_3mm+0x7d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
add    $0x8,%r14
cmp    %r12,%rbp
je     1140 <kernel_3mm+0x40>
imul   $0x1c20,%r13,%rcx
add    %r9,%rcx
movq   $0x0,(%rcx,%rbp,8)
test   %edx,%edx
jle    1170 <kernel_3mm+0x70>
lea    (%rcx,%rbp,8),%rdi
xorpd  %xmm0,%xmm0
cmp    $0x1,%edx
jne    11b0 <kernel_3mm+0xb0>
xor    %ecx,%ecx
jmp    11f9 <kernel_3mm+0xf9>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%r10
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rbx,%rcx,8),%xmm1
mulsd  (%r10),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  (%rbx,%rcx,8),%xmm0
mulsd  0x1c20(%r10),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
add    $0x2,%rcx
add    $0x3840,%r10
cmp    %rcx,%r15
jne    11c0 <kernel_3mm+0xc0>
test   $0x1,%r11b
je     1170 <kernel_3mm+0x70>
imul   $0x1f40,%r13,%rax
add    0x38(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm1
imul   $0x1c20,%rcx,%rax
add    0x40(%rsp),%rax
mulsd  (%rax,%rbp,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
jmp    1170 <kernel_3mm+0x70>
mov    0x48(%rsp),%rbp
mov    -0x10(%rsp),%r10d
test   %esi,%esi
jle    1359 <kernel_3mm+0x259>
mov    0x50(%rsp),%rax
mov    %r8d,%r13d
mov    %r13d,%ebx
and    $0xfffffffe,%ebx
add    $0x8,%rax
xor    %r11d,%r11d
jmp    1273 <kernel_3mm+0x173>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r11
add    $0x2580,%rax
cmp    %r12,%r11
je     1359 <kernel_3mm+0x259>
cmpl   $0x0,-0x10(%rsp)
jle    1260 <kernel_3mm+0x160>
mov    0x58(%rsp),%rdx
xor    %r14d,%r14d
jmp    129d <kernel_3mm+0x19d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r14
add    $0x8,%rdx
cmp    %r10,%r14
je     1260 <kernel_3mm+0x160>
imul   $0x2260,%r11,%rcx
add    %rbp,%rcx
movq   $0x0,(%rcx,%r14,8)
test   %r8d,%r8d
jle    1290 <kernel_3mm+0x190>
lea    (%rcx,%r14,8),%rdi
xorpd  %xmm0,%xmm0
cmp    $0x1,%r8d
jne    12d0 <kernel_3mm+0x1d0>
xor    %ecx,%ecx
jmp    1319 <kernel_3mm+0x219>
cs nopw 0x0(%rax,%rax,1)
mov    %rdx,%r15
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rax,%rcx,8),%xmm1
mulsd  (%r15),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  (%rax,%rcx,8),%xmm0
mulsd  0x2260(%r15),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdi)
add    $0x2,%rcx
add    $0x44c0,%r15
cmp    %rcx,%rbx
jne    12e0 <kernel_3mm+0x1e0>
test   $0x1,%r13b
je     1290 <kernel_3mm+0x190>
imul   $0x2580,%r11,%rbp
add    0x50(%rsp),%rbp
movsd  0x0(%rbp,%rcx,8),%xmm1
mov    0x48(%rsp),%rbp
imul   $0x2260,%rcx,%rcx
add    0x58(%rsp),%rcx
mulsd  (%rcx,%r14,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
jmp    1290 <kernel_3mm+0x190>
cmpl   $0x0,-0xc(%rsp)
jle    146f <kernel_3mm+0x36f>
mov    0x60(%rsp),%r8
mov    %r12d,%eax
and    $0xfffffffe,%eax
lea    0x8(%r9),%rbp
xor    %r14d,%r14d
jmp    1396 <kernel_3mm+0x296>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
add    $0x1c20,%rbp
cmp    -0x8(%rsp),%r14
je     146f <kernel_3mm+0x36f>
cmpl   $0x0,-0x10(%rsp)
jle    1380 <kernel_3mm+0x280>
mov    0x48(%rsp),%r15
xor    %edx,%edx
jmp    13bd <kernel_3mm+0x2bd>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rdx
add    $0x8,%r15
cmp    %r10,%rdx
je     1380 <kernel_3mm+0x280>
imul   $0x2260,%r14,%rcx
add    %r8,%rcx
movq   $0x0,(%rcx,%rdx,8)
test   %esi,%esi
jle    13b0 <kernel_3mm+0x2b0>
lea    (%rcx,%rdx,8),%rcx
xorpd  %xmm0,%xmm0
cmp    $0x1,%esi
jne    13f0 <kernel_3mm+0x2f0>
xor    %ebx,%ebx
jmp    1438 <kernel_3mm+0x338>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rbp,%rbx,8),%xmm1
mulsd  (%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx)
movsd  0x0(%rbp,%rbx,8),%xmm0
mulsd  0x2260(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx)
add    $0x2,%rbx
add    $0x44c0,%rdi
cmp    %rbx,%rax
jne    1400 <kernel_3mm+0x300>
test   $0x1,%r12b
je     13b0 <kernel_3mm+0x2b0>
imul   $0x1c20,%r14,%rdi
add    %r9,%rdi
movsd  (%rdi,%rbx,8),%xmm1
imul   $0x2260,%rbx,%rdi
add    0x48(%rsp),%rdi
mulsd  (%rdi,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx)
jmp    13b0 <kernel_3mm+0x2b0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @kernel_3mm(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, [900 x double]* nocapture %5, [1000 x double]* nocapture %6, [900 x double]* nocapture %7, [1100 x double]* nocapture %8, [1200 x double]* nocapture %9, [1100 x double]* nocapture %10, [1100 x double]* nocapture %11) {
%13 = icmp sgt i32 %0, 0
br i1 %13, label %14, label %26
14: ; preds = %12
%15 = icmp sgt i32 %1, 0
%16 = icmp sgt i32 %2, 0
%17 = zext i32 %0 to i64
%18 = zext i32 %1 to i64
%19 = zext i32 %2 to i64
%20 = and i64 %19, 1
%21 = icmp eq i32 %2, 1
%22 = and i64 %19, 4294967294
%23 = icmp eq i64 %20, 0
br label %24
24: ; preds = %14, %72
%25 = phi i64 [ 0, %14 ], [ %73, %72 ]
br i1 %15, label %38, label %72
26: ; preds = %72, %12
%27 = icmp sgt i32 %1, 0
br i1 %27, label %28, label %77
28: ; preds = %26
%29 = icmp sgt i32 %3, 0
%30 = icmp sgt i32 %4, 0
%31 = zext i32 %1 to i64
%32 = zext i32 %3 to i64
%33 = zext i32 %4 to i64
%34 = and i64 %33, 1
%35 = icmp eq i32 %4, 1
%36 = and i64 %33, 4294967294
%37 = icmp eq i64 %34, 0
br label %75
38: ; preds = %24, %69
%39 = phi i64 [ %70, %69 ], [ 0, %24 ]
%40 = getelementptr inbounds [900 x double], [900 x double]* %5, i64 %25, i64 %39
store double 0.000000e+00, double* %40
br i1 %16, label %41, label %69
41: ; preds = %38
br i1 %21, label %60, label %42
42: ; preds = %41, %42
%43 = phi double [ %56, %42 ], [ 0.000000e+00, %41 ]
%44 = phi i64 [ %57, %42 ], [ 0, %41 ]
%45 = phi i64 [ %58, %42 ], [ 0, %41 ]
%46 = getelementptr inbounds [1000 x double], [1000 x double]* %6, i64 %25, i64 %44
%47 = load double, double* %46
%48 = getelementptr inbounds [900 x double], [900 x double]* %7, i64 %44, i64 %39
%49 = load double, double* %48
%50 = tail call double @llvm.fmuladd.f64(double %47, double %49, double %43)
store double %50, double* %40
%51 = or i64 %44, 1
%52 = getelementptr inbounds [1000 x double], [1000 x double]* %6, i64 %25, i64 %51
%53 = load double, double* %52
%54 = getelementptr inbounds [900 x double], [900 x double]* %7, i64 %51, i64 %39
%55 = load double, double* %54
%56 = tail call double @llvm.fmuladd.f64(double %53, double %55, double %50)
store double %56, double* %40
%57 = add nuw nsw i64 %44, 2
%58 = add i64 %45, 2
%59 = icmp eq i64 %58, %22
br i1 %59, label %60, label %42
60: ; preds = %42, %41
%61 = phi double [ 0.000000e+00, %41 ], [ %56, %42 ]
%62 = phi i64 [ 0, %41 ], [ %57, %42 ]
br i1 %23, label %69, label %63
63: ; preds = %60
%64 = getelementptr inbounds [1000 x double], [1000 x double]* %6, i64 %25, i64 %62
%65 = load double, double* %64
%66 = getelementptr inbounds [900 x double], [900 x double]* %7, i64 %62, i64 %39
%67 = load double, double* %66
%68 = tail call double @llvm.fmuladd.f64(double %65, double %67, double %61)
store double %68, double* %40
br label %69
69: ; preds = %63, %60, %38
%70 = add nuw nsw i64 %39, 1
%71 = icmp eq i64 %70, %18
br i1 %71, label %72, label %38
72: ; preds = %69, %24
%73 = add nuw nsw i64 %25, 1
%74 = icmp eq i64 %73, %17
br i1 %74, label %26, label %24
75: ; preds = %28, %121
%76 = phi i64 [ 0, %28 ], [ %122, %121 ]
br i1 %29, label %87, label %121
77: ; preds = %121, %26
br i1 %13, label %78, label %163
78: ; preds = %77
%79 = icmp sgt i32 %3, 0
%80 = zext i32 %0 to i64
%81 = zext i32 %3 to i64
%82 = zext i32 %1 to i64
%83 = and i64 %82, 1
%84 = icmp eq i32 %1, 1
%85 = and i64 %82, 4294967294
%86 = icmp eq i64 %83, 0
br label %124
87: ; preds = %75, %118
%88 = phi i64 [ %119, %118 ], [ 0, %75 ]
%89 = getelementptr inbounds [1100 x double], [1100 x double]* %8, i64 %76, i64 %88
store double 0.000000e+00, double* %89
br i1 %30, label %90, label %118
90: ; preds = %87
br i1 %35, label %109, label %91
91: ; preds = %90, %91
%92 = phi double [ %105, %91 ], [ 0.000000e+00, %90 ]
%93 = phi i64 [ %106, %91 ], [ 0, %90 ]
%94 = phi i64 [ %107, %91 ], [ 0, %90 ]
%95 = getelementptr inbounds [1200 x double], [1200 x double]* %9, i64 %76, i64 %93
%96 = load double, double* %95
%97 = getelementptr inbounds [1100 x double], [1100 x double]* %10, i64 %93, i64 %88
%98 = load double, double* %97
%99 = tail call double @llvm.fmuladd.f64(double %96, double %98, double %92)
store double %99, double* %89
%100 = or i64 %93, 1
%101 = getelementptr inbounds [1200 x double], [1200 x double]* %9, i64 %76, i64 %100
%102 = load double, double* %101
%103 = getelementptr inbounds [1100 x double], [1100 x double]* %10, i64 %100, i64 %88
%104 = load double, double* %103
%105 = tail call double @llvm.fmuladd.f64(double %102, double %104, double %99)
store double %105, double* %89
%106 = add nuw nsw i64 %93, 2
%107 = add i64 %94, 2
%108 = icmp eq i64 %107, %36
br i1 %108, label %109, label %91
109: ; preds = %91, %90
%110 = phi double [ 0.000000e+00, %90 ], [ %105, %91 ]
%111 = phi i64 [ 0, %90 ], [ %106, %91 ]
br i1 %37, label %118, label %112
112: ; preds = %109
%113 = getelementptr inbounds [1200 x double], [1200 x double]* %9, i64 %76, i64 %111
%114 = load double, double* %113
%115 = getelementptr inbounds [1100 x double], [1100 x double]* %10, i64 %111, i64 %88
%116 = load double, double* %115
%117 = tail call double @llvm.fmuladd.f64(double %114, double %116, double %110)
store double %117, double* %89
br label %118
118: ; preds = %112, %109, %87
%119 = add nuw nsw i64 %88, 1
%120 = icmp eq i64 %119, %32
br i1 %120, label %121, label %87
121: ; preds = %118, %75
%122 = add nuw nsw i64 %76, 1
%123 = icmp eq i64 %122, %31
br i1 %123, label %77, label %75
124: ; preds = %78, %160
%125 = phi i64 [ 0, %78 ], [ %161, %160 ]
br i1 %79, label %126, label %160
126: ; preds = %124, %157
%127 = phi i64 [ %158, %157 ], [ 0, %124 ]
%128 = getelementptr inbounds [1100 x double], [1100 x double]* %11, i64 %125, i64 %127
store double 0.000000e+00, double* %128
br i1 %27, label %129, label %157
129: ; preds = %126
br i1 %84, label %148, label %130
130: ; preds = %129, %130
%131 = phi double [ %144, %130 ], [ 0.000000e+00, %129 ]
%132 = phi i64 [ %145, %130 ], [ 0, %129 ]
%133 = phi i64 [ %146, %130 ], [ 0, %129 ]
%134 = getelementptr inbounds [900 x double], [900 x double]* %5, i64 %125, i64 %132
%135 = load double, double* %134
%136 = getelementptr inbounds [1100 x double], [1100 x double]* %8, i64 %132, i64 %127
%137 = load double, double* %136
%138 = tail call double @llvm.fmuladd.f64(double %135, double %137, double %131)
store double %138, double* %128
%139 = or i64 %132, 1
%140 = getelementptr inbounds [900 x double], [900 x double]* %5, i64 %125, i64 %139
%141 = load double, double* %140
%142 = getelementptr inbounds [1100 x double], [1100 x double]* %8, i64 %139, i64 %127
%143 = load double, double* %142
%144 = tail call double @llvm.fmuladd.f64(double %141, double %143, double %138)
store double %144, double* %128
%145 = add nuw nsw i64 %132, 2
%146 = add i64 %133, 2
%147 = icmp eq i64 %146, %85
br i1 %147, label %148, label %130
148: ; preds = %130, %129
%149 = phi double [ 0.000000e+00, %129 ], [ %144, %130 ]
%150 = phi i64 [ 0, %129 ], [ %145, %130 ]
br i1 %86, label %157, label %151
151: ; preds = %148
%152 = getelementptr inbounds [900 x double], [900 x double]* %5, i64 %125, i64 %150
%153 = load double, double* %152
%154 = getelementptr inbounds [1100 x double], [1100 x double]* %8, i64 %150, i64 %127
%155 = load double, double* %154
%156 = tail call double @llvm.fmuladd.f64(double %153, double %155, double %149)
store double %156, double* %128
br label %157
157: ; preds = %151, %148, %126
%158 = add nuw nsw i64 %127, 1
%159 = icmp eq i64 %158, %81
br i1 %159, label %160, label %126
160: ; preds = %157, %124
%161 = add nuw nsw i64 %125, 1
%162 = icmp eq i64 %161, %80
br i1 %162, label %163, label %124
163: ; preds = %160, %77
ret void
}