void foo() {
  int n = 100;
  int m = 100;
  double b[n][m];
  int i;
  int j;
#pragma omp parallel for private(i, j) firstprivate(n, m)
  for (i = 0; i <= n - 1; i += 1) {
    for (j = 0; j <= m - 1; j += 1) {
      b[i][j] = b[i][j - 1];
    }
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x64,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    %rax,-0x38(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,8),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x30(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11e2 <foo+0xe2>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11cf <foo+0xcf>
mov    -0x30(%rbp),%rax
mov    -0x38(%rbp),%rdx
movslq -0x24(%rbp),%rsi
imul   %rdx,%rsi
shl    $0x3,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
mov    -0x28(%rbp),%esi
sub    $0x1,%esi
movslq %esi,%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x24(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1170 <foo+0x70>
jmp    11d4 <foo+0xd4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1158 <foo+0x58>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x13808,%rsp
xor    %eax,%eax
nopl   0x0(%rax)
movsd  -0x88(%rsp,%rax,1),%xmm0
ff ff
movlhps %xmm0,%xmm0
movaps %xmm0,-0x80(%rsp,%rax,1)
movaps %xmm0,-0x70(%rsp,%rax,1)
movaps %xmm0,-0x60(%rsp,%rax,1)
movaps %xmm0,-0x50(%rsp,%rax,1)
movaps %xmm0,-0x40(%rsp,%rax,1)
movaps %xmm0,-0x30(%rsp,%rax,1)
movaps %xmm0,-0x20(%rsp,%rax,1)
movaps %xmm0,-0x10(%rsp,%rax,1)
movaps %xmm0,(%rsp,%rax,1)
movaps %xmm0,0x10(%rsp,%rax,1)
movaps %xmm0,0x20(%rsp,%rax,1)
movaps %xmm0,0x30(%rsp,%rax,1)
movaps %xmm0,0x40(%rsp,%rax,1)
movaps %xmm0,0x50(%rsp,%rax,1)
movaps %xmm0,0x60(%rsp,%rax,1)
movaps %xmm0,0x70(%rsp,%rax,1)
movaps %xmm0,0x80(%rsp,%rax,1)
movaps %xmm0,0x90(%rsp,%rax,1)
movaps %xmm0,0xa0(%rsp,%rax,1)
movaps %xmm0,0xb0(%rsp,%rax,1)
movaps %xmm0,0xc0(%rsp,%rax,1)
movaps %xmm0,0xd0(%rsp,%rax,1)
movaps %xmm0,0xe0(%rsp,%rax,1)
movaps %xmm0,0xf0(%rsp,%rax,1)
movaps %xmm0,0x100(%rsp,%rax,1)
movaps %xmm0,0x110(%rsp,%rax,1)
movaps %xmm0,0x120(%rsp,%rax,1)
movaps %xmm0,0x130(%rsp,%rax,1)
movaps %xmm0,0x140(%rsp,%rax,1)
movaps %xmm0,0x150(%rsp,%rax,1)
movaps %xmm0,0x160(%rsp,%rax,1)
movaps %xmm0,0x170(%rsp,%rax,1)
movaps %xmm0,0x180(%rsp,%rax,1)
movaps %xmm0,0x190(%rsp,%rax,1)
movaps %xmm0,0x1a0(%rsp,%rax,1)
movaps %xmm0,0x1b0(%rsp,%rax,1)
movaps %xmm0,0x1c0(%rsp,%rax,1)
movaps %xmm0,0x1d0(%rsp,%rax,1)
movaps %xmm0,0x1e0(%rsp,%rax,1)
movaps %xmm0,0x1f0(%rsp,%rax,1)
movaps %xmm0,0x200(%rsp,%rax,1)
movaps %xmm0,0x210(%rsp,%rax,1)
movaps %xmm0,0x220(%rsp,%rax,1)
movaps %xmm0,0x230(%rsp,%rax,1)
movaps %xmm0,0x240(%rsp,%rax,1)
movaps %xmm0,0x250(%rsp,%rax,1)
movaps %xmm0,0x260(%rsp,%rax,1)
movaps %xmm0,0x270(%rsp,%rax,1)
movaps %xmm0,0x280(%rsp,%rax,1)
movaps %xmm0,0x290(%rsp,%rax,1)
add    $0x320,%rax
cmp    $0x13880,%rax
jne    1110 <foo+0x10>
add    $0x13808,%rsp
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i32 100, i32* %1
store i32 100, i32* %2
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %3
%13 = mul nuw i64 %9, %11
%14 = alloca double, i64 %13
store i64 %9, i64* %4
store i64 %11, i64* %5
store i32 0, i32* %6
br label %15
15: ; preds = %47, %0
%16 = load i32, i32* %6
%17 = load i32, i32* %1
%18 = sub nsw i32 %17, 1
%19 = icmp sle i32 %16, %18
br i1 %19, label %20, label %50
20: ; preds = %15
store i32 0, i32* %7
br label %21
21: ; preds = %43, %20
%22 = load i32, i32* %7
%23 = load i32, i32* %2
%24 = sub nsw i32 %23, 1
%25 = icmp sle i32 %22, %24
br i1 %25, label %26, label %46
26: ; preds = %21
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = mul nsw i64 %28, %11
%30 = getelementptr inbounds double, double* %14, i64 %29
%31 = load i32, i32* %7
%32 = sub nsw i32 %31, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %30, i64 %33
%35 = load double, double* %34
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = mul nsw i64 %37, %11
%39 = getelementptr inbounds double, double* %14, i64 %38
%40 = load i32, i32* %7
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
store double %35, double* %42
br label %43
43: ; preds = %26
%44 = load i32, i32* %7
%45 = add nsw i32 %44, 1
store i32 %45, i32* %7
br label %21
46: ; preds = %21
br label %47
47: ; preds = %46
%48 = load i32, i32* %6
%49 = add nsw i32 %48, 1
store i32 %49, i32* %6
br label %15
50: ; preds = %15
%51 = load i8*, i8** %3
ret void
}

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