int main() {
  int a = 1;
  int array[100];
  int i, j;
  for (i = 0; i < 100; i++) {
    array[i] = i;
  }
#pragma acc parallel loop private(a)
  for (i = 0; i < 10; i++) {
    a = i;
#pragma acc loop vector
    for (j = 0; j < 10; j++) {
      array[i * 10 + j] = j + a;
    }
  }
  for (j = 0; j < 10; j++) {
    if (array[20 + j] != 2 + j) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x64,-0x1a4(%rbp)
jge    1158 <main+0x58>
mov    -0x1a4(%rbp),%ecx
movslq -0x1a4(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1123 <main+0x23>
movl   $0x0,-0x1a4(%rbp)
cmpl   $0xa,-0x1a4(%rbp)
jge    11db <main+0xdb>
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x1a8(%rbp)
cmpl   $0xa,-0x1a8(%rbp)
jge    11c2 <main+0xc2>
mov    -0x1a8(%rbp),%ecx
add    -0x8(%rbp),%ecx
imul   $0xa,-0x1a4(%rbp),%eax
add    -0x1a8(%rbp),%eax
cltq
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1182 <main+0x82>
jmp    11c7 <main+0xc7>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1162 <main+0x62>
movl   $0x0,-0x1a8(%rbp)
cmpl   $0xa,-0x1a8(%rbp)
jge    123a <main+0x13a>
mov    -0x1a8(%rbp),%eax
add    $0x14,%eax
cltq
mov    -0x1a0(%rbp,%rax,4),%eax
mov    -0x1a8(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
je     1221 <main+0x121>
movl   $0x1,-0x4(%rbp)
jmp    1241 <main+0x141>
jmp    1226 <main+0x126>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    11e5 <main+0xe5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x118,%rsp
movaps 0xef2(%rip),%xmm0
movaps %xmm0,-0x80(%rsp)
movaps 0xef6(%rip),%xmm0
movaps %xmm0,-0x70(%rsp)
movaps 0xefa(%rip),%xmm0
movaps %xmm0,-0x60(%rsp)
movaps 0xefe(%rip),%xmm0
movaps %xmm0,-0x50(%rsp)
movaps 0xf02(%rip),%xmm0
movaps %xmm0,-0x40(%rsp)
movaps 0xf06(%rip),%xmm0
movaps %xmm0,-0x30(%rsp)
movaps 0xf0a(%rip),%xmm0
movaps %xmm0,-0x10(%rsp)
movaps 0xf0e(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xf13(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xf17(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xf1b(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xf1f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf23(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf27(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xf2b(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf2f(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xf30(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xf31(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xf32(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xf33(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xf34(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xf36(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xf37(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movdqa 0xf37(%rip),%xmm0
movdqa %xmm0,-0x20(%rsp)
pcmpeqd -0x20(%rsp),%xmm0
pcmpeqd %xmm1,%xmm1
pxor   %xmm0,%xmm1
pxor   %xmm0,%xmm0
packssdw %xmm1,%xmm0
pmovmskb %xmm0,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
add    $0x118,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %4
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 100
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %12
store i32 %10, i32* %13
br label %14
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %6
17: ; preds = %6
store i32 0, i32* %4
br label %18
18: ; preds = %40, %17
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %43
21: ; preds = %18
%22 = load i32, i32* %4
store i32 %22, i32* %2
store i32 0, i32* %5
br label %23
23: ; preds = %36, %21
%24 = load i32, i32* %5
%25 = icmp slt i32 %24, 10
br i1 %25, label %26, label %39
26: ; preds = %23
%27 = load i32, i32* %5
%28 = load i32, i32* %2
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %4
%31 = mul nsw i32 %30, 10
%32 = load i32, i32* %5
%33 = add nsw i32 %31, %32
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %34
store i32 %29, i32* %35
br label %36
36: ; preds = %26
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %23
39: ; preds = %23
br label %40
40: ; preds = %39
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %18
43: ; preds = %18
store i32 0, i32* %5
br label %44
44: ; preds = %58, %43
%45 = load i32, i32* %5
%46 = icmp slt i32 %45, 10
br i1 %46, label %47, label %61
47: ; preds = %44
%48 = load i32, i32* %5
%49 = add nsw i32 20, %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = load i32, i32* %5
%54 = add nsw i32 2, %53
%55 = icmp ne i32 %52, %54
br i1 %55, label %56, label %57
56: ; preds = %47
store i32 1, i32* %1
br label %62
57: ; preds = %47
br label %58
58: ; preds = %57
%59 = load i32, i32* %5
%60 = add nsw i32 %59, 1
store i32 %60, i32* %5
br label %44
61: ; preds = %44
store i32 0, i32* %1
br label %62
62: ; preds = %61, %56
%63 = load i32, i32* %1
ret i32 %63
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = bitcast [100 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %3
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %5
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 8
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, <4 x i32>* %7
%8 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 12
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, <4 x i32>* %9
%10 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 16
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %11
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 20
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, <4 x i32>* %13
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 24
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 24, i32 25, i32 26, i32 27>, <4 x i32>* %15
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 28
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 28, i32 29, i32 30, i32 31>, <4 x i32>* %17
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 32
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 32, i32 33, i32 34, i32 35>, <4 x i32>* %19
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 36
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 36, i32 37, i32 38, i32 39>, <4 x i32>* %21
%22 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 40
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 40, i32 41, i32 42, i32 43>, <4 x i32>* %23
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 44
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 44, i32 45, i32 46, i32 47>, <4 x i32>* %25
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 48
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 48, i32 49, i32 50, i32 51>, <4 x i32>* %27
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 52
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 52, i32 53, i32 54, i32 55>, <4 x i32>* %29
%30 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 56
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 56, i32 57, i32 58, i32 59>, <4 x i32>* %31
%32 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 60
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 60, i32 61, i32 62, i32 63>, <4 x i32>* %33
%34 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 64
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> <i32 64, i32 65, i32 66, i32 67>, <4 x i32>* %35
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 68
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> <i32 68, i32 69, i32 70, i32 71>, <4 x i32>* %37
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 72
%39 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> <i32 72, i32 73, i32 74, i32 75>, <4 x i32>* %39
%40 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 76
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 76, i32 77, i32 78, i32 79>, <4 x i32>* %41
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 80
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 80, i32 81, i32 82, i32 83>, <4 x i32>* %43
%44 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 84
%45 = bitcast i32* %44 to <4 x i32>*
store <4 x i32> <i32 84, i32 85, i32 86, i32 87>, <4 x i32>* %45
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 88
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> <i32 88, i32 89, i32 90, i32 91>, <4 x i32>* %47
%48 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 92
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> <i32 92, i32 93, i32 94, i32 95>, <4 x i32>* %49
%50 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 96
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 96, i32 97, i32 98, i32 99>, <4 x i32>* %51
%52 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 20
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 2, i32 3, i32 4, i32 5>, <4 x i32>* %53
%54 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 24
%55 = bitcast i32* %54 to <4 x i32>*
store <4 x i32> <i32 6, i32 7, i32 8, i32 9>, <4 x i32>* %55
%56 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 28
store i32 10, i32* %56
%57 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 29
store i32 11, i32* %57
%58 = bitcast i32* %52 to <8 x i32>*
%59 = load <8 x i32>, <8 x i32>* %58
%60 = freeze <8 x i32> %59
%61 = icmp ne <8 x i32> %60, <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9>
%62 = bitcast <8 x i1> %61 to i8
%63 = icmp ne i8 %62, 0
%64 = load i32, i32* %56
%65 = icmp ne i32 %64, 10
%66 = select i1 %63, i1 true, i1 %65
%67 = load i32, i32* %57
%68 = icmp ne i32 %67, 11
%69 = select i1 %66, i1 true, i1 %68
%70 = zext i1 %69 to i32
ret i32 %70
}