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 += 64)
#pragma HLS PIPELINE II = 1
              for (uu = 0; uu < 64; 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    1580 <workload+0x480>
movl   $0x0,-0x60038(%rbp)
cmpl   $0x400,-0x60038(%rbp)
jge    1565 <workload+0x465>
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    149f <workload+0x39f>
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    1484 <workload+0x384>
movl   $0x0,-0x60040(%rbp)
cmpl   $0x80,-0x60040(%rbp)
jge    146b <workload+0x36b>
movl   $0x0,-0x60044(%rbp)
cmpl   $0x80,-0x60044(%rbp)
jge    1452 <workload+0x352>
movl   $0x0,-0x6004c(%rbp)
cmpl   $0x40,-0x6004c(%rbp)
jge    1439 <workload+0x339>
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    143e <workload+0x33e>
mov    -0x60044(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x60044(%rbp)
jmp    137e <workload+0x27e>
jmp    1457 <workload+0x357>
mov    -0x60040(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60040(%rbp)
jmp    1364 <workload+0x264>
jmp    1470 <workload+0x370>
mov    -0x60048(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60048(%rbp)
jmp    134a <workload+0x24a>
jmp    1489 <workload+0x389>
mov    -0x6003c(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x6003c(%rbp)
jmp    11da <workload+0xda>
movl   $0x0,-0x60040(%rbp)
cmpl   $0x80,-0x60040(%rbp)
jge    154a <workload+0x44a>
movl   $0x0,-0x60044(%rbp)
cmpl   $0x80,-0x60044(%rbp)
jge    1531 <workload+0x431>
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    14c3 <workload+0x3c3>
jmp    1536 <workload+0x436>
mov    -0x60040(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60040(%rbp)
jmp    14a9 <workload+0x3a9>
jmp    154f <workload+0x44f>
mov    -0x60038(%rbp),%eax
add    $0x80,%eax
mov    %eax,-0x60038(%rbp)
jmp    113b <workload+0x3b>
jmp    156a <workload+0x46a>
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
add    $0x2000,%rdi
mov    %rdi,(%rsp)
add    $0x2000,%rsi
mov    %rsi,0x8(%rsp)
add    $0x2000,%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rax,0x10(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rdx,%r12
mov    0x8(%rsp),%r13
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,0x20(%rsp)
mov    %r12,0x30(%rsp)
mov    $0x20000,%edx
lea    0x40(%rsp),%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r13,0x28(%rsp)
mov    (%rsp),%r12
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
mov    %rax,0x38(%rsp)
xor    %r14d,%r14d
lea    0x40440(%rsp),%r15
lea    (%r15,%r14,1),%rbx
lea    (%r15,%r14,1),%rdi
add    $0xfffffffffffffc00,%rdi
lea    (%r12,%r14,8),%rbp
lea    (%r12,%r14,8),%rsi
add    $0xffffffffffffe000,%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    0x20440(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%r14
lea    (%r15,%rbx,1),%rdi
add    $0xfffffffffffffc00,%rdi
lea    0x0(,%rbx,8),%rbp
add    %r13,%rbp
lea    -0x2000(,%rbx,8),%rsi
ff
add    %r13,%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    0x20250(%rsp),%rax
lea    0x20050(%rsp),%rcx
xor    %r8d,%r8d
lea    0x50(%rsp),%r9
lea    0x250(%rsp),%r10
nop
mov    %r10,%rsi
mov    %r9,%rdi
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %rdx,%rbp
shl    $0xa,%rbp
add    %rsp,%rbp
add    $0x40040,%rbp
movsd  0x0(%rbp,%r8,8),%xmm0
unpcklpd %xmm0,%xmm0
xor    %ebx,%ebx
xchg   %ax,%ax
movapd -0x10(%rcx,%rbx,8),%xmm1
mulpd  %xmm0,%xmm1
addpd  -0x10(%rdi,%rbx,8),%xmm1
movapd %xmm1,-0x10(%rdi,%rbx,8)
movapd (%rcx,%rbx,8),%xmm1
mulpd  %xmm0,%xmm1
addpd  (%rdi,%rbx,8),%xmm1
movapd %xmm1,(%rdi,%rbx,8)
add    $0x4,%rbx
cmp    $0x40,%rbx
jne    12c0 <workload+0x1a0>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movapd -0x10(%rax,%rbx,8),%xmm1
mulpd  %xmm0,%xmm1
addpd  -0x10(%rsi,%rbx,8),%xmm1
movapd %xmm1,-0x10(%rsi,%rbx,8)
movapd (%rax,%rbx,8),%xmm1
mulpd  %xmm0,%xmm1
addpd  (%rsi,%rbx,8),%xmm1
movapd %xmm1,(%rsi,%rbx,8)
add    $0x4,%rbx
cmp    $0x40,%rbx
jne    1300 <workload+0x1e0>
add    $0x1,%rdx
add    $0x400,%rdi
add    $0x400,%rsi
cmp    $0x80,%rdx
jne    12a0 <workload+0x180>
add    $0x1,%r8
add    $0x400,%rcx
add    $0x400,%rax
cmp    $0x80,%r8
jne    1290 <workload+0x170>
mov    0x38(%rsp),%rax
add    $0x1,%rax
add    $0x400,%r12
add    $0x100000,%r13
cmp    $0x8,%rax
jne    11b0 <workload+0x90>
xor    %ebx,%ebx
lea    0x440(%rsp),%r15
mov    0x30(%rsp),%r12
lea    (%r12,%rbx,8),%r14
lea    (%r12,%rbx,8),%rdi
add    $0xffffffffffffe000,%rdi
lea    (%r15,%rbx,1),%rbp
lea    (%r15,%rbx,1),%rsi
add    $0xfffffffffffffc00,%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    13a0 <workload+0x280>
mov    0x20(%rsp),%rax
add    $0x1,%rax
mov    0x28(%rsp),%r13
add    $0x400,%r13
add    $0x400,%r12
cmp    $0x8,%rax
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, 64
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, 64
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, %140
%11 = phi i64 [ 0, %3 ], [ %141, %140 ]
%12 = shl nuw nsw i64 %11, 17
br label %13
13: ; preds = %10, %137
%14 = phi i64 [ 0, %10 ], [ %138, %137 ]
%15 = shl nuw nsw i64 %14, 7
%16 = add nuw nsw i64 %12, %15
br label %17
17: ; preds = %13, %117
%18 = phi i64 [ 0, %13 ], [ %118, %117 ]
%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, %114
%58 = phi i64 [ %115, %114 ], [ 0, %40 ]
br label %59
59: ; preds = %57, %111
%60 = phi i64 [ 0, %57 ], [ %112, %111 ]
%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
br label %65
65: ; preds = %65, %59
%66 = phi i64 [ 0, %59 ], [ %84, %65 ]
%67 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %58, i64 %66
%68 = bitcast double* %67 to <2 x double>*
%69 = load <2 x double>, <2 x double>* %68
%70 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %60, i64 %66
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %69, <2 x double> %72)
%74 = bitcast double* %70 to <2 x double>*
store <2 x double> %73, <2 x double>* %74
%75 = or i64 %66, 2
%76 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %58, i64 %75
%77 = bitcast double* %76 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %60, i64 %75
%80 = bitcast double* %79 to <2 x double>*
%81 = load <2 x double>, <2 x double>* %80
%82 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %78, <2 x double> %81)
%83 = bitcast double* %79 to <2 x double>*
store <2 x double> %82, <2 x double>* %83
%84 = add nuw nsw i64 %66, 4
%85 = icmp eq i64 %84, 64
br i1 %85, label %86, label %65
86: ; preds = %65
%87 = insertelement <2 x double> poison, double %62, i64 0
%88 = shufflevector <2 x double> %87, <2 x double> poison, <2 x i32> zeroinitializer
br label %89
89: ; preds = %89, %86
%90 = phi i64 [ 0, %86 ], [ %109, %89 ]
%91 = add nuw nsw i64 %90, 64
%92 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %58, i64 %91
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %60, i64 %91
%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> %88, <2 x double> %94, <2 x double> %97)
%99 = bitcast double* %95 to <2 x double>*
store <2 x double> %98, <2 x double>* %99
%100 = add nuw nsw i64 %90, 66
%101 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %5, i64 0, i64 %58, i64 %100
%102 = bitcast double* %101 to <2 x double>*
%103 = load <2 x double>, <2 x double>* %102
%104 = getelementptr inbounds [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %60, i64 %100
%105 = bitcast double* %104 to <2 x double>*
%106 = load <2 x double>, <2 x double>* %105
%107 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %88, <2 x double> %103, <2 x double> %106)
%108 = bitcast double* %104 to <2 x double>*
store <2 x double> %107, <2 x double>* %108
%109 = add nuw nsw i64 %90, 4
%110 = icmp eq i64 %109, 64
br i1 %110, label %111, label %89
111: ; preds = %89
%112 = add nuw nsw i64 %60, 1
%113 = icmp eq i64 %112, 128
br i1 %113, label %114, label %59
114: ; preds = %111
%115 = add nuw nsw i64 %58, 1
%116 = icmp eq i64 %115, 128
br i1 %116, label %117, label %57
117: ; preds = %114
%118 = add nuw nsw i64 %18, 1
%119 = icmp eq i64 %118, 8
br i1 %119, label %120, label %17
120: ; preds = %117, %120
%121 = phi i64 [ %135, %120 ], [ 0, %117 ]
%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 = or i64 %121, 1
%129 = shl nuw nsw i64 %128, 10
%130 = add nuw nsw i64 %16, %129
%131 = getelementptr double, double* %2, i64 %130
%132 = bitcast double* %131 to i8*
%133 = getelementptr [128 x [128 x double]], [128 x [128 x double]]* %6, i64 0, i64 %128, i64 0
%134 = bitcast double* %133 to i8*
%135 = add nuw nsw i64 %121, 2
%136 = icmp eq i64 %135, 128
br i1 %136, label %137, label %120
137: ; preds = %120
%138 = add nuw nsw i64 %14, 1
%139 = icmp eq i64 %138, 8
br i1 %139, label %140, label %13
140: ; preds = %137
%141 = add nuw nsw i64 %11, 1
%142 = icmp eq i64 %141, 8
br i1 %142, label %143, label %10
143: ; preds = %140
ret void
}