#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ abort();
void test_reductions(void) {
  const int n = 10;
  int i;
  float array[n];
  for (i = 0; i < n; i++)
    array[i] = i + 1;
  {
    float res, vres;
    res = (0);
#pragma acc parallel num_gangs(ng) copy(res)

#pragma acc loop gang reduction(+ : res)
    for (i = 0; i < n; i++)
      res = res + (array[i]);
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (1);
#pragma acc parallel num_gangs(ng) copy(res)

#pragma acc loop gang reduction(* : res)
    for (i = 0; i < n; i++)
      res = res * (array[i]);
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (0);
#pragma acc parallel num_workers(nw) copy(res)

#pragma acc loop worker reduction(+ : res)
    for (i = 0; i < n; i++)
      res = res + (array[i]);
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (1);
#pragma acc parallel num_workers(nw) copy(res)

#pragma acc loop worker reduction(* : res)
    for (i = 0; i < n; i++)
      res = res * (array[i]);
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (0);
#pragma acc parallel vector_length(vl) copy(res)

#pragma acc loop vector reduction(+ : res)
    for (i = 0; i < n; i++)
      res = res + (array[i]);
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (1);
#pragma acc parallel vector_length(vl) copy(res)

#pragma acc loop vector reduction(* : res)
    for (i = 0; i < n; i++)
      res = res * (array[i]);
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (0);
#pragma acc parallel num_gangs(ng) num_workers(nw) vector_length(vl) copy(res)

#pragma acc loop gang worker vector reduction(+ : res)
    for (i = 0; i < n; i++)
      res = res + (array[i]);
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (array[i]);
    if (res != vres)
      abort();
  };
  {
    float res, vres;
    res = (1);
#pragma acc parallel num_gangs(ng) num_workers(nw) vector_length(vl) copy(res)

#pragma acc loop gang worker vector reduction(* : res)
    for (i = 0; i < n; i++)
      res = res * (array[i]);
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (array[i]);
    if (res != vres)
      abort();
  };
}


x86 assembly (clang, -O0):
<test_reductions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0xa,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    115c <test_reductions+0x4c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
movslq -0x8(%rbp),%rax
movss  %xmm0,-0x80(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <test_reductions+0x20>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1197 <test_reductions+0x87>
movss  -0x14(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116b <test_reductions+0x5b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11d2 <test_reductions+0xc2>
movss  -0x18(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a6 <test_reductions+0x96>
movss  -0x14(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
jne    11ec <test_reductions+0xdc>
jp     11ec <test_reductions+0xdc>
jmp    11f3 <test_reductions+0xe3>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe05(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1233 <test_reductions+0x123>
movss  -0x1c(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1207 <test_reductions+0xf7>
movss  0xdc5(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1273 <test_reductions+0x163>
movss  -0x20(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1247 <test_reductions+0x137>
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
jne    128d <test_reductions+0x17d>
jp     128d <test_reductions+0x17d>
jmp    1294 <test_reductions+0x184>
mov    $0x0,%al
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    12cf <test_reductions+0x1bf>
movss  -0x24(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a3 <test_reductions+0x193>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    130a <test_reductions+0x1fa>
movss  -0x28(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12de <test_reductions+0x1ce>
movss  -0x24(%rbp),%xmm0
ucomiss -0x28(%rbp),%xmm0
jne    1324 <test_reductions+0x214>
jp     1324 <test_reductions+0x214>
jmp    132b <test_reductions+0x21b>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xccd(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    136b <test_reductions+0x25b>
movss  -0x2c(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    133f <test_reductions+0x22f>
movss  0xc8d(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    13ab <test_reductions+0x29b>
movss  -0x30(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    137f <test_reductions+0x26f>
movss  -0x2c(%rbp),%xmm0
ucomiss -0x30(%rbp),%xmm0
jne    13c5 <test_reductions+0x2b5>
jp     13c5 <test_reductions+0x2b5>
jmp    13cc <test_reductions+0x2bc>
mov    $0x0,%al
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1407 <test_reductions+0x2f7>
movss  -0x34(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13db <test_reductions+0x2cb>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1442 <test_reductions+0x332>
movss  -0x38(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1416 <test_reductions+0x306>
movss  -0x34(%rbp),%xmm0
ucomiss -0x38(%rbp),%xmm0
jne    145c <test_reductions+0x34c>
jp     145c <test_reductions+0x34c>
jmp    1463 <test_reductions+0x353>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xb95(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    14a3 <test_reductions+0x393>
movss  -0x3c(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1477 <test_reductions+0x367>
movss  0xb55(%rip),%xmm0
movss  %xmm0,-0x40(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    14e3 <test_reductions+0x3d3>
movss  -0x40(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14b7 <test_reductions+0x3a7>
movss  -0x3c(%rbp),%xmm0
ucomiss -0x40(%rbp),%xmm0
jne    14fd <test_reductions+0x3ed>
jp     14fd <test_reductions+0x3ed>
jmp    1504 <test_reductions+0x3f4>
mov    $0x0,%al
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    153f <test_reductions+0x42f>
movss  -0x44(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1513 <test_reductions+0x403>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    157a <test_reductions+0x46a>
movss  -0x48(%rbp),%xmm0
movslq -0x8(%rbp),%rax
addss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    154e <test_reductions+0x43e>
movss  -0x44(%rbp),%xmm0
ucomiss -0x48(%rbp),%xmm0
jne    1594 <test_reductions+0x484>
jp     1594 <test_reductions+0x484>
jmp    159b <test_reductions+0x48b>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xa5d(%rip),%xmm0
movss  %xmm0,-0x4c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    15db <test_reductions+0x4cb>
movss  -0x4c(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15af <test_reductions+0x49f>
movss  0xa1d(%rip),%xmm0
movss  %xmm0,-0x50(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    161b <test_reductions+0x50b>
movss  -0x50(%rbp),%xmm0
movslq -0x8(%rbp),%rax
mulss  -0x80(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15ef <test_reductions+0x4df>
movss  -0x4c(%rbp),%xmm0
ucomiss -0x50(%rbp),%xmm0
jne    1635 <test_reductions+0x525>
jp     1635 <test_reductions+0x525>
jmp    163c <test_reductions+0x52c>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reductions>:
ret

LLVM IR (-O0):
define void @test_reductions() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
store i32 10, i32* %1
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %3
%21 = alloca float, i64 10
store i32 0, i32* %2
br label %22
22: ; preds = %32, %0
%23 = load i32, i32* %2
%24 = icmp slt i32 %23, 10
br i1 %24, label %25, label %35
25: ; preds = %22
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
%28 = sitofp i32 %27 to float
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds float, float* %21, i64 %30
store float %28, float* %31
br label %32
32: ; preds = %25
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
br label %22
35: ; preds = %22
store float 0.000000e+00, float* %4
store i32 0, i32* %2
br label %36
36: ; preds = %46, %35
%37 = load i32, i32* %2
%38 = icmp slt i32 %37, 10
br i1 %38, label %39, label %49
39: ; preds = %36
%40 = load float, float* %4
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds float, float* %21, i64 %42
%44 = load float, float* %43
%45 = fadd float %40, %44
store float %45, float* %4
br label %46
46: ; preds = %39
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 1
store i32 %48, i32* %2
br label %36
49: ; preds = %36
store float 0.000000e+00, float* %5
store i32 0, i32* %2
br label %50
50: ; preds = %60, %49
%51 = load i32, i32* %2
%52 = icmp slt i32 %51, 10
br i1 %52, label %53, label %63
53: ; preds = %50
%54 = load float, float* %5
%55 = load i32, i32* %2
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds float, float* %21, i64 %56
%58 = load float, float* %57
%59 = fadd float %54, %58
store float %59, float* %5
br label %60
60: ; preds = %53
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
br label %50
63: ; preds = %50
%64 = load float, float* %4
%65 = load float, float* %5
%66 = fcmp une float %64, %65
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i32 (...) @abort()
unreachable
69: ; preds = %63
store float 1.000000e+00, float* %6
store i32 0, i32* %2
br label %70
70: ; preds = %80, %69
%71 = load i32, i32* %2
%72 = icmp slt i32 %71, 10
br i1 %72, label %73, label %83
73: ; preds = %70
%74 = load float, float* %6
%75 = load i32, i32* %2
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds float, float* %21, i64 %76
%78 = load float, float* %77
%79 = fmul float %74, %78
store float %79, float* %6
br label %80
80: ; preds = %73
%81 = load i32, i32* %2
%82 = add nsw i32 %81, 1
store i32 %82, i32* %2
br label %70
83: ; preds = %70
store float 1.000000e+00, float* %7
store i32 0, i32* %2
br label %84
84: ; preds = %94, %83
%85 = load i32, i32* %2
%86 = icmp slt i32 %85, 10
br i1 %86, label %87, label %97
87: ; preds = %84
%88 = load float, float* %7
%89 = load i32, i32* %2
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds float, float* %21, i64 %90
%92 = load float, float* %91
%93 = fmul float %88, %92
store float %93, float* %7
br label %94
94: ; preds = %87
%95 = load i32, i32* %2
%96 = add nsw i32 %95, 1
store i32 %96, i32* %2
br label %84
97: ; preds = %84
%98 = load float, float* %6
%99 = load float, float* %7
%100 = fcmp une float %98, %99
br i1 %100, label %101, label %103
101: ; preds = %97
%102 = call i32 (...) @abort()
unreachable
103: ; preds = %97
store float 0.000000e+00, float* %8
store i32 0, i32* %2
br label %104
104: ; preds = %114, %103
%105 = load i32, i32* %2
%106 = icmp slt i32 %105, 10
br i1 %106, label %107, label %117
107: ; preds = %104
%108 = load float, float* %8
%109 = load i32, i32* %2
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds float, float* %21, i64 %110
%112 = load float, float* %111
%113 = fadd float %108, %112
store float %113, float* %8
br label %114
114: ; preds = %107
%115 = load i32, i32* %2
%116 = add nsw i32 %115, 1
store i32 %116, i32* %2
br label %104
117: ; preds = %104
store float 0.000000e+00, float* %9
store i32 0, i32* %2
br label %118
118: ; preds = %128, %117
%119 = load i32, i32* %2
%120 = icmp slt i32 %119, 10
br i1 %120, label %121, label %131
121: ; preds = %118
%122 = load float, float* %9
%123 = load i32, i32* %2
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds float, float* %21, i64 %124
%126 = load float, float* %125
%127 = fadd float %122, %126
store float %127, float* %9
br label %128
128: ; preds = %121
%129 = load i32, i32* %2
%130 = add nsw i32 %129, 1
store i32 %130, i32* %2
br label %118
131: ; preds = %118
%132 = load float, float* %8
%133 = load float, float* %9
%134 = fcmp une float %132, %133
br i1 %134, label %135, label %137
135: ; preds = %131
%136 = call i32 (...) @abort()
unreachable
137: ; preds = %131
store float 1.000000e+00, float* %10
store i32 0, i32* %2
br label %138
138: ; preds = %148, %137
%139 = load i32, i32* %2
%140 = icmp slt i32 %139, 10
br i1 %140, label %141, label %151
141: ; preds = %138
%142 = load float, float* %10
%143 = load i32, i32* %2
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds float, float* %21, i64 %144
%146 = load float, float* %145
%147 = fmul float %142, %146
store float %147, float* %10
br label %148
148: ; preds = %141
%149 = load i32, i32* %2
%150 = add nsw i32 %149, 1
store i32 %150, i32* %2
br label %138
151: ; preds = %138
store float 1.000000e+00, float* %11
store i32 0, i32* %2
br label %152
152: ; preds = %162, %151
%153 = load i32, i32* %2
%154 = icmp slt i32 %153, 10
br i1 %154, label %155, label %165
155: ; preds = %152
%156 = load float, float* %11
%157 = load i32, i32* %2
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds float, float* %21, i64 %158
%160 = load float, float* %159
%161 = fmul float %156, %160
store float %161, float* %11
br label %162
162: ; preds = %155
%163 = load i32, i32* %2
%164 = add nsw i32 %163, 1
store i32 %164, i32* %2
br label %152
165: ; preds = %152
%166 = load float, float* %10
%167 = load float, float* %11
%168 = fcmp une float %166, %167
br i1 %168, label %169, label %171
169: ; preds = %165
%170 = call i32 (...) @abort()
unreachable
171: ; preds = %165
store float 0.000000e+00, float* %12
store i32 0, i32* %2
br label %172
172: ; preds = %182, %171
%173 = load i32, i32* %2
%174 = icmp slt i32 %173, 10
br i1 %174, label %175, label %185
175: ; preds = %172
%176 = load float, float* %12
%177 = load i32, i32* %2
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds float, float* %21, i64 %178
%180 = load float, float* %179
%181 = fadd float %176, %180
store float %181, float* %12
br label %182
182: ; preds = %175
%183 = load i32, i32* %2
%184 = add nsw i32 %183, 1
store i32 %184, i32* %2
br label %172
185: ; preds = %172
store float 0.000000e+00, float* %13
store i32 0, i32* %2
br label %186
186: ; preds = %196, %185
%187 = load i32, i32* %2
%188 = icmp slt i32 %187, 10
br i1 %188, label %189, label %199
189: ; preds = %186
%190 = load float, float* %13
%191 = load i32, i32* %2
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds float, float* %21, i64 %192
%194 = load float, float* %193
%195 = fadd float %190, %194
store float %195, float* %13
br label %196
196: ; preds = %189
%197 = load i32, i32* %2
%198 = add nsw i32 %197, 1
store i32 %198, i32* %2
br label %186
199: ; preds = %186
%200 = load float, float* %12
%201 = load float, float* %13
%202 = fcmp une float %200, %201
br i1 %202, label %203, label %205
203: ; preds = %199
%204 = call i32 (...) @abort()
unreachable
205: ; preds = %199
store float 1.000000e+00, float* %14
store i32 0, i32* %2
br label %206
206: ; preds = %216, %205
%207 = load i32, i32* %2
%208 = icmp slt i32 %207, 10
br i1 %208, label %209, label %219
209: ; preds = %206
%210 = load float, float* %14
%211 = load i32, i32* %2
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds float, float* %21, i64 %212
%214 = load float, float* %213
%215 = fmul float %210, %214
store float %215, float* %14
br label %216
216: ; preds = %209
%217 = load i32, i32* %2
%218 = add nsw i32 %217, 1
store i32 %218, i32* %2
br label %206
219: ; preds = %206
store float 1.000000e+00, float* %15
store i32 0, i32* %2
br label %220
220: ; preds = %230, %219
%221 = load i32, i32* %2
%222 = icmp slt i32 %221, 10
br i1 %222, label %223, label %233
223: ; preds = %220
%224 = load float, float* %15
%225 = load i32, i32* %2
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds float, float* %21, i64 %226
%228 = load float, float* %227
%229 = fmul float %224, %228
store float %229, float* %15
br label %230
230: ; preds = %223
%231 = load i32, i32* %2
%232 = add nsw i32 %231, 1
store i32 %232, i32* %2
br label %220
233: ; preds = %220
%234 = load float, float* %14
%235 = load float, float* %15
%236 = fcmp une float %234, %235
br i1 %236, label %237, label %239
237: ; preds = %233
%238 = call i32 (...) @abort()
unreachable
239: ; preds = %233
store float 0.000000e+00, float* %16
store i32 0, i32* %2
br label %240
240: ; preds = %250, %239
%241 = load i32, i32* %2
%242 = icmp slt i32 %241, 10
br i1 %242, label %243, label %253
243: ; preds = %240
%244 = load float, float* %16
%245 = load i32, i32* %2
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds float, float* %21, i64 %246
%248 = load float, float* %247
%249 = fadd float %244, %248
store float %249, float* %16
br label %250
250: ; preds = %243
%251 = load i32, i32* %2
%252 = add nsw i32 %251, 1
store i32 %252, i32* %2
br label %240
253: ; preds = %240
store float 0.000000e+00, float* %17
store i32 0, i32* %2
br label %254
254: ; preds = %264, %253
%255 = load i32, i32* %2
%256 = icmp slt i32 %255, 10
br i1 %256, label %257, label %267
257: ; preds = %254
%258 = load float, float* %17
%259 = load i32, i32* %2
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds float, float* %21, i64 %260
%262 = load float, float* %261
%263 = fadd float %258, %262
store float %263, float* %17
br label %264
264: ; preds = %257
%265 = load i32, i32* %2
%266 = add nsw i32 %265, 1
store i32 %266, i32* %2
br label %254
267: ; preds = %254
%268 = load float, float* %16
%269 = load float, float* %17
%270 = fcmp une float %268, %269
br i1 %270, label %271, label %273
271: ; preds = %267
%272 = call i32 (...) @abort()
unreachable
273: ; preds = %267
store float 1.000000e+00, float* %18
store i32 0, i32* %2
br label %274
274: ; preds = %284, %273
%275 = load i32, i32* %2
%276 = icmp slt i32 %275, 10
br i1 %276, label %277, label %287
277: ; preds = %274
%278 = load float, float* %18
%279 = load i32, i32* %2
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds float, float* %21, i64 %280
%282 = load float, float* %281
%283 = fmul float %278, %282
store float %283, float* %18
br label %284
284: ; preds = %277
%285 = load i32, i32* %2
%286 = add nsw i32 %285, 1
store i32 %286, i32* %2
br label %274
287: ; preds = %274
store float 1.000000e+00, float* %19
store i32 0, i32* %2
br label %288
288: ; preds = %298, %287
%289 = load i32, i32* %2
%290 = icmp slt i32 %289, 10
br i1 %290, label %291, label %301
291: ; preds = %288
%292 = load float, float* %19
%293 = load i32, i32* %2
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds float, float* %21, i64 %294
%296 = load float, float* %295
%297 = fmul float %292, %296
store float %297, float* %19
br label %298
298: ; preds = %291
%299 = load i32, i32* %2
%300 = add nsw i32 %299, 1
store i32 %300, i32* %2
br label %288
301: ; preds = %288
%302 = load float, float* %18
%303 = load float, float* %19
%304 = fcmp une float %302, %303
br i1 %304, label %305, label %307
305: ; preds = %301
%306 = call i32 (...) @abort()
unreachable
307: ; preds = %301
%308 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @test_reductions() {
ret void
}