void test_reduction() {
  int i, x, y;
#pragma omp simd reduction(
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction()
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction( : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(,
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+:
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+ :)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+ :, y)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+ : x, + : y)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(% : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+ : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(* : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(- : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(& : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(| : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(^ : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(&& : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(|| : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(max : x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(min : x)
  for (i = 0; i < 16; ++i)
    ;
  struct X {
    int x;
  };
  struct X X;
#pragma omp simd reduction(+ : X.x)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp simd reduction(+ : x + x)
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_reduction>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_reduction+0x28>
jmp    111a <test_reduction+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_reduction+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_reduction+0x4c>
jmp    113e <test_reduction+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_reduction+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_reduction+0x70>
jmp    1162 <test_reduction+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_reduction+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_reduction+0x94>
jmp    1186 <test_reduction+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_reduction+0x77>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11b8 <test_reduction+0xb8>
jmp    11aa <test_reduction+0xaa>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    119b <test_reduction+0x9b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11dc <test_reduction+0xdc>
jmp    11ce <test_reduction+0xce>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11bf <test_reduction+0xbf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1200 <test_reduction+0x100>
jmp    11f2 <test_reduction+0xf2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11e3 <test_reduction+0xe3>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1224 <test_reduction+0x124>
jmp    1216 <test_reduction+0x116>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1207 <test_reduction+0x107>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1248 <test_reduction+0x148>
jmp    123a <test_reduction+0x13a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    122b <test_reduction+0x12b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    126c <test_reduction+0x16c>
jmp    125e <test_reduction+0x15e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    124f <test_reduction+0x14f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1290 <test_reduction+0x190>
jmp    1282 <test_reduction+0x182>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1273 <test_reduction+0x173>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    12b4 <test_reduction+0x1b4>
jmp    12a6 <test_reduction+0x1a6>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1297 <test_reduction+0x197>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    12d8 <test_reduction+0x1d8>
jmp    12ca <test_reduction+0x1ca>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12bb <test_reduction+0x1bb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    12fc <test_reduction+0x1fc>
jmp    12ee <test_reduction+0x1ee>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12df <test_reduction+0x1df>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1320 <test_reduction+0x220>
jmp    1312 <test_reduction+0x212>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1303 <test_reduction+0x203>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1344 <test_reduction+0x244>
jmp    1336 <test_reduction+0x236>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1327 <test_reduction+0x227>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1368 <test_reduction+0x268>
jmp    135a <test_reduction+0x25a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    134b <test_reduction+0x24b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    138c <test_reduction+0x28c>
jmp    137e <test_reduction+0x27e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    136f <test_reduction+0x26f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    13b0 <test_reduction+0x2b0>
jmp    13a2 <test_reduction+0x2a2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1393 <test_reduction+0x293>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    13d4 <test_reduction+0x2d4>
jmp    13c6 <test_reduction+0x2c6>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13b7 <test_reduction+0x2b7>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    13f8 <test_reduction+0x2f8>
jmp    13ea <test_reduction+0x2ea>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13db <test_reduction+0x2db>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    141c <test_reduction+0x31c>
jmp    140e <test_reduction+0x30e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13ff <test_reduction+0x2ff>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1440 <test_reduction+0x340>
jmp    1432 <test_reduction+0x332>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1423 <test_reduction+0x323>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.X = type { i32 }
define void @test_reduction() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.X
store i32 0, i32* %1
br label %5
5: ; preds = %9, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %12
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %5
12: ; preds = %5
store i32 0, i32* %1
br label %13
13: ; preds = %17, %12
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 16
br i1 %15, label %16, label %20
16: ; preds = %13
br label %17
17: ; preds = %16
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %13
20: ; preds = %13
store i32 0, i32* %1
br label %21
21: ; preds = %25, %20
%22 = load i32, i32* %1
%23 = icmp slt i32 %22, 16
br i1 %23, label %24, label %28
24: ; preds = %21
br label %25
25: ; preds = %24
%26 = load i32, i32* %1
%27 = add nsw i32 %26, 1
store i32 %27, i32* %1
br label %21
28: ; preds = %21
store i32 0, i32* %1
br label %29
29: ; preds = %33, %28
%30 = load i32, i32* %1
%31 = icmp slt i32 %30, 16
br i1 %31, label %32, label %36
32: ; preds = %29
br label %33
33: ; preds = %32
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 1
store i32 %35, i32* %1
br label %29
36: ; preds = %29
store i32 0, i32* %1
br label %37
37: ; preds = %41, %36
%38 = load i32, i32* %1
%39 = icmp slt i32 %38, 16
br i1 %39, label %40, label %44
40: ; preds = %37
br label %41
41: ; preds = %40
%42 = load i32, i32* %1
%43 = add nsw i32 %42, 1
store i32 %43, i32* %1
br label %37
44: ; preds = %37
store i32 0, i32* %1
br label %45
45: ; preds = %49, %44
%46 = load i32, i32* %1
%47 = icmp slt i32 %46, 16
br i1 %47, label %48, label %52
48: ; preds = %45
br label %49
49: ; preds = %48
%50 = load i32, i32* %1
%51 = add nsw i32 %50, 1
store i32 %51, i32* %1
br label %45
52: ; preds = %45
store i32 0, i32* %1
br label %53
53: ; preds = %57, %52
%54 = load i32, i32* %1
%55 = icmp slt i32 %54, 16
br i1 %55, label %56, label %60
56: ; preds = %53
br label %57
57: ; preds = %56
%58 = load i32, i32* %1
%59 = add nsw i32 %58, 1
store i32 %59, i32* %1
br label %53
60: ; preds = %53
store i32 0, i32* %1
br label %61
61: ; preds = %65, %60
%62 = load i32, i32* %1
%63 = icmp slt i32 %62, 16
br i1 %63, label %64, label %68
64: ; preds = %61
br label %65
65: ; preds = %64
%66 = load i32, i32* %1
%67 = add nsw i32 %66, 1
store i32 %67, i32* %1
br label %61
68: ; preds = %61
store i32 0, i32* %1
br label %69
69: ; preds = %73, %68
%70 = load i32, i32* %1
%71 = icmp slt i32 %70, 16
br i1 %71, label %72, label %76
72: ; preds = %69
br label %73
73: ; preds = %72
%74 = load i32, i32* %1
%75 = add nsw i32 %74, 1
store i32 %75, i32* %1
br label %69
76: ; preds = %69
store i32 0, i32* %1
br label %77
77: ; preds = %81, %76
%78 = load i32, i32* %1
%79 = icmp slt i32 %78, 16
br i1 %79, label %80, label %84
80: ; preds = %77
br label %81
81: ; preds = %80
%82 = load i32, i32* %1
%83 = add nsw i32 %82, 1
store i32 %83, i32* %1
br label %77
84: ; preds = %77
store i32 0, i32* %1
br label %85
85: ; preds = %89, %84
%86 = load i32, i32* %1
%87 = icmp slt i32 %86, 16
br i1 %87, label %88, label %92
88: ; preds = %85
br label %89
89: ; preds = %88
%90 = load i32, i32* %1
%91 = add nsw i32 %90, 1
store i32 %91, i32* %1
br label %85
92: ; preds = %85
store i32 0, i32* %1
br label %93
93: ; preds = %97, %92
%94 = load i32, i32* %1
%95 = icmp slt i32 %94, 16
br i1 %95, label %96, label %100
96: ; preds = %93
br label %97
97: ; preds = %96
%98 = load i32, i32* %1
%99 = add nsw i32 %98, 1
store i32 %99, i32* %1
br label %93
100: ; preds = %93
store i32 0, i32* %1
br label %101
101: ; preds = %105, %100
%102 = load i32, i32* %1
%103 = icmp slt i32 %102, 16
br i1 %103, label %104, label %108
104: ; preds = %101
br label %105
105: ; preds = %104
%106 = load i32, i32* %1
%107 = add nsw i32 %106, 1
store i32 %107, i32* %1
br label %101
108: ; preds = %101
store i32 0, i32* %1
br label %109
109: ; preds = %113, %108
%110 = load i32, i32* %1
%111 = icmp slt i32 %110, 16
br i1 %111, label %112, label %116
112: ; preds = %109
br label %113
113: ; preds = %112
%114 = load i32, i32* %1
%115 = add nsw i32 %114, 1
store i32 %115, i32* %1
br label %109
116: ; preds = %109
store i32 0, i32* %1
br label %117
117: ; preds = %121, %116
%118 = load i32, i32* %1
%119 = icmp slt i32 %118, 16
br i1 %119, label %120, label %124
120: ; preds = %117
br label %121
121: ; preds = %120
%122 = load i32, i32* %1
%123 = add nsw i32 %122, 1
store i32 %123, i32* %1
br label %117
124: ; preds = %117
store i32 0, i32* %1
br label %125
125: ; preds = %129, %124
%126 = load i32, i32* %1
%127 = icmp slt i32 %126, 16
br i1 %127, label %128, label %132
128: ; preds = %125
br label %129
129: ; preds = %128
%130 = load i32, i32* %1
%131 = add nsw i32 %130, 1
store i32 %131, i32* %1
br label %125
132: ; preds = %125
store i32 0, i32* %1
br label %133
133: ; preds = %137, %132
%134 = load i32, i32* %1
%135 = icmp slt i32 %134, 16
br i1 %135, label %136, label %140
136: ; preds = %133
br label %137
137: ; preds = %136
%138 = load i32, i32* %1
%139 = add nsw i32 %138, 1
store i32 %139, i32* %1
br label %133
140: ; preds = %133
store i32 0, i32* %1
br label %141
141: ; preds = %145, %140
%142 = load i32, i32* %1
%143 = icmp slt i32 %142, 16
br i1 %143, label %144, label %148
144: ; preds = %141
br label %145
145: ; preds = %144
%146 = load i32, i32* %1
%147 = add nsw i32 %146, 1
store i32 %147, i32* %1
br label %141
148: ; preds = %141
store i32 0, i32* %1
br label %149
149: ; preds = %153, %148
%150 = load i32, i32* %1
%151 = icmp slt i32 %150, 16
br i1 %151, label %152, label %156
152: ; preds = %149
br label %153
153: ; preds = %152
%154 = load i32, i32* %1
%155 = add nsw i32 %154, 1
store i32 %155, i32* %1
br label %149
156: ; preds = %149
store i32 0, i32* %1
br label %157
157: ; preds = %161, %156
%158 = load i32, i32* %1
%159 = icmp slt i32 %158, 16
br i1 %159, label %160, label %164
160: ; preds = %157
br label %161
161: ; preds = %160
%162 = load i32, i32* %1
%163 = add nsw i32 %162, 1
store i32 %163, i32* %1
br label %157
164: ; preds = %157
store i32 0, i32* %1
br label %165
165: ; preds = %169, %164
%166 = load i32, i32* %1
%167 = icmp slt i32 %166, 16
br i1 %167, label %168, label %172
168: ; preds = %165
br label %169
169: ; preds = %168
%170 = load i32, i32* %1
%171 = add nsw i32 %170, 1
store i32 %171, i32* %1
br label %165
172: ; preds = %165
store i32 0, i32* %1
br label %173
173: ; preds = %177, %172
%174 = load i32, i32* %1
%175 = icmp slt i32 %174, 16
br i1 %175, label %176, label %180
176: ; preds = %173
br label %177
177: ; preds = %176
%178 = load i32, i32* %1
%179 = add nsw i32 %178, 1
store i32 %179, i32* %1
br label %173
180: ; preds = %173
store i32 0, i32* %1
br label %181
181: ; preds = %185, %180
%182 = load i32, i32* %1
%183 = icmp slt i32 %182, 16
br i1 %183, label %184, label %188
184: ; preds = %181
br label %185
185: ; preds = %184
%186 = load i32, i32* %1
%187 = add nsw i32 %186, 1
store i32 %187, i32* %1
br label %181
188: ; preds = %181
ret void
}

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