int main(void) {
  int i;
  float result, array[1000];
  int lresult;
#pragma acc parallel
#pragma acc loop gang worker vector reduction(+ : result)
  for (i = 0; i < 1000; i++)
    result += array[i];
#pragma acc parallel
#pragma acc loop gang worker vector reduction(* : result)
  for (i = 0; i < 1000; i++)
    result *= array[i];
#pragma acc parallel
#pragma acc loop gang worker vector reduction(max : result)
  for (i = 0; i < 1000; i++)
    result = result > array[i] ? result : array[i];
#pragma acc parallel
#pragma acc loop gang worker vector reduction(min : result)
  for (i = 0; i < 1000; i++)
    result = result < array[i] ? result : array[i];
#pragma acc parallel
#pragma acc loop gang worker vector reduction(&& : lresult)
  for (i = 0; i < 1000; i++)
    lresult = lresult && (result > array[i]);
#pragma acc parallel
#pragma acc loop gang worker vector reduction(|| : lresult)
  for (i = 0; i < 1000; i++)
    lresult = lresult || (result > array[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    114b <main+0x4b>
movslq -0x8(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1184 <main+0x84>
movslq -0x8(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <main+0x52>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    11f1 <main+0xf1>
movss  -0xc(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomiss -0xfb0(%rbp,%rax,4),%xmm0
ff
jbe    11c1 <main+0xc1>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xfb8(%rbp)
ff
jmp    11d6 <main+0xd6>
movslq -0x8(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0xfb8(%rbp)
ff
movss  -0xfb8(%rbp),%xmm0
ff
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118b <main+0x8b>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1262 <main+0x162>
movss  -0xc(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
ucomiss %xmm1,%xmm0
jbe    1232 <main+0x132>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xfbc(%rbp)
ff
jmp    1247 <main+0x147>
movslq -0x8(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0xfbc(%rbp)
ff
movss  -0xfbc(%rbp),%xmm0
ff
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f8 <main+0xf8>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    12c4 <main+0x1c4>
xor    %eax,%eax
cmpl   $0x0,-0xfb4(%rbp)
mov    %al,-0xfbd(%rbp)
je     12a5 <main+0x1a5>
movss  -0xc(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomiss -0xfb0(%rbp,%rax,4),%xmm0
ff
seta   %al
mov    %al,-0xfbd(%rbp)
mov    -0xfbd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xfb4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1269 <main+0x169>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1326 <main+0x226>
mov    $0x1,%al
cmpl   $0x0,-0xfb4(%rbp)
mov    %al,-0xfbe(%rbp)
jne    1307 <main+0x207>
movss  -0xc(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomiss -0xfb0(%rbp,%rax,4),%xmm0
ff
seta   %al
mov    %al,-0xfbe(%rbp)
mov    -0xfbe(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xfb4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12cb <main+0x1cb>
xor    %eax,%eax
add    $0xf40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca [1000 x float]
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %6
6: ; preds = %16, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1000
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %11
%13 = load float, float* %12
%14 = load float, float* %3
%15 = fadd float %14, %13
store float %15, float* %3
br label %16
16: ; preds = %9
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %6
19: ; preds = %6
store i32 0, i32* %2
br label %20
20: ; preds = %30, %19
%21 = load i32, i32* %2
%22 = icmp slt i32 %21, 1000
br i1 %22, label %23, label %33
23: ; preds = %20
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %25
%27 = load float, float* %26
%28 = load float, float* %3
%29 = fmul float %28, %27
store float %29, float* %3
br label %30
30: ; preds = %23
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %20
33: ; preds = %20
store i32 0, i32* %2
br label %34
34: ; preds = %53, %33
%35 = load i32, i32* %2
%36 = icmp slt i32 %35, 1000
br i1 %36, label %37, label %56
37: ; preds = %34
%38 = load float, float* %3
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %40
%42 = load float, float* %41
%43 = fcmp ogt float %38, %42
br i1 %43, label %44, label %46
44: ; preds = %37
%45 = load float, float* %3
br label %51
46: ; preds = %37
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %48
%50 = load float, float* %49
br label %51
51: ; preds = %46, %44
%52 = phi float [ %45, %44 ], [ %50, %46 ]
store float %52, float* %3
br label %53
53: ; preds = %51
%54 = load i32, i32* %2
%55 = add nsw i32 %54, 1
store i32 %55, i32* %2
br label %34
56: ; preds = %34
store i32 0, i32* %2
br label %57
57: ; preds = %76, %56
%58 = load i32, i32* %2
%59 = icmp slt i32 %58, 1000
br i1 %59, label %60, label %79
60: ; preds = %57
%61 = load float, float* %3
%62 = load i32, i32* %2
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %63
%65 = load float, float* %64
%66 = fcmp olt float %61, %65
br i1 %66, label %67, label %69
67: ; preds = %60
%68 = load float, float* %3
br label %74
69: ; preds = %60
%70 = load i32, i32* %2
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %71
%73 = load float, float* %72
br label %74
74: ; preds = %69, %67
%75 = phi float [ %68, %67 ], [ %73, %69 ]
store float %75, float* %3
br label %76
76: ; preds = %74
%77 = load i32, i32* %2
%78 = add nsw i32 %77, 1
store i32 %78, i32* %2
br label %57
79: ; preds = %57
store i32 0, i32* %2
br label %80
80: ; preds = %96, %79
%81 = load i32, i32* %2
%82 = icmp slt i32 %81, 1000
br i1 %82, label %83, label %99
83: ; preds = %80
%84 = load i32, i32* %5
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %93
86: ; preds = %83
%87 = load float, float* %3
%88 = load i32, i32* %2
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %89
%91 = load float, float* %90
%92 = fcmp ogt float %87, %91
br label %93
93: ; preds = %86, %83
%94 = phi i1 [ false, %83 ], [ %92, %86 ]
%95 = zext i1 %94 to i32
store i32 %95, i32* %5
br label %96
96: ; preds = %93
%97 = load i32, i32* %2
%98 = add nsw i32 %97, 1
store i32 %98, i32* %2
br label %80
99: ; preds = %80
store i32 0, i32* %2
br label %100
100: ; preds = %116, %99
%101 = load i32, i32* %2
%102 = icmp slt i32 %101, 1000
br i1 %102, label %103, label %119
103: ; preds = %100
%104 = load i32, i32* %5
%105 = icmp ne i32 %104, 0
br i1 %105, label %113, label %106
106: ; preds = %103
%107 = load float, float* %3
%108 = load i32, i32* %2
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %109
%111 = load float, float* %110
%112 = fcmp ogt float %107, %111
br label %113
113: ; preds = %106, %103
%114 = phi i1 [ true, %103 ], [ %112, %106 ]
%115 = zext i1 %114 to i32
store i32 %115, i32* %5
br label %116
116: ; preds = %113
%117 = load i32, i32* %2
%118 = add nsw i32 %117, 1
store i32 %118, i32* %2
br label %100
119: ; preds = %100
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}