void test_reductions(void) {
  const int n = 10;
  int i;
  double _Complex array[n];
  for (i = 0; i < n; i++)
    array[i] = i + 1;
  {
    double 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 + (creal(array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 * (creal(array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 + (creal(array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 * (creal(array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 + (creal(array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 * (creal(array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 + (creal(array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres + (creal(array[i]));
    if (res != vres)
      abort();
  };
  {
    double 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 * (creal(array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres * (creal(array[i]));
    if (res != vres)
      abort();
  };
}


x86 assembly (clang, -O0):
<test_reductions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0xa,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1170 <test_reductions+0x60>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <test_reductions+0x20>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11b7 <test_reductions+0xa7>
movsd  -0x18(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117f <test_reductions+0x6f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11fe <test_reductions+0xee>
movsd  -0x20(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c6 <test_reductions+0xb6>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1219 <test_reductions+0x109>
jp     1219 <test_reductions+0x109>
jmp    121e <test_reductions+0x10e>
call   1030 <abort@plt>
movsd  0xdda(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    126a <test_reductions+0x15a>
movsd  -0x28(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1232 <test_reductions+0x122>
movsd  0xd8e(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    12b6 <test_reductions+0x1a6>
movsd  -0x30(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    127e <test_reductions+0x16e>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jne    12d1 <test_reductions+0x1c1>
jp     12d1 <test_reductions+0x1c1>
jmp    12d6 <test_reductions+0x1c6>
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    131d <test_reductions+0x20d>
movsd  -0x38(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12e5 <test_reductions+0x1d5>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1364 <test_reductions+0x254>
movsd  -0x40(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    132c <test_reductions+0x21c>
movsd  -0x38(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    137f <test_reductions+0x26f>
jp     137f <test_reductions+0x26f>
jmp    1384 <test_reductions+0x274>
call   1030 <abort@plt>
movsd  0xc74(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    13d0 <test_reductions+0x2c0>
movsd  -0x48(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1398 <test_reductions+0x288>
movsd  0xc28(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    141c <test_reductions+0x30c>
movsd  -0x50(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13e4 <test_reductions+0x2d4>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jne    1437 <test_reductions+0x327>
jp     1437 <test_reductions+0x327>
jmp    143c <test_reductions+0x32c>
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1483 <test_reductions+0x373>
movsd  -0x58(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    144b <test_reductions+0x33b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    14ca <test_reductions+0x3ba>
movsd  -0x60(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1492 <test_reductions+0x382>
movsd  -0x58(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    14e5 <test_reductions+0x3d5>
jp     14e5 <test_reductions+0x3d5>
jmp    14ea <test_reductions+0x3da>
call   1030 <abort@plt>
movsd  0xb0e(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1536 <test_reductions+0x426>
movsd  -0x68(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14fe <test_reductions+0x3ee>
movsd  0xac2(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1582 <test_reductions+0x472>
movsd  -0x70(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    154a <test_reductions+0x43a>
movsd  -0x68(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jne    159d <test_reductions+0x48d>
jp     159d <test_reductions+0x48d>
jmp    15a2 <test_reductions+0x492>
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    15e9 <test_reductions+0x4d9>
movsd  -0x78(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15b1 <test_reductions+0x4a1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1630 <test_reductions+0x520>
movsd  -0x80(%rbp),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15f8 <test_reductions+0x4e8>
movsd  -0x78(%rbp),%xmm0
ucomisd -0x80(%rbp),%xmm0
jne    164b <test_reductions+0x53b>
jp     164b <test_reductions+0x53b>
jmp    1650 <test_reductions+0x540>
call   1030 <abort@plt>
movsd  0x9a8(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    16a5 <test_reductions+0x595>
movsd  -0x88(%rbp),%xmm0
ff
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1667 <test_reductions+0x557>
movsd  0x953(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    16fa <test_reductions+0x5ea>
movsd  -0x90(%rbp),%xmm0
ff
movslq -0x8(%rbp),%rcx
lea    -0x130(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    16bc <test_reductions+0x5ac>
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x90(%rbp),%xmm0
ff
jne    171b <test_reductions+0x60b>
jp     171b <test_reductions+0x60b>
jmp    1720 <test_reductions+0x610>
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x130,%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 double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store i32 10, i32* %1
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %3
%21 = alloca { double, double }, i64 10
store i32 0, i32* %2
br label %22
22: ; preds = %34, %0
%23 = load i32, i32* %2
%24 = icmp slt i32 %23, 10
br i1 %24, label %25, label %37
25: ; preds = %22
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
%28 = sitofp i32 %27 to double
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %30
%32 = getelementptr inbounds { double, double }, { double, double }* %31, i32 0, i32 0
%33 = getelementptr inbounds { double, double }, { double, double }* %31, i32 0, i32 1
store double %28, double* %32
store double 0.000000e+00, double* %33
br label %34
34: ; preds = %25
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %2
br label %22
37: ; preds = %22
store double 0.000000e+00, double* %4
store i32 0, i32* %2
br label %38
38: ; preds = %51, %37
%39 = load i32, i32* %2
%40 = icmp slt i32 %39, 10
br i1 %40, label %41, label %54
41: ; preds = %38
%42 = load double, double* %4
%43 = load i32, i32* %2
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %44
%46 = getelementptr inbounds { double, double }, { double, double }* %45, i32 0, i32 0
%47 = load double, double* %46
%48 = getelementptr inbounds { double, double }, { double, double }* %45, i32 0, i32 1
%49 = load double, double* %48
%50 = fadd double %42, %47
store double %50, double* %4
br label %51
51: ; preds = %41
%52 = load i32, i32* %2
%53 = add nsw i32 %52, 1
store i32 %53, i32* %2
br label %38
54: ; preds = %38
store double 0.000000e+00, double* %5
store i32 0, i32* %2
br label %55
55: ; preds = %68, %54
%56 = load i32, i32* %2
%57 = icmp slt i32 %56, 10
br i1 %57, label %58, label %71
58: ; preds = %55
%59 = load double, double* %5
%60 = load i32, i32* %2
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %61
%63 = getelementptr inbounds { double, double }, { double, double }* %62, i32 0, i32 0
%64 = load double, double* %63
%65 = getelementptr inbounds { double, double }, { double, double }* %62, i32 0, i32 1
%66 = load double, double* %65
%67 = fadd double %59, %64
store double %67, double* %5
br label %68
68: ; preds = %58
%69 = load i32, i32* %2
%70 = add nsw i32 %69, 1
store i32 %70, i32* %2
br label %55
71: ; preds = %55
%72 = load double, double* %4
%73 = load double, double* %5
%74 = fcmp une double %72, %73
br i1 %74, label %75, label %76
75: ; preds = %71
unreachable
76: ; preds = %71
store double 1.000000e+00, double* %6
store i32 0, i32* %2
br label %77
77: ; preds = %90, %76
%78 = load i32, i32* %2
%79 = icmp slt i32 %78, 10
br i1 %79, label %80, label %93
80: ; preds = %77
%81 = load double, double* %6
%82 = load i32, i32* %2
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %83
%85 = getelementptr inbounds { double, double }, { double, double }* %84, i32 0, i32 0
%86 = load double, double* %85
%87 = getelementptr inbounds { double, double }, { double, double }* %84, i32 0, i32 1
%88 = load double, double* %87
%89 = fmul double %81, %86
store double %89, double* %6
br label %90
90: ; preds = %80
%91 = load i32, i32* %2
%92 = add nsw i32 %91, 1
store i32 %92, i32* %2
br label %77
93: ; preds = %77
store double 1.000000e+00, double* %7
store i32 0, i32* %2
br label %94
94: ; preds = %107, %93
%95 = load i32, i32* %2
%96 = icmp slt i32 %95, 10
br i1 %96, label %97, label %110
97: ; preds = %94
%98 = load double, double* %7
%99 = load i32, i32* %2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %100
%102 = getelementptr inbounds { double, double }, { double, double }* %101, i32 0, i32 0
%103 = load double, double* %102
%104 = getelementptr inbounds { double, double }, { double, double }* %101, i32 0, i32 1
%105 = load double, double* %104
%106 = fmul double %98, %103
store double %106, double* %7
br label %107
107: ; preds = %97
%108 = load i32, i32* %2
%109 = add nsw i32 %108, 1
store i32 %109, i32* %2
br label %94
110: ; preds = %94
%111 = load double, double* %6
%112 = load double, double* %7
%113 = fcmp une double %111, %112
br i1 %113, label %114, label %115
114: ; preds = %110
unreachable
115: ; preds = %110
store double 0.000000e+00, double* %8
store i32 0, i32* %2
br label %116
116: ; preds = %129, %115
%117 = load i32, i32* %2
%118 = icmp slt i32 %117, 10
br i1 %118, label %119, label %132
119: ; preds = %116
%120 = load double, double* %8
%121 = load i32, i32* %2
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %122
%124 = getelementptr inbounds { double, double }, { double, double }* %123, i32 0, i32 0
%125 = load double, double* %124
%126 = getelementptr inbounds { double, double }, { double, double }* %123, i32 0, i32 1
%127 = load double, double* %126
%128 = fadd double %120, %125
store double %128, double* %8
br label %129
129: ; preds = %119
%130 = load i32, i32* %2
%131 = add nsw i32 %130, 1
store i32 %131, i32* %2
br label %116
132: ; preds = %116
store double 0.000000e+00, double* %9
store i32 0, i32* %2
br label %133
133: ; preds = %146, %132
%134 = load i32, i32* %2
%135 = icmp slt i32 %134, 10
br i1 %135, label %136, label %149
136: ; preds = %133
%137 = load double, double* %9
%138 = load i32, i32* %2
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %139
%141 = getelementptr inbounds { double, double }, { double, double }* %140, i32 0, i32 0
%142 = load double, double* %141
%143 = getelementptr inbounds { double, double }, { double, double }* %140, i32 0, i32 1
%144 = load double, double* %143
%145 = fadd double %137, %142
store double %145, double* %9
br label %146
146: ; preds = %136
%147 = load i32, i32* %2
%148 = add nsw i32 %147, 1
store i32 %148, i32* %2
br label %133
149: ; preds = %133
%150 = load double, double* %8
%151 = load double, double* %9
%152 = fcmp une double %150, %151
br i1 %152, label %153, label %154
153: ; preds = %149
unreachable
154: ; preds = %149
store double 1.000000e+00, double* %10
store i32 0, i32* %2
br label %155
155: ; preds = %168, %154
%156 = load i32, i32* %2
%157 = icmp slt i32 %156, 10
br i1 %157, label %158, label %171
158: ; preds = %155
%159 = load double, double* %10
%160 = load i32, i32* %2
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %161
%163 = getelementptr inbounds { double, double }, { double, double }* %162, i32 0, i32 0
%164 = load double, double* %163
%165 = getelementptr inbounds { double, double }, { double, double }* %162, i32 0, i32 1
%166 = load double, double* %165
%167 = fmul double %159, %164
store double %167, double* %10
br label %168
168: ; preds = %158
%169 = load i32, i32* %2
%170 = add nsw i32 %169, 1
store i32 %170, i32* %2
br label %155
171: ; preds = %155
store double 1.000000e+00, double* %11
store i32 0, i32* %2
br label %172
172: ; preds = %185, %171
%173 = load i32, i32* %2
%174 = icmp slt i32 %173, 10
br i1 %174, label %175, label %188
175: ; preds = %172
%176 = load double, double* %11
%177 = load i32, i32* %2
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %178
%180 = getelementptr inbounds { double, double }, { double, double }* %179, i32 0, i32 0
%181 = load double, double* %180
%182 = getelementptr inbounds { double, double }, { double, double }* %179, i32 0, i32 1
%183 = load double, double* %182
%184 = fmul double %176, %181
store double %184, double* %11
br label %185
185: ; preds = %175
%186 = load i32, i32* %2
%187 = add nsw i32 %186, 1
store i32 %187, i32* %2
br label %172
188: ; preds = %172
%189 = load double, double* %10
%190 = load double, double* %11
%191 = fcmp une double %189, %190
br i1 %191, label %192, label %193
192: ; preds = %188
unreachable
193: ; preds = %188
store double 0.000000e+00, double* %12
store i32 0, i32* %2
br label %194
194: ; preds = %207, %193
%195 = load i32, i32* %2
%196 = icmp slt i32 %195, 10
br i1 %196, label %197, label %210
197: ; preds = %194
%198 = load double, double* %12
%199 = load i32, i32* %2
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %200
%202 = getelementptr inbounds { double, double }, { double, double }* %201, i32 0, i32 0
%203 = load double, double* %202
%204 = getelementptr inbounds { double, double }, { double, double }* %201, i32 0, i32 1
%205 = load double, double* %204
%206 = fadd double %198, %203
store double %206, double* %12
br label %207
207: ; preds = %197
%208 = load i32, i32* %2
%209 = add nsw i32 %208, 1
store i32 %209, i32* %2
br label %194
210: ; preds = %194
store double 0.000000e+00, double* %13
store i32 0, i32* %2
br label %211
211: ; preds = %224, %210
%212 = load i32, i32* %2
%213 = icmp slt i32 %212, 10
br i1 %213, label %214, label %227
214: ; preds = %211
%215 = load double, double* %13
%216 = load i32, i32* %2
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %217
%219 = getelementptr inbounds { double, double }, { double, double }* %218, i32 0, i32 0
%220 = load double, double* %219
%221 = getelementptr inbounds { double, double }, { double, double }* %218, i32 0, i32 1
%222 = load double, double* %221
%223 = fadd double %215, %220
store double %223, double* %13
br label %224
224: ; preds = %214
%225 = load i32, i32* %2
%226 = add nsw i32 %225, 1
store i32 %226, i32* %2
br label %211
227: ; preds = %211
%228 = load double, double* %12
%229 = load double, double* %13
%230 = fcmp une double %228, %229
br i1 %230, label %231, label %232
231: ; preds = %227
unreachable
232: ; preds = %227
store double 1.000000e+00, double* %14
store i32 0, i32* %2
br label %233
233: ; preds = %246, %232
%234 = load i32, i32* %2
%235 = icmp slt i32 %234, 10
br i1 %235, label %236, label %249
236: ; preds = %233
%237 = load double, double* %14
%238 = load i32, i32* %2
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %239
%241 = getelementptr inbounds { double, double }, { double, double }* %240, i32 0, i32 0
%242 = load double, double* %241
%243 = getelementptr inbounds { double, double }, { double, double }* %240, i32 0, i32 1
%244 = load double, double* %243
%245 = fmul double %237, %242
store double %245, double* %14
br label %246
246: ; preds = %236
%247 = load i32, i32* %2
%248 = add nsw i32 %247, 1
store i32 %248, i32* %2
br label %233
249: ; preds = %233
store double 1.000000e+00, double* %15
store i32 0, i32* %2
br label %250
250: ; preds = %263, %249
%251 = load i32, i32* %2
%252 = icmp slt i32 %251, 10
br i1 %252, label %253, label %266
253: ; preds = %250
%254 = load double, double* %15
%255 = load i32, i32* %2
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %256
%258 = getelementptr inbounds { double, double }, { double, double }* %257, i32 0, i32 0
%259 = load double, double* %258
%260 = getelementptr inbounds { double, double }, { double, double }* %257, i32 0, i32 1
%261 = load double, double* %260
%262 = fmul double %254, %259
store double %262, double* %15
br label %263
263: ; preds = %253
%264 = load i32, i32* %2
%265 = add nsw i32 %264, 1
store i32 %265, i32* %2
br label %250
266: ; preds = %250
%267 = load double, double* %14
%268 = load double, double* %15
%269 = fcmp une double %267, %268
br i1 %269, label %270, label %271
270: ; preds = %266
unreachable
271: ; preds = %266
store double 0.000000e+00, double* %16
store i32 0, i32* %2
br label %272
272: ; preds = %285, %271
%273 = load i32, i32* %2
%274 = icmp slt i32 %273, 10
br i1 %274, label %275, label %288
275: ; preds = %272
%276 = load double, double* %16
%277 = load i32, i32* %2
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %278
%280 = getelementptr inbounds { double, double }, { double, double }* %279, i32 0, i32 0
%281 = load double, double* %280
%282 = getelementptr inbounds { double, double }, { double, double }* %279, i32 0, i32 1
%283 = load double, double* %282
%284 = fadd double %276, %281
store double %284, double* %16
br label %285
285: ; preds = %275
%286 = load i32, i32* %2
%287 = add nsw i32 %286, 1
store i32 %287, i32* %2
br label %272
288: ; preds = %272
store double 0.000000e+00, double* %17
store i32 0, i32* %2
br label %289
289: ; preds = %302, %288
%290 = load i32, i32* %2
%291 = icmp slt i32 %290, 10
br i1 %291, label %292, label %305
292: ; preds = %289
%293 = load double, double* %17
%294 = load i32, i32* %2
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %295
%297 = getelementptr inbounds { double, double }, { double, double }* %296, i32 0, i32 0
%298 = load double, double* %297
%299 = getelementptr inbounds { double, double }, { double, double }* %296, i32 0, i32 1
%300 = load double, double* %299
%301 = fadd double %293, %298
store double %301, double* %17
br label %302
302: ; preds = %292
%303 = load i32, i32* %2
%304 = add nsw i32 %303, 1
store i32 %304, i32* %2
br label %289
305: ; preds = %289
%306 = load double, double* %16
%307 = load double, double* %17
%308 = fcmp une double %306, %307
br i1 %308, label %309, label %310
309: ; preds = %305
unreachable
310: ; preds = %305
store double 1.000000e+00, double* %18
store i32 0, i32* %2
br label %311
311: ; preds = %324, %310
%312 = load i32, i32* %2
%313 = icmp slt i32 %312, 10
br i1 %313, label %314, label %327
314: ; preds = %311
%315 = load double, double* %18
%316 = load i32, i32* %2
%317 = sext i32 %316 to i64
%318 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %317
%319 = getelementptr inbounds { double, double }, { double, double }* %318, i32 0, i32 0
%320 = load double, double* %319
%321 = getelementptr inbounds { double, double }, { double, double }* %318, i32 0, i32 1
%322 = load double, double* %321
%323 = fmul double %315, %320
store double %323, double* %18
br label %324
324: ; preds = %314
%325 = load i32, i32* %2
%326 = add nsw i32 %325, 1
store i32 %326, i32* %2
br label %311
327: ; preds = %311
store double 1.000000e+00, double* %19
store i32 0, i32* %2
br label %328
328: ; preds = %341, %327
%329 = load i32, i32* %2
%330 = icmp slt i32 %329, 10
br i1 %330, label %331, label %344
331: ; preds = %328
%332 = load double, double* %19
%333 = load i32, i32* %2
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds { double, double }, { double, double }* %21, i64 %334
%336 = getelementptr inbounds { double, double }, { double, double }* %335, i32 0, i32 0
%337 = load double, double* %336
%338 = getelementptr inbounds { double, double }, { double, double }* %335, i32 0, i32 1
%339 = load double, double* %338
%340 = fmul double %332, %337
store double %340, double* %19
br label %341
341: ; preds = %331
%342 = load i32, i32* %2
%343 = add nsw i32 %342, 1
store i32 %343, i32* %2
br label %328
344: ; preds = %328
%345 = load double, double* %18
%346 = load double, double* %19
%347 = fcmp une double %345, %346
br i1 %347, label %348, label %349
348: ; preds = %344
unreachable
349: ; preds = %344
%350 = load i8*, i8** %3
ret void
}

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