void workload(double m1[1024 * 1024], double m2[1024 * 1024],
              double prod[1024 * 1024]) {
#pragma HLS INTERFACE m_axi port = m1 offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = m2 offset = slave bundle = gmem
#pragma HLS INTERFACE m_axi port = prod offset = slave bundle = gmem
#pragma HLS INTERFACE s_axilite port = m1 bundle = control
#pragma HLS INTERFACE s_axilite port = m2 bundle = control
#pragma HLS INTERFACE s_axilite port = prod bundle = control
#pragma HLS INTERFACE s_axilite port = return bundle = control
  double local_m1[128][128];
  double local_m2[128][128];
#pragma HLS ARRAY_PARTITION variable = local_m2 complete dim = 2
  double local_prod[128][128];
#pragma HLS ARRAY_PARTITION variable = local_prod complete dim = 2
  double mult, sum;
  int i, j, k, ii, jj, kk;
  int uu;
  for (i = 0; i < 1024; i += 128)
    for (j = 0; j < 1024; j += 128) {
      for (ii = 0; ii < 128; ii++)
        for (jj = 0; jj < 128; jj++)
#pragma HLS PIPELINE
          local_prod[ii][jj] = 0;
      for (k = 0; k < 1024; k += 128) {
        for (ii = 0; ii < 128; ii++)
          for (kk = 0; kk < 128; kk++)
#pragma HLS PIPELINE
            local_m1[ii][kk] = m1[(i + ii) * 1024 + (k + kk)];
        for (kk = 0; kk < 128; kk++)
          for (jj = 0; jj < 128; jj++)
#pragma HLS PIPELINE
            local_m2[kk][jj] = m2[(k + kk) * 1024 + (j + jj)];
        for (kk = 0; kk < 128; kk++)
          for (ii = 0; ii < 128; ii++)
            for (jj = 0; jj < 128; jj += 128)
#pragma HLS PIPELINE II = 20
              for (uu = 0; uu < 128; uu++)
#pragma HLS UNROLL
#pragma HLS DEPENDENCE variable = "local_prod" inter false
                local_prod[ii][jj + uu] +=
                    local_m1[ii][kk] * local_m2[kk][jj + uu];
      }
      for (ii = 0; ii < 128; ii++)
        for (jj = 0; jj < 128; jj++)
#pragma HLS PIPELINE
          prod[(i + ii) * 1024 + (j + jj)] = local_prod[ii][jj];
    }
  return;
}


x86 assembly (clang, -O0):
<workload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x5ffd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x60034(%rbp)
cmpl   $0x400,-0x60034(%rbp)
jge    1585 <workload+0x485>
movl   $0x0,-0x60038(%rbp)
cmpl   $0x400,-0x60038(%rbp)
jge    156a <workload+0x46a>
movl   $0x0,-0x60040(%rbp)
cmpl   $0x80,-0x60040(%rbp)
jge    11d0 <workload+0xd0>
movl   $0x0,-0x60044(%rbp)
cmpl   $0x80,-0x60044(%rbp)
jge    11b7 <workload+0xb7>
movslq -0x60040(%rbp),%rcx
lea    -0x60020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x60044(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60044(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60044(%rbp)
jmp    116f <workload+0x6f>
jmp    11bc <workload+0xbc>
mov    -0x60040(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60040(%rbp)
jmp    1155 <workload+0x55>
movl   $0x0,-0x6003c(%rbp)
cmpl   $0x400,-0x6003c(%rbp)
jge    14a4 <workload+0x3a4>
movl   $0x0,-0x60040(%rbp)
cmpl   $0x80,-0x60040(%rbp)
jge    1295 <workload+0x195>
movl   $0x0,-0x60048(%rbp)
cmpl   $0x80,-0x60048(%rbp)
jge    127c <workload+0x17c>
mov    -0x8(%rbp),%rax
mov    -0x60034(%rbp),%ecx
add    -0x60040(%rbp),%ecx
shl    $0xa,%ecx
mov    -0x6003c(%rbp),%edx
add    -0x60048(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x60040(%rbp),%rcx
lea    -0x20020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x60048(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60048(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60048(%rbp)
jmp    120e <workload+0x10e>
jmp    1281 <workload+0x181>
mov    -0x60040(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60040(%rbp)
jmp    11f4 <workload+0xf4>
movl   $0x0,-0x60048(%rbp)
cmpl   $0x80,-0x60048(%rbp)
jge    1340 <workload+0x240>
movl   $0x0,-0x60044(%rbp)
cmpl   $0x80,-0x60044(%rbp)
jge    1327 <workload+0x227>
mov    -0x10(%rbp),%rax
mov    -0x6003c(%rbp),%ecx
add    -0x60048(%rbp),%ecx
shl    $0xa,%ecx
mov    -0x60038(%rbp),%edx
add    -0x60044(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x60048(%rbp),%rcx
lea    -0x40020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x60044(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60044(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60044(%rbp)
jmp    12b9 <workload+0x1b9>
jmp    132c <workload+0x22c>
mov    -0x60048(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60048(%rbp)
jmp    129f <workload+0x19f>
movl   $0x0,-0x60048(%rbp)
cmpl   $0x80,-0x60048(%rbp)
jge    1489 <workload+0x389>
movl   $0x0,-0x60040(%rbp)
cmpl   $0x80,-0x60040(%rbp)
jge    1470 <workload+0x370>
movl   $0x0,-0x60044(%rbp)
cmpl   $0x80,-0x60044(%rbp)
jge    1457 <workload+0x357>
movl   $0x0,-0x6004c(%rbp)
cmpl   $0x80,-0x6004c(%rbp)
jge    143c <workload+0x33c>
movslq -0x60040(%rbp),%rcx
lea    -0x20020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x60048(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x60048(%rbp),%rcx
lea    -0x40020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
mov    -0x60044(%rbp),%ecx
add    -0x6004c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x60040(%rbp),%rcx
lea    -0x60020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
mov    -0x60044(%rbp),%ecx
add    -0x6004c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6004c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6004c(%rbp)
jmp    1398 <workload+0x298>
jmp    1441 <workload+0x341>
mov    -0x60044(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x60044(%rbp)
jmp    137e <workload+0x27e>
jmp    145c <workload+0x35c>
mov    -0x60040(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60040(%rbp)
jmp    1364 <workload+0x264>
jmp    1475 <workload+0x375>
mov    -0x60048(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60048(%rbp)
jmp    134a <workload+0x24a>
jmp    148e <workload+0x38e>
mov    -0x6003c(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x6003c(%rbp)
jmp    11da <workload+0xda>
movl   $0x0,-0x60040(%rbp)
cmpl   $0x80,-0x60040(%rbp)
jge    154f <workload+0x44f>
movl   $0x0,-0x60044(%rbp)
cmpl   $0x80,-0x60044(%rbp)
jge    1536 <workload+0x436>
movslq -0x60040(%rbp),%rcx
lea    -0x60020(%rbp),%rax
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x60044(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x60034(%rbp),%ecx
add    -0x60040(%rbp),%ecx
shl    $0xa,%ecx
mov    -0x60038(%rbp),%edx
add    -0x60044(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60044(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60044(%rbp)
jmp    14c8 <workload+0x3c8>
jmp    153b <workload+0x43b>
mov    -0x60040(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60040(%rbp)
jmp    14ae <workload+0x3ae>
jmp    1554 <workload+0x454>
mov    -0x60038(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x60038(%rbp)
jmp    113b <workload+0x3b>
jmp    156f <workload+0x46f>
mov    -0x60034(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x60034(%rbp)
jmp    1121 <workload+0x21>
add    $0x5ffd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<workload>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x60048,%rsp
lea    0x440(%rsp),%rbx
add    $0x2000,%rdi
mov    %rdi,(%rsp)
add    $0x2000,%rsi
mov    %rsi,0x8(%rsp)
add    $0x2000,%rdx
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,0x10(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rdx,%r12
mov    0x8(%rsp),%rbp
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,0x20(%rsp)
mov    %r12,0x30(%rsp)
mov    $0x20000,%edx
lea    0x20040(%rsp),%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbp,0x28(%rsp)
mov    %rbp,%r12
mov    (%rsp),%r13
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,0x38(%rsp)
xor    %r14d,%r14d
mov    %rbx,%r15
nopl   0x0(%rax,%rax,1)
lea    (%r15,%r14,1),%rbx
lea    (%r15,%r14,1),%rdi
add    $0xfffffffffffffc00,%rdi
lea    0x0(,%r14,8),%rbp
add    %r13,%rbp
lea    -0x2000(,%r14,8),%rsi
ff
add    %r13,%rsi
mov    $0x400,%edx
call   1040 <memcpy@plt>
mov    $0x400,%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <memcpy@plt>
add    $0x800,%r14
cmp    $0x20000,%r14
jne    11c0 <workload+0xa0>
xor    %ebx,%ebx
lea    0x40440(%rsp),%r15
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%r14
lea    (%r15,%rbx,1),%rdi
add    $0xfffffffffffffc00,%rdi
lea    (%r12,%rbx,8),%rbp
lea    (%r12,%rbx,8),%rsi
add    $0xffffffffffffe000,%rsi
mov    $0x400,%edx
call   1040 <memcpy@plt>
mov    $0x400,%edx
mov    %r14,%rdi
mov    %rbp,%rsi
call   1040 <memcpy@plt>
add    $0x800,%rbx
cmp    $0x20000,%rbx
jne    1220 <workload+0x100>
lea    0x40070(%rsp),%rax
xor    %ecx,%ecx
lea    0x440(%rsp),%rbx
lea    0x20070(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rsi,%rdi
shl    $0xa,%rdi
add    %rsp,%rdi
add    $0x40,%rdi
movsd  (%rdi,%rcx,8),%xmm0
unpcklpd %xmm0,%xmm0
xor    %edi,%edi
nopl   0x0(%rax)
movapd -0x30(%rax,%rdi,8),%xmm1
mulpd  %xmm0,%xmm1
addpd  -0x30(%rdx,%rdi,8),%xmm1
movapd -0x20(%rax,%rdi,8),%xmm2
mulpd  %xmm0,%xmm2
addpd  -0x20(%rdx,%rdi,8),%xmm2
movapd %xmm1,-0x30(%rdx,%rdi,8)
movapd %xmm2,-0x20(%rdx,%rdi,8)
movapd -0x10(%rax,%rdi,8),%xmm1
mulpd  %xmm0,%xmm1
addpd  -0x10(%rdx,%rdi,8),%xmm1
movapd (%rax,%rdi,8),%xmm2
mulpd  %xmm0,%xmm2
addpd  (%rdx,%rdi,8),%xmm2
movapd %xmm1,-0x10(%rdx,%rdi,8)
movapd %xmm2,(%rdx,%rdi,8)
add    $0x8,%rdi
cmp    $0x80,%rdi
jne    12c0 <workload+0x1a0>
add    $0x1,%rsi
add    $0x400,%rdx
cmp    $0x80,%rsi
jne    12a0 <workload+0x180>
add    $0x1,%rcx
add    $0x400,%rax
cmp    $0x80,%rcx
jne    1290 <workload+0x170>
mov    0x38(%rsp),%rax
add    $0x1,%rax
add    $0x400,%r13
add    $0x100000,%r12
cmp    $0x8,%rax
jne    11b0 <workload+0x90>
xor    %ebx,%ebx
lea    0x20440(%rsp),%rbp
mov    0x30(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%r12,%rbx,8),%r14
lea    (%r12,%rbx,8),%rdi
add    $0xffffffffffffe000,%rdi
lea    (%rbx,%rbp,1),%r15
lea    (%rbx,%rbp,1),%rsi
add    $0xfffffffffffffc00,%rsi
mov    $0x400,%edx
call   1040 <memcpy@plt>
mov    $0x400,%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <memcpy@plt>
add    $0x800,%rbx
cmp    $0x20000,%rbx
jne    1390 <workload+0x270>
mov    0x20(%rsp),%rax
add    $0x1,%rax
mov    0x28(%rsp),%rbp
add    $0x400,%rbp
add    $0x400,%r12
cmp    $0x8,%rax
lea    0x440(%rsp),%rbx
jne    1180 <workload+0x60>
mov    0x10(%rsp),%rax
add    $0x1,%rax
addq   $0x100000,(%rsp)
mov    0x18(%rsp),%rdx
add    $0x100000,%rdx
cmp    $0x8,%rax
jne    1160 <workload+0x40>
add    $0x60048,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @workload(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = alloca [128 x [128 x double]]
%5 = alloca [128 x [128 x double]]
%6 = alloca [128 x [128 x double]]
%7 = bitcast [128 x [128 x double]]* %6 to i8*
%8 = bitcast [128 x [128 x double]]* %4 to i8*
%9 = bitcast [128 x [128 x double]]* %5 to i8*
br label %10
10: ; preds = %3, %133
%11 = phi i64 [ 0, %3 ], [ %134, %133 ]
%12 = shl nuw nsw i64 %11, 17
br label %13
13: ; preds = %10, %130
%14 = phi i64 [ 0, %10 ], [ %131, %130 ]
%15 = shl nuw nsw i64 %14, 7
%16 = add nuw nsw i64 %12, %15
br label %17
17: ; preds = %13, %110
%18 = phi i64 [ 0, %13 ], [ %111, %110 ]
%19 = shl nuw nsw i64 %18, 17
%20 = add nuw nsw i64 %15, %19
%21 = shl nuw nsw i64 %18, 7
%22 = add nuw nsw i64 %12, %21
br label %23
23: ; preds = %23, %17
%24 = phi i64 [ 0, %17 ], [ %38, %23 ]
%25 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %4, i64 0, i64 %24, i64 0
%26 = bitcast double* %25 to i8*
%27 = shl nuw nsw i64 %24, 10
%28 = add nuw nsw i64 %22, %27
%29 = getelementptr double, double* %0, i64 %28
%30 = bitcast double* %29 to i8*
%31 = or i64 %24, 1
%32 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %4, i64 0, i64 %31, i64 0
%33 = bitcast double* %32 to i8*
%34 = shl nuw nsw i64 %31, 10
%35 = add nuw nsw i64 %22, %34
%36 = getelementptr double, double* %0, i64 %35
%37 = bitcast double* %36 to i8*
%38 = add nuw nsw i64 %24, 2
%39 = icmp eq i64 %38, 128
br i1 %39, label %40, label %23
40: ; preds = %23, %40
%41 = phi i64 [ %55, %40 ], [ 0, %23 ]
%42 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %41, i64 0
%43 = bitcast double* %42 to i8*
%44 = shl nuw nsw i64 %41, 10
%45 = add nuw nsw i64 %20, %44
%46 = getelementptr double, double* %1, i64 %45
%47 = bitcast double* %46 to i8*
%48 = or i64 %41, 1
%49 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %48, i64 0
%50 = bitcast double* %49 to i8*
%51 = shl nuw nsw i64 %48, 10
%52 = add nuw nsw i64 %20, %51
%53 = getelementptr double, double* %1, i64 %52
%54 = bitcast double* %53 to i8*
%55 = add nuw nsw i64 %41, 2
%56 = icmp eq i64 %55, 128
br i1 %56, label %57, label %40
57: ; preds = %40, %107
%58 = phi i64 [ %108, %107 ], [ 0, %40 ]
br label %59
59: ; preds = %57, %104
%60 = phi i64 [ 0, %57 ], [ %105, %104 ]
%61 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %4, i64 0, i64 %60, i64 %58
%62 = load double, double* %61
%63 = insertelement <2 x double> poison, double %62, i64 0
%64 = shufflevector <2 x double> %63, <2 x double> poison, <2 x i32> zeroinitializer
%65 = insertelement <2 x double> poison, double %62, i64 0
%66 = shufflevector <2 x double> %65, <2 x double> poison, <2 x i32> zeroinitializer
br label %67
67: ; preds = %67, %59
%68 = phi i64 [ 0, %59 ], [ %102, %67 ]
%69 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %58, i64 %68
%70 = bitcast double* %69 to <2 x double>*
%71 = load <2 x double>, <2 x double>* %70
%72 = getelementptr inbounds double, double* %69, i64 2
%73 = bitcast double* %72 to <2 x double>*
%74 = load <2 x double>, <2 x double>* %73
%75 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %60, i64 %68
%76 = bitcast double* %75 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = getelementptr inbounds double, double* %75, i64 2
%79 = bitcast double* %78 to <2 x double>*
%80 = load <2 x double>, <2 x double>* %79
%81 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %71, <2 x double> %77)
%82 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %66, <2 x double> %74, <2 x double> %80)
%83 = bitcast double* %75 to <2 x double>*
store <2 x double> %81, <2 x double>* %83
%84 = bitcast double* %78 to <2 x double>*
store <2 x double> %82, <2 x double>* %84
%85 = or i64 %68, 4
%86 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %58, i64 %85
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %86, i64 2
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %60, i64 %85
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = getelementptr inbounds double, double* %92, i64 2
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %88, <2 x double> %94)
%99 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %66, <2 x double> %91, <2 x double> %97)
%100 = bitcast double* %92 to <2 x double>*
store <2 x double> %98, <2 x double>* %100
%101 = bitcast double* %95 to <2 x double>*
store <2 x double> %99, <2 x double>* %101
%102 = add nuw nsw i64 %68, 8
%103 = icmp eq i64 %102, 128
br i1 %103, label %104, label %67
104: ; preds = %67
%105 = add nuw nsw i64 %60, 1
%106 = icmp eq i64 %105, 128
br i1 %106, label %107, label %59
107: ; preds = %104
%108 = add nuw nsw i64 %58, 1
%109 = icmp eq i64 %108, 128
br i1 %109, label %110, label %57
110: ; preds = %107
%111 = add nuw nsw i64 %18, 1
%112 = icmp eq i64 %111, 8
br i1 %112, label %113, label %17
113: ; preds = %110, %113
%114 = phi i64 [ %128, %113 ], [ 0, %110 ]
%115 = shl nuw nsw i64 %114, 10
%116 = add nuw nsw i64 %16, %115
%117 = getelementptr double, double* %2, i64 %116
%118 = bitcast double* %117 to i8*
%119 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %114, i64 0
%120 = bitcast double* %119 to i8*
%121 = or i64 %114, 1
%122 = shl nuw nsw i64 %121, 10
%123 = add nuw nsw i64 %16, %122
%124 = getelementptr double, double* %2, i64 %123
%125 = bitcast double* %124 to i8*
%126 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %121, i64 0
%127 = bitcast double* %126 to i8*
%128 = add nuw nsw i64 %114, 2
%129 = icmp eq i64 %128, 128
br i1 %129, label %130, label %113
130: ; preds = %113
%131 = add nuw nsw i64 %14, 1
%132 = icmp eq i64 %131, 8
br i1 %132, label %133, label %13
133: ; preds = %130
%134 = add nuw nsw i64 %11, 1
%135 = icmp eq i64 %134, 8
br i1 %135, label %136, label %10
136: ; preds = %133
ret void
}