1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs
2 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=OMP
3 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple x86_64-apple-darwin13.4.0 -emit-pch -o %t.0 %s
4 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -std=c++11 -include-pch %t.0 -fsyntax-only -verify %s -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - | FileCheck %s --check-prefix=OMP
5 
6 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -fopenmp-enable-irbuilder -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=OMP_IRB
7 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -fopenmp-enable-irbuilder -x c++ -std=c++11 -triple x86_64-apple-darwin13.4.0 -emit-pch -o %t.1 %s
8 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -fopenmp-enable-irbuilder -std=c++11 -include-pch %t.1 -fsyntax-only -verify %s -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - | FileCheck %s --check-prefix=OMP_IRB
9 
10 // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=OMP_SIMD
11 // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -triple x86_64-apple-darwin13.4.0 -emit-pch -o %t.2 %s
12 // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -std=c++11 -include-pch %t.2 -fsyntax-only -verify %s -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - | FileCheck %s --check-prefix=OMP_SIMD
13 
14 // RUN: %clang_cc1 -verify -fopenmp -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=OMP
15 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-apple-darwin13.4.0 -emit-pch -o %t.3 %s
16 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t.3 -fsyntax-only -verify %s -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - | FileCheck %s --check-prefix=OMP
17 
18 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-enable-irbuilder -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=OMP_IRB
19 // RUN: %clang_cc1 -fopenmp -fopenmp-enable-irbuilder -x c++ -std=c++11 -triple x86_64-apple-darwin13.4.0 -emit-pch -o %t.4 %s
20 // RUN: %clang_cc1 -fopenmp -fopenmp-enable-irbuilder -std=c++11 -include-pch %t.4 -fsyntax-only -verify %s -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - | FileCheck %s --check-prefix=OMP_IRB
21 
22 // RUN: %clang_cc1 -verify -fopenmp-simd -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=OMP_SIMD
23 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-apple-darwin13.4.0 -emit-pch -o %t.5 %s
24 // RUN: %clang_cc1 -fopenmp-simd -std=c++11 -include-pch %t.5 -fsyntax-only -verify %s -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - | FileCheck %s --check-prefix=OMP_SIMD
25 
26 // expected-no-diagnostics
27 #ifndef HEADER
28 #define HEADER
29 
30 float flag;
31 int main (int argc, char **argv) {
32 #pragma omp parallel
33 {
34 #pragma omp cancel parallel if(flag)
35   argv[0][0] = argc;
36 #pragma omp barrier
37   argv[0][0] += argc;
38 }
39 #pragma omp sections
40 {
41 #pragma omp cancel sections
42 }
43 #pragma omp sections
44 {
45 #pragma omp cancel sections
46 #pragma omp section
47   {
48 #pragma omp cancel sections
49   }
50 }
51 #pragma omp for
52 for (int i = 0; i < argc; ++i) {
53 #pragma omp cancel for if(cancel: flag)
54 }
55 #pragma omp task
56 {
57 #pragma omp cancel taskgroup
58 }
59 #pragma omp parallel sections
60 {
61 #pragma omp cancel sections
62 }
63 #pragma omp parallel sections
64 {
65 #pragma omp cancel sections
66 #pragma omp section
67   {
68 #pragma omp cancel sections
69   }
70 }
71 int r = 0;
72 #pragma omp parallel for reduction(+: r)
73 for (int i = 0; i < argc; ++i) {
74 #pragma omp cancel for
75   r += i;
76 }
77   return argc;
78 }
79 
80 #endif
81 // OMP-LABEL: @main(
82 // OMP-NEXT:  entry:
83 // OMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
84 // OMP-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32, align 4
85 // OMP-NEXT:    [[ARGV_ADDR:%.*]] = alloca i8**, align 8
86 // OMP-NEXT:    [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
87 // OMP-NEXT:    [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
88 // OMP-NEXT:    [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
89 // OMP-NEXT:    [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
90 // OMP-NEXT:    [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
91 // OMP-NEXT:    [[DOTOMP_SECTIONS_LB_1:%.*]] = alloca i32, align 4
92 // OMP-NEXT:    [[DOTOMP_SECTIONS_UB_2:%.*]] = alloca i32, align 4
93 // OMP-NEXT:    [[DOTOMP_SECTIONS_ST_3:%.*]] = alloca i32, align 4
94 // OMP-NEXT:    [[DOTOMP_SECTIONS_IL_4:%.*]] = alloca i32, align 4
95 // OMP-NEXT:    [[DOTOMP_SECTIONS_IV_5:%.*]] = alloca i32, align 4
96 // OMP-NEXT:    [[DOTOMP_IV:%.*]] = alloca i32, align 4
97 // OMP-NEXT:    [[TMP:%.*]] = alloca i32, align 4
98 // OMP-NEXT:    [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
99 // OMP-NEXT:    [[DOTCAPTURE_EXPR_21:%.*]] = alloca i32, align 4
100 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
101 // OMP-NEXT:    [[DOTOMP_LB:%.*]] = alloca i32, align 4
102 // OMP-NEXT:    [[DOTOMP_UB:%.*]] = alloca i32, align 4
103 // OMP-NEXT:    [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
104 // OMP-NEXT:    [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
105 // OMP-NEXT:    [[I24:%.*]] = alloca i32, align 4
106 // OMP-NEXT:    [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
107 // OMP-NEXT:    [[R:%.*]] = alloca i32, align 4
108 // OMP-NEXT:    [[TMP0:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
109 // OMP-NEXT:    store i32 0, i32* [[RETVAL]], align 4
110 // OMP-NEXT:    store i32 [[ARGC:%.*]], i32* [[ARGC_ADDR]], align 4
111 // OMP-NEXT:    store i8** [[ARGV:%.*]], i8*** [[ARGV_ADDR]], align 8
112 // OMP-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i8***, i32*)* @.omp_outlined. to void (i32*, i32*, ...)*), i8*** [[ARGV_ADDR]], i32* [[ARGC_ADDR]])
113 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
114 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_UB_]], align 4
115 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
116 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
117 // OMP-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[TMP0]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
118 // OMP-NEXT:    [[TMP1:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
119 // OMP-NEXT:    [[TMP2:%.*]] = icmp slt i32 [[TMP1]], 0
120 // OMP-NEXT:    [[TMP3:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 0
121 // OMP-NEXT:    store i32 [[TMP3]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
122 // OMP-NEXT:    [[TMP4:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
123 // OMP-NEXT:    store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
124 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
125 // OMP:       omp.inner.for.cond:
126 // OMP-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
127 // OMP-NEXT:    [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
128 // OMP-NEXT:    [[CMP:%.*]] = icmp sle i32 [[TMP5]], [[TMP6]]
129 // OMP-NEXT:    br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
130 // OMP:       omp.inner.for.body:
131 // OMP-NEXT:    [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
132 // OMP-NEXT:    switch i32 [[TMP7]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
133 // OMP-NEXT:    i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
134 // OMP-NEXT:    ]
135 // OMP:       .omp.sections.case:
136 // OMP-NEXT:    [[TMP8:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 3)
137 // OMP-NEXT:    [[TMP9:%.*]] = icmp ne i32 [[TMP8]], 0
138 // OMP-NEXT:    br i1 [[TMP9]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
139 // OMP:       .cancel.exit:
140 // OMP-NEXT:    br label [[CANCEL_EXIT:%.*]]
141 // OMP:       .cancel.continue:
142 // OMP-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
143 // OMP:       .omp.sections.exit:
144 // OMP-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
145 // OMP:       omp.inner.for.inc:
146 // OMP-NEXT:    [[TMP10:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
147 // OMP-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP10]], 1
148 // OMP-NEXT:    store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
149 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND]]
150 // OMP:       omp.inner.for.end:
151 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]])
152 // OMP-NEXT:    br label [[CANCEL_CONT:%.*]]
153 // OMP:       cancel.cont:
154 // OMP-NEXT:    call void @__kmpc_barrier(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 [[TMP0]])
155 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_LB_1]], align 4
156 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_UB_2]], align 4
157 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_ST_3]], align 4
158 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_IL_4]], align 4
159 // OMP-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]], i32 34, i32* [[DOTOMP_SECTIONS_IL_4]], i32* [[DOTOMP_SECTIONS_LB_1]], i32* [[DOTOMP_SECTIONS_UB_2]], i32* [[DOTOMP_SECTIONS_ST_3]], i32 1, i32 1)
160 // OMP-NEXT:    [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_2]], align 4
161 // OMP-NEXT:    [[TMP12:%.*]] = icmp slt i32 [[TMP11]], 1
162 // OMP-NEXT:    [[TMP13:%.*]] = select i1 [[TMP12]], i32 [[TMP11]], i32 1
163 // OMP-NEXT:    store i32 [[TMP13]], i32* [[DOTOMP_SECTIONS_UB_2]], align 4
164 // OMP-NEXT:    [[TMP14:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_1]], align 4
165 // OMP-NEXT:    store i32 [[TMP14]], i32* [[DOTOMP_SECTIONS_IV_5]], align 4
166 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND6:%.*]]
167 // OMP:       omp.inner.for.cond6:
168 // OMP-NEXT:    [[TMP15:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_5]], align 4
169 // OMP-NEXT:    [[TMP16:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_2]], align 4
170 // OMP-NEXT:    [[CMP7:%.*]] = icmp sle i32 [[TMP15]], [[TMP16]]
171 // OMP-NEXT:    br i1 [[CMP7]], label [[OMP_INNER_FOR_BODY8:%.*]], label [[OMP_INNER_FOR_END18:%.*]]
172 // OMP:       omp.inner.for.body8:
173 // OMP-NEXT:    [[TMP17:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_5]], align 4
174 // OMP-NEXT:    switch i32 [[TMP17]], label [[DOTOMP_SECTIONS_EXIT15:%.*]] [
175 // OMP-NEXT:    i32 0, label [[DOTOMP_SECTIONS_CASE9:%.*]]
176 // OMP-NEXT:    i32 1, label [[DOTOMP_SECTIONS_CASE12:%.*]]
177 // OMP-NEXT:    ]
178 // OMP:       .omp.sections.case9:
179 // OMP-NEXT:    [[TMP18:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 3)
180 // OMP-NEXT:    [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
181 // OMP-NEXT:    br i1 [[TMP19]], label [[DOTCANCEL_EXIT10:%.*]], label [[DOTCANCEL_CONTINUE11:%.*]]
182 // OMP:       .cancel.exit10:
183 // OMP-NEXT:    br label [[CANCEL_EXIT19:%.*]]
184 // OMP:       cancel.exit:
185 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]])
186 // OMP-NEXT:    br label [[CANCEL_CONT]]
187 // OMP:       .cancel.continue11:
188 // OMP-NEXT:    br label [[DOTOMP_SECTIONS_EXIT15]]
189 // OMP:       .omp.sections.case12:
190 // OMP-NEXT:    [[TMP20:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 3)
191 // OMP-NEXT:    [[TMP21:%.*]] = icmp ne i32 [[TMP20]], 0
192 // OMP-NEXT:    br i1 [[TMP21]], label [[DOTCANCEL_EXIT13:%.*]], label [[DOTCANCEL_CONTINUE14:%.*]]
193 // OMP:       .cancel.exit13:
194 // OMP-NEXT:    br label [[CANCEL_EXIT19]]
195 // OMP:       .cancel.continue14:
196 // OMP-NEXT:    br label [[DOTOMP_SECTIONS_EXIT15]]
197 // OMP:       .omp.sections.exit15:
198 // OMP-NEXT:    br label [[OMP_INNER_FOR_INC16:%.*]]
199 // OMP:       omp.inner.for.inc16:
200 // OMP-NEXT:    [[TMP22:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_5]], align 4
201 // OMP-NEXT:    [[INC17:%.*]] = add nsw i32 [[TMP22]], 1
202 // OMP-NEXT:    store i32 [[INC17]], i32* [[DOTOMP_SECTIONS_IV_5]], align 4
203 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND6]]
204 // OMP:       omp.inner.for.end18:
205 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]])
206 // OMP-NEXT:    br label [[CANCEL_CONT20:%.*]]
207 // OMP:       cancel.cont20:
208 // OMP-NEXT:    call void @__kmpc_barrier(%struct.ident_t* @[[GLOB4]], i32 [[TMP0]])
209 // OMP-NEXT:    [[TMP23:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
210 // OMP-NEXT:    store i32 [[TMP23]], i32* [[DOTCAPTURE_EXPR_]], align 4
211 // OMP-NEXT:    [[TMP24:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
212 // OMP-NEXT:    [[SUB:%.*]] = sub nsw i32 [[TMP24]], 0
213 // OMP-NEXT:    [[DIV:%.*]] = sdiv i32 [[SUB]], 1
214 // OMP-NEXT:    [[SUB22:%.*]] = sub nsw i32 [[DIV]], 1
215 // OMP-NEXT:    store i32 [[SUB22]], i32* [[DOTCAPTURE_EXPR_21]], align 4
216 // OMP-NEXT:    store i32 0, i32* [[I]], align 4
217 // OMP-NEXT:    [[TMP25:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
218 // OMP-NEXT:    [[CMP23:%.*]] = icmp slt i32 0, [[TMP25]]
219 // OMP-NEXT:    br i1 [[CMP23]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
220 // OMP:       omp.precond.then:
221 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_LB]], align 4
222 // OMP-NEXT:    [[TMP26:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_21]], align 4
223 // OMP-NEXT:    store i32 [[TMP26]], i32* [[DOTOMP_UB]], align 4
224 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_STRIDE]], align 4
225 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
226 // OMP-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB5:[0-9]+]], i32 [[TMP0]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
227 // OMP-NEXT:    [[TMP27:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
228 // OMP-NEXT:    [[TMP28:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_21]], align 4
229 // OMP-NEXT:    [[CMP25:%.*]] = icmp sgt i32 [[TMP27]], [[TMP28]]
230 // OMP-NEXT:    br i1 [[CMP25]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
231 // OMP:       cond.true:
232 // OMP-NEXT:    [[TMP29:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_21]], align 4
233 // OMP-NEXT:    br label [[COND_END:%.*]]
234 // OMP:       cond.false:
235 // OMP-NEXT:    [[TMP30:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
236 // OMP-NEXT:    br label [[COND_END]]
237 // OMP:       cond.end:
238 // OMP-NEXT:    [[COND:%.*]] = phi i32 [ [[TMP29]], [[COND_TRUE]] ], [ [[TMP30]], [[COND_FALSE]] ]
239 // OMP-NEXT:    store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
240 // OMP-NEXT:    [[TMP31:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
241 // OMP-NEXT:    store i32 [[TMP31]], i32* [[DOTOMP_IV]], align 4
242 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND26:%.*]]
243 // OMP:       omp.inner.for.cond26:
244 // OMP-NEXT:    [[TMP32:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
245 // OMP-NEXT:    [[TMP33:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
246 // OMP-NEXT:    [[CMP27:%.*]] = icmp sle i32 [[TMP32]], [[TMP33]]
247 // OMP-NEXT:    br i1 [[CMP27]], label [[OMP_INNER_FOR_BODY28:%.*]], label [[OMP_INNER_FOR_END33:%.*]]
248 // OMP:       omp.inner.for.body28:
249 // OMP-NEXT:    [[TMP34:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
250 // OMP-NEXT:    [[MUL:%.*]] = mul nsw i32 [[TMP34]], 1
251 // OMP-NEXT:    [[ADD:%.*]] = add nsw i32 0, [[MUL]]
252 // OMP-NEXT:    store i32 [[ADD]], i32* [[I24]], align 4
253 // OMP-NEXT:    [[TMP35:%.*]] = load float, float* @flag, align 4
254 // OMP-NEXT:    [[TOBOOL:%.*]] = fcmp une float [[TMP35]], 0.000000e+00
255 // OMP-NEXT:    br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
256 // OMP:       omp_if.then:
257 // OMP-NEXT:    [[TMP36:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 2)
258 // OMP-NEXT:    [[TMP37:%.*]] = icmp ne i32 [[TMP36]], 0
259 // OMP-NEXT:    br i1 [[TMP37]], label [[DOTCANCEL_EXIT29:%.*]], label [[DOTCANCEL_CONTINUE30:%.*]]
260 // OMP:       .cancel.exit29:
261 // OMP-NEXT:    br label [[CANCEL_EXIT34:%.*]]
262 // OMP:       cancel.exit19:
263 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP0]])
264 // OMP-NEXT:    br label [[CANCEL_CONT20]]
265 // OMP:       .cancel.continue30:
266 // OMP-NEXT:    br label [[OMP_IF_END:%.*]]
267 // OMP:       omp_if.else:
268 // OMP-NEXT:    br label [[OMP_IF_END]]
269 // OMP:       omp_if.end:
270 // OMP-NEXT:    br label [[OMP_BODY_CONTINUE:%.*]]
271 // OMP:       omp.body.continue:
272 // OMP-NEXT:    br label [[OMP_INNER_FOR_INC31:%.*]]
273 // OMP:       omp.inner.for.inc31:
274 // OMP-NEXT:    [[TMP38:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
275 // OMP-NEXT:    [[ADD32:%.*]] = add nsw i32 [[TMP38]], 1
276 // OMP-NEXT:    store i32 [[ADD32]], i32* [[DOTOMP_IV]], align 4
277 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND26]]
278 // OMP:       omp.inner.for.end33:
279 // OMP-NEXT:    br label [[OMP_LOOP_EXIT:%.*]]
280 // OMP:       omp.loop.exit:
281 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB5]], i32 [[TMP0]])
282 // OMP-NEXT:    br label [[OMP_PRECOND_END]]
283 // OMP:       cancel.exit34:
284 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB5]], i32 [[TMP0]])
285 // OMP-NEXT:    br label [[CANCEL_CONT35:%.*]]
286 // OMP:       omp.precond.end:
287 // OMP-NEXT:    br label [[CANCEL_CONT35]]
288 // OMP:       cancel.cont35:
289 // OMP-NEXT:    call void @__kmpc_barrier(%struct.ident_t* @[[GLOB6:[0-9]+]], i32 [[TMP0]])
290 // OMP-NEXT:    [[TMP39:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
291 // OMP-NEXT:    [[TMP40:%.*]] = bitcast i8* [[TMP39]] to %struct.kmp_task_t_with_privates*
292 // OMP-NEXT:    [[TMP41:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP40]], i32 0, i32 0
293 // OMP-NEXT:    [[TMP42:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[TMP0]], i8* [[TMP39]])
294 // OMP-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*))
295 // OMP-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*))
296 // OMP-NEXT:    store i32 0, i32* [[R]], align 4
297 // OMP-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..4 to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i32* [[R]])
298 // OMP-NEXT:    [[TMP43:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
299 // OMP-NEXT:    ret i32 [[TMP43]]
300 //
301 //
302 // OMP-LABEL: @.omp_outlined.(
303 // OMP-NEXT:  entry:
304 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
305 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
306 // OMP-NEXT:    [[ARGV_ADDR:%.*]] = alloca i8***, align 8
307 // OMP-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32*, align 8
308 // OMP-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
309 // OMP-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
310 // OMP-NEXT:    store i8*** [[ARGV:%.*]], i8**** [[ARGV_ADDR]], align 8
311 // OMP-NEXT:    store i32* [[ARGC:%.*]], i32** [[ARGC_ADDR]], align 8
312 // OMP-NEXT:    [[TMP0:%.*]] = load i8***, i8**** [[ARGV_ADDR]], align 8
313 // OMP-NEXT:    [[TMP1:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
314 // OMP-NEXT:    [[TMP2:%.*]] = load float, float* @flag, align 4
315 // OMP-NEXT:    [[TOBOOL:%.*]] = fcmp une float [[TMP2]], 0.000000e+00
316 // OMP-NEXT:    br i1 [[TOBOOL]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
317 // OMP:       omp_if.then:
318 // OMP-NEXT:    [[TMP3:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
319 // OMP-NEXT:    [[TMP4:%.*]] = load i32, i32* [[TMP3]], align 4
320 // OMP-NEXT:    [[TMP5:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP4]], i32 1)
321 // OMP-NEXT:    [[TMP6:%.*]] = icmp ne i32 [[TMP5]], 0
322 // OMP-NEXT:    br i1 [[TMP6]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
323 // OMP:       .cancel.exit:
324 // OMP-NEXT:    br label [[RETURN:%.*]]
325 // OMP:       .cancel.continue:
326 // OMP-NEXT:    br label [[OMP_IF_END:%.*]]
327 // OMP:       omp_if.else:
328 // OMP-NEXT:    br label [[OMP_IF_END]]
329 // OMP:       omp_if.end:
330 // OMP-NEXT:    [[TMP7:%.*]] = load i32, i32* [[TMP1]], align 4
331 // OMP-NEXT:    [[CONV:%.*]] = trunc i32 [[TMP7]] to i8
332 // OMP-NEXT:    [[TMP8:%.*]] = load i8**, i8*** [[TMP0]], align 8
333 // OMP-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP8]], i64 0
334 // OMP-NEXT:    [[TMP9:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
335 // OMP-NEXT:    [[ARRAYIDX1:%.*]] = getelementptr inbounds i8, i8* [[TMP9]], i64 0
336 // OMP-NEXT:    store i8 [[CONV]], i8* [[ARRAYIDX1]], align 1
337 // OMP-NEXT:    [[TMP10:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
338 // OMP-NEXT:    [[TMP11:%.*]] = load i32, i32* [[TMP10]], align 4
339 // OMP-NEXT:    [[TMP12:%.*]] = call i32 @__kmpc_cancel_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[TMP11]])
340 // OMP-NEXT:    [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
341 // OMP-NEXT:    br i1 [[TMP13]], label [[DOTCANCEL_EXIT2:%.*]], label [[DOTCANCEL_CONTINUE3:%.*]]
342 // OMP:       .cancel.exit2:
343 // OMP-NEXT:    br label [[RETURN]]
344 // OMP:       .cancel.continue3:
345 // OMP-NEXT:    [[TMP14:%.*]] = load i32, i32* [[TMP1]], align 4
346 // OMP-NEXT:    [[TMP15:%.*]] = load i8**, i8*** [[TMP0]], align 8
347 // OMP-NEXT:    [[ARRAYIDX4:%.*]] = getelementptr inbounds i8*, i8** [[TMP15]], i64 0
348 // OMP-NEXT:    [[TMP16:%.*]] = load i8*, i8** [[ARRAYIDX4]], align 8
349 // OMP-NEXT:    [[ARRAYIDX5:%.*]] = getelementptr inbounds i8, i8* [[TMP16]], i64 0
350 // OMP-NEXT:    [[TMP17:%.*]] = load i8, i8* [[ARRAYIDX5]], align 1
351 // OMP-NEXT:    [[CONV6:%.*]] = sext i8 [[TMP17]] to i32
352 // OMP-NEXT:    [[ADD:%.*]] = add nsw i32 [[CONV6]], [[TMP14]]
353 // OMP-NEXT:    [[CONV7:%.*]] = trunc i32 [[ADD]] to i8
354 // OMP-NEXT:    store i8 [[CONV7]], i8* [[ARRAYIDX5]], align 1
355 // OMP-NEXT:    br label [[RETURN]]
356 // OMP:       return:
357 // OMP-NEXT:    ret void
358 //
359 //
360 // OMP-LABEL: @.omp_task_entry.(
361 // OMP-NEXT:  entry:
362 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4
363 // OMP-NEXT:    [[DOTPART_ID__ADDR_I:%.*]] = alloca i32*, align 8
364 // OMP-NEXT:    [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8
365 // OMP-NEXT:    [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8
366 // OMP-NEXT:    [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8
367 // OMP-NEXT:    [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
368 // OMP-NEXT:    [[CLEANUP_DEST_SLOT_I:%.*]] = alloca i32, align 4
369 // OMP-NEXT:    [[DOTADDR:%.*]] = alloca i32, align 4
370 // OMP-NEXT:    [[DOTADDR1:%.*]] = alloca %struct.kmp_task_t_with_privates*, align 8
371 // OMP-NEXT:    store i32 [[TMP0:%.*]], i32* [[DOTADDR]], align 4
372 // OMP-NEXT:    store %struct.kmp_task_t_with_privates* [[TMP1:%.*]], %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8
373 // OMP-NEXT:    [[TMP2:%.*]] = load i32, i32* [[DOTADDR]], align 4
374 // OMP-NEXT:    [[TMP3:%.*]] = load %struct.kmp_task_t_with_privates*, %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8
375 // OMP-NEXT:    [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 0
376 // OMP-NEXT:    [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
377 // OMP-NEXT:    [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
378 // OMP-NEXT:    [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
379 // OMP-NEXT:    [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
380 // OMP-NEXT:    [[TMP9:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
381 // OMP-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META4:![0-9]+]])
382 // OMP-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META7:![0-9]+]])
383 // OMP-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]])
384 // OMP-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META11:![0-9]+]])
385 // OMP-NEXT:    store i32 [[TMP2]], i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !13
386 // OMP-NEXT:    store i32* [[TMP5]], i32** [[DOTPART_ID__ADDR_I]], align 8, !noalias !13
387 // OMP-NEXT:    store i8* null, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !13
388 // OMP-NEXT:    store void (i8*, ...)* null, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !13
389 // OMP-NEXT:    store i8* [[TMP9]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !13
390 // OMP-NEXT:    store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !13
391 // OMP-NEXT:    [[TMP10:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !13
392 // OMP-NEXT:    [[TMP11:%.*]] = load i32, i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !13
393 // OMP-NEXT:    [[TMP12:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP11]], i32 4) #[[ATTR2:[0-9]+]]
394 // OMP-NEXT:    [[TMP13:%.*]] = icmp ne i32 [[TMP12]], 0
395 // OMP-NEXT:    br i1 [[TMP13]], label [[DOTCANCEL_EXIT_I:%.*]], label [[DOTCANCEL_CONTINUE_I:%.*]]
396 // OMP:       .cancel.exit.i:
397 // OMP-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT_I]], align 4, !noalias !13
398 // OMP-NEXT:    br label [[DOTOMP_OUTLINED__1_EXIT:%.*]]
399 // OMP:       .cancel.continue.i:
400 // OMP-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT_I]], align 4, !noalias !13
401 // OMP-NEXT:    br label [[DOTOMP_OUTLINED__1_EXIT]]
402 // OMP:       .omp_outlined..1.exit:
403 // OMP-NEXT:    [[CLEANUP_DEST_I:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT_I]], align 4, !noalias !13
404 // OMP-NEXT:    ret i32 0
405 //
406 //
407 // OMP-LABEL: @.omp_outlined..2(
408 // OMP-NEXT:  entry:
409 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
410 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
411 // OMP-NEXT:    [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
412 // OMP-NEXT:    [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
413 // OMP-NEXT:    [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
414 // OMP-NEXT:    [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
415 // OMP-NEXT:    [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
416 // OMP-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
417 // OMP-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
418 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
419 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_UB_]], align 4
420 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
421 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
422 // OMP-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
423 // OMP-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
424 // OMP-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB3]], i32 [[TMP1]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
425 // OMP-NEXT:    [[TMP2:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
426 // OMP-NEXT:    [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 0
427 // OMP-NEXT:    [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 0
428 // OMP-NEXT:    store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
429 // OMP-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
430 // OMP-NEXT:    store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
431 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
432 // OMP:       omp.inner.for.cond:
433 // OMP-NEXT:    [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
434 // OMP-NEXT:    [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
435 // OMP-NEXT:    [[CMP:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
436 // OMP-NEXT:    br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
437 // OMP:       omp.inner.for.body:
438 // OMP-NEXT:    [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
439 // OMP-NEXT:    switch i32 [[TMP8]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
440 // OMP-NEXT:    i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
441 // OMP-NEXT:    ]
442 // OMP:       .omp.sections.case:
443 // OMP-NEXT:    [[TMP9:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 3)
444 // OMP-NEXT:    [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
445 // OMP-NEXT:    br i1 [[TMP10]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
446 // OMP:       .cancel.exit:
447 // OMP-NEXT:    br label [[CANCEL_EXIT:%.*]]
448 // OMP:       .cancel.continue:
449 // OMP-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
450 // OMP:       .omp.sections.exit:
451 // OMP-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
452 // OMP:       omp.inner.for.inc:
453 // OMP-NEXT:    [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
454 // OMP-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP11]], 1
455 // OMP-NEXT:    store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
456 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND]]
457 // OMP:       omp.inner.for.end:
458 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP1]])
459 // OMP-NEXT:    br label [[CANCEL_CONT:%.*]]
460 // OMP:       cancel.cont:
461 // OMP-NEXT:    ret void
462 // OMP:       cancel.exit:
463 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP1]])
464 // OMP-NEXT:    br label [[CANCEL_CONT]]
465 //
466 //
467 // OMP-LABEL: @.omp_outlined..3(
468 // OMP-NEXT:  entry:
469 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
470 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
471 // OMP-NEXT:    [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
472 // OMP-NEXT:    [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
473 // OMP-NEXT:    [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
474 // OMP-NEXT:    [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
475 // OMP-NEXT:    [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
476 // OMP-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
477 // OMP-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
478 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
479 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
480 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
481 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
482 // OMP-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
483 // OMP-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
484 // OMP-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB3]], i32 [[TMP1]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
485 // OMP-NEXT:    [[TMP2:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
486 // OMP-NEXT:    [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 1
487 // OMP-NEXT:    [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 1
488 // OMP-NEXT:    store i32 [[TMP4]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
489 // OMP-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
490 // OMP-NEXT:    store i32 [[TMP5]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
491 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
492 // OMP:       omp.inner.for.cond:
493 // OMP-NEXT:    [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
494 // OMP-NEXT:    [[TMP7:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
495 // OMP-NEXT:    [[CMP:%.*]] = icmp sle i32 [[TMP6]], [[TMP7]]
496 // OMP-NEXT:    br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
497 // OMP:       omp.inner.for.body:
498 // OMP-NEXT:    [[TMP8:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
499 // OMP-NEXT:    switch i32 [[TMP8]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
500 // OMP-NEXT:    i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
501 // OMP-NEXT:    i32 1, label [[DOTOMP_SECTIONS_CASE1:%.*]]
502 // OMP-NEXT:    ]
503 // OMP:       .omp.sections.case:
504 // OMP-NEXT:    [[TMP9:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 3)
505 // OMP-NEXT:    [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0
506 // OMP-NEXT:    br i1 [[TMP10]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
507 // OMP:       .cancel.exit:
508 // OMP-NEXT:    br label [[CANCEL_EXIT:%.*]]
509 // OMP:       .cancel.continue:
510 // OMP-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
511 // OMP:       .omp.sections.case1:
512 // OMP-NEXT:    [[TMP11:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP1]], i32 3)
513 // OMP-NEXT:    [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
514 // OMP-NEXT:    br i1 [[TMP12]], label [[DOTCANCEL_EXIT2:%.*]], label [[DOTCANCEL_CONTINUE3:%.*]]
515 // OMP:       .cancel.exit2:
516 // OMP-NEXT:    br label [[CANCEL_EXIT]]
517 // OMP:       .cancel.continue3:
518 // OMP-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
519 // OMP:       .omp.sections.exit:
520 // OMP-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
521 // OMP:       omp.inner.for.inc:
522 // OMP-NEXT:    [[TMP13:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
523 // OMP-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP13]], 1
524 // OMP-NEXT:    store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
525 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND]]
526 // OMP:       omp.inner.for.end:
527 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP1]])
528 // OMP-NEXT:    br label [[CANCEL_CONT:%.*]]
529 // OMP:       cancel.cont:
530 // OMP-NEXT:    ret void
531 // OMP:       cancel.exit:
532 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB3]], i32 [[TMP1]])
533 // OMP-NEXT:    br label [[CANCEL_CONT]]
534 //
535 //
536 // OMP-LABEL: @.omp_outlined..4(
537 // OMP-NEXT:  entry:
538 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
539 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
540 // OMP-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32*, align 8
541 // OMP-NEXT:    [[R_ADDR:%.*]] = alloca i32*, align 8
542 // OMP-NEXT:    [[DOTOMP_IV:%.*]] = alloca i32, align 4
543 // OMP-NEXT:    [[TMP:%.*]] = alloca i32, align 4
544 // OMP-NEXT:    [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
545 // OMP-NEXT:    [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
546 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
547 // OMP-NEXT:    [[DOTOMP_LB:%.*]] = alloca i32, align 4
548 // OMP-NEXT:    [[DOTOMP_UB:%.*]] = alloca i32, align 4
549 // OMP-NEXT:    [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
550 // OMP-NEXT:    [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
551 // OMP-NEXT:    [[R3:%.*]] = alloca i32, align 4
552 // OMP-NEXT:    [[I4:%.*]] = alloca i32, align 4
553 // OMP-NEXT:    [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x i8*], align 8
554 // OMP-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
555 // OMP-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
556 // OMP-NEXT:    store i32* [[ARGC:%.*]], i32** [[ARGC_ADDR]], align 8
557 // OMP-NEXT:    store i32* [[R:%.*]], i32** [[R_ADDR]], align 8
558 // OMP-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
559 // OMP-NEXT:    [[TMP1:%.*]] = load i32*, i32** [[R_ADDR]], align 8
560 // OMP-NEXT:    [[TMP2:%.*]] = load i32, i32* [[TMP0]], align 4
561 // OMP-NEXT:    store i32 [[TMP2]], i32* [[DOTCAPTURE_EXPR_]], align 4
562 // OMP-NEXT:    [[TMP3:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
563 // OMP-NEXT:    [[SUB:%.*]] = sub nsw i32 [[TMP3]], 0
564 // OMP-NEXT:    [[DIV:%.*]] = sdiv i32 [[SUB]], 1
565 // OMP-NEXT:    [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
566 // OMP-NEXT:    store i32 [[SUB2]], i32* [[DOTCAPTURE_EXPR_1]], align 4
567 // OMP-NEXT:    store i32 0, i32* [[I]], align 4
568 // OMP-NEXT:    [[TMP4:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
569 // OMP-NEXT:    [[CMP:%.*]] = icmp slt i32 0, [[TMP4]]
570 // OMP-NEXT:    br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
571 // OMP:       omp.precond.then:
572 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_LB]], align 4
573 // OMP-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4
574 // OMP-NEXT:    store i32 [[TMP5]], i32* [[DOTOMP_UB]], align 4
575 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_STRIDE]], align 4
576 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
577 // OMP-NEXT:    store i32 0, i32* [[R3]], align 4
578 // OMP-NEXT:    [[TMP6:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
579 // OMP-NEXT:    [[TMP7:%.*]] = load i32, i32* [[TMP6]], align 4
580 // OMP-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB5]], i32 [[TMP7]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
581 // OMP-NEXT:    [[TMP8:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
582 // OMP-NEXT:    [[TMP9:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4
583 // OMP-NEXT:    [[CMP5:%.*]] = icmp sgt i32 [[TMP8]], [[TMP9]]
584 // OMP-NEXT:    br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
585 // OMP:       cond.true:
586 // OMP-NEXT:    [[TMP10:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4
587 // OMP-NEXT:    br label [[COND_END:%.*]]
588 // OMP:       cond.false:
589 // OMP-NEXT:    [[TMP11:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
590 // OMP-NEXT:    br label [[COND_END]]
591 // OMP:       cond.end:
592 // OMP-NEXT:    [[COND:%.*]] = phi i32 [ [[TMP10]], [[COND_TRUE]] ], [ [[TMP11]], [[COND_FALSE]] ]
593 // OMP-NEXT:    store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
594 // OMP-NEXT:    [[TMP12:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
595 // OMP-NEXT:    store i32 [[TMP12]], i32* [[DOTOMP_IV]], align 4
596 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
597 // OMP:       omp.inner.for.cond:
598 // OMP-NEXT:    [[TMP13:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
599 // OMP-NEXT:    [[TMP14:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
600 // OMP-NEXT:    [[CMP6:%.*]] = icmp sle i32 [[TMP13]], [[TMP14]]
601 // OMP-NEXT:    br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
602 // OMP:       omp.inner.for.body:
603 // OMP-NEXT:    [[TMP15:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
604 // OMP-NEXT:    [[MUL:%.*]] = mul nsw i32 [[TMP15]], 1
605 // OMP-NEXT:    [[ADD:%.*]] = add nsw i32 0, [[MUL]]
606 // OMP-NEXT:    store i32 [[ADD]], i32* [[I4]], align 4
607 // OMP-NEXT:    [[TMP16:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
608 // OMP-NEXT:    [[TMP17:%.*]] = load i32, i32* [[TMP16]], align 4
609 // OMP-NEXT:    [[TMP18:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[TMP17]], i32 2)
610 // OMP-NEXT:    [[TMP19:%.*]] = icmp ne i32 [[TMP18]], 0
611 // OMP-NEXT:    br i1 [[TMP19]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
612 // OMP:       .cancel.exit:
613 // OMP-NEXT:    br label [[CANCEL_EXIT:%.*]]
614 // OMP:       .cancel.continue:
615 // OMP-NEXT:    [[TMP20:%.*]] = load i32, i32* [[I4]], align 4
616 // OMP-NEXT:    [[TMP21:%.*]] = load i32, i32* [[R3]], align 4
617 // OMP-NEXT:    [[ADD7:%.*]] = add nsw i32 [[TMP21]], [[TMP20]]
618 // OMP-NEXT:    store i32 [[ADD7]], i32* [[R3]], align 4
619 // OMP-NEXT:    br label [[OMP_BODY_CONTINUE:%.*]]
620 // OMP:       omp.body.continue:
621 // OMP-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
622 // OMP:       omp.inner.for.inc:
623 // OMP-NEXT:    [[TMP22:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
624 // OMP-NEXT:    [[ADD8:%.*]] = add nsw i32 [[TMP22]], 1
625 // OMP-NEXT:    store i32 [[ADD8]], i32* [[DOTOMP_IV]], align 4
626 // OMP-NEXT:    br label [[OMP_INNER_FOR_COND]]
627 // OMP:       omp.inner.for.end:
628 // OMP-NEXT:    br label [[OMP_LOOP_EXIT:%.*]]
629 // OMP:       omp.loop.exit:
630 // OMP-NEXT:    [[TMP23:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
631 // OMP-NEXT:    [[TMP24:%.*]] = load i32, i32* [[TMP23]], align 4
632 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB5]], i32 [[TMP24]])
633 // OMP-NEXT:    [[TMP25:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
634 // OMP-NEXT:    [[TMP26:%.*]] = bitcast i32* [[R3]] to i8*
635 // OMP-NEXT:    store i8* [[TMP26]], i8** [[TMP25]], align 8
636 // OMP-NEXT:    [[TMP27:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
637 // OMP-NEXT:    [[TMP28:%.*]] = load i32, i32* [[TMP27]], align 4
638 // OMP-NEXT:    [[TMP29:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
639 // OMP-NEXT:    [[TMP30:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB7:[0-9]+]], i32 [[TMP28]], i32 1, i64 8, i8* [[TMP29]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
640 // OMP-NEXT:    switch i32 [[TMP30]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
641 // OMP-NEXT:    i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
642 // OMP-NEXT:    i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
643 // OMP-NEXT:    ]
644 // OMP:       .omp.reduction.case1:
645 // OMP-NEXT:    [[TMP31:%.*]] = load i32, i32* [[TMP1]], align 4
646 // OMP-NEXT:    [[TMP32:%.*]] = load i32, i32* [[R3]], align 4
647 // OMP-NEXT:    [[ADD9:%.*]] = add nsw i32 [[TMP31]], [[TMP32]]
648 // OMP-NEXT:    store i32 [[ADD9]], i32* [[TMP1]], align 4
649 // OMP-NEXT:    call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB7]], i32 [[TMP28]], [8 x i32]* @.gomp_critical_user_.reduction.var)
650 // OMP-NEXT:    br label [[DOTOMP_REDUCTION_DEFAULT]]
651 // OMP:       cancel.exit:
652 // OMP-NEXT:    [[TMP33:%.*]] = load i32*, i32** [[DOTGLOBAL_TID__ADDR]], align 8
653 // OMP-NEXT:    [[TMP34:%.*]] = load i32, i32* [[TMP33]], align 4
654 // OMP-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB5]], i32 [[TMP34]])
655 // OMP-NEXT:    br label [[CANCEL_CONT:%.*]]
656 // OMP:       .omp.reduction.case2:
657 // OMP-NEXT:    [[TMP35:%.*]] = load i32, i32* [[R3]], align 4
658 // OMP-NEXT:    [[TMP36:%.*]] = atomicrmw add i32* [[TMP1]], i32 [[TMP35]] monotonic, align 4
659 // OMP-NEXT:    br label [[DOTOMP_REDUCTION_DEFAULT]]
660 // OMP:       .omp.reduction.default:
661 // OMP-NEXT:    br label [[OMP_PRECOND_END]]
662 // OMP:       omp.precond.end:
663 // OMP-NEXT:    br label [[CANCEL_CONT]]
664 // OMP:       cancel.cont:
665 // OMP-NEXT:    ret void
666 //
667 //
668 // OMP-LABEL: @.omp.reduction.reduction_func(
669 // OMP-NEXT:  entry:
670 // OMP-NEXT:    [[DOTADDR:%.*]] = alloca i8*, align 8
671 // OMP-NEXT:    [[DOTADDR1:%.*]] = alloca i8*, align 8
672 // OMP-NEXT:    store i8* [[TMP0:%.*]], i8** [[DOTADDR]], align 8
673 // OMP-NEXT:    store i8* [[TMP1:%.*]], i8** [[DOTADDR1]], align 8
674 // OMP-NEXT:    [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8
675 // OMP-NEXT:    [[TMP3:%.*]] = bitcast i8* [[TMP2]] to [1 x i8*]*
676 // OMP-NEXT:    [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8
677 // OMP-NEXT:    [[TMP5:%.*]] = bitcast i8* [[TMP4]] to [1 x i8*]*
678 // OMP-NEXT:    [[TMP6:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[TMP5]], i64 0, i64 0
679 // OMP-NEXT:    [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
680 // OMP-NEXT:    [[TMP8:%.*]] = bitcast i8* [[TMP7]] to i32*
681 // OMP-NEXT:    [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[TMP3]], i64 0, i64 0
682 // OMP-NEXT:    [[TMP10:%.*]] = load i8*, i8** [[TMP9]], align 8
683 // OMP-NEXT:    [[TMP11:%.*]] = bitcast i8* [[TMP10]] to i32*
684 // OMP-NEXT:    [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
685 // OMP-NEXT:    [[TMP13:%.*]] = load i32, i32* [[TMP8]], align 4
686 // OMP-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
687 // OMP-NEXT:    store i32 [[ADD]], i32* [[TMP11]], align 4
688 // OMP-NEXT:    ret void
689 //
690 //
691 // OMP_IRB-LABEL: @main(
692 // OMP_IRB-NEXT:  entry:
693 // OMP_IRB-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
694 // OMP_IRB-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32, align 4
695 // OMP_IRB-NEXT:    [[ARGV_ADDR:%.*]] = alloca i8**, align 8
696 // OMP_IRB-NEXT:    [[P_LASTITER:%.*]] = alloca i32, align 4
697 // OMP_IRB-NEXT:    [[P_LOWERBOUND:%.*]] = alloca i32, align 4
698 // OMP_IRB-NEXT:    [[P_UPPERBOUND:%.*]] = alloca i32, align 4
699 // OMP_IRB-NEXT:    [[P_STRIDE:%.*]] = alloca i32, align 4
700 // OMP_IRB-NEXT:    [[P_LASTITER26:%.*]] = alloca i32, align 4
701 // OMP_IRB-NEXT:    [[P_LOWERBOUND27:%.*]] = alloca i32, align 4
702 // OMP_IRB-NEXT:    [[P_UPPERBOUND28:%.*]] = alloca i32, align 4
703 // OMP_IRB-NEXT:    [[P_STRIDE29:%.*]] = alloca i32, align 4
704 // OMP_IRB-NEXT:    [[DOTOMP_IV:%.*]] = alloca i32, align 4
705 // OMP_IRB-NEXT:    [[TMP:%.*]] = alloca i32, align 4
706 // OMP_IRB-NEXT:    [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
707 // OMP_IRB-NEXT:    [[DOTCAPTURE_EXPR_33:%.*]] = alloca i32, align 4
708 // OMP_IRB-NEXT:    [[I:%.*]] = alloca i32, align 4
709 // OMP_IRB-NEXT:    [[DOTOMP_LB:%.*]] = alloca i32, align 4
710 // OMP_IRB-NEXT:    [[DOTOMP_UB:%.*]] = alloca i32, align 4
711 // OMP_IRB-NEXT:    [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
712 // OMP_IRB-NEXT:    [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
713 // OMP_IRB-NEXT:    [[I35:%.*]] = alloca i32, align 4
714 // OMP_IRB-NEXT:    [[AGG_CAPTURED:%.*]] = alloca [[STRUCT_ANON:%.*]], align 1
715 // OMP_IRB-NEXT:    [[R:%.*]] = alloca i32, align 4
716 // OMP_IRB-NEXT:    store i32 0, i32* [[RETVAL]], align 4
717 // OMP_IRB-NEXT:    store i32 [[ARGC:%.*]], i32* [[ARGC_ADDR]], align 4
718 // OMP_IRB-NEXT:    store i8** [[ARGV:%.*]], i8*** [[ARGV_ADDR]], align 8
719 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1:[0-9]+]])
720 // OMP_IRB-NEXT:    br label [[OMP_PARALLEL:%.*]]
721 // OMP_IRB:       omp_parallel:
722 // OMP_IRB-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i8***)* @main..omp_par to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i8*** [[ARGV_ADDR]])
723 // OMP_IRB-NEXT:    br label [[OMP_PAR_OUTLINED_EXIT:%.*]]
724 // OMP_IRB:       omp.par.outlined.exit:
725 // OMP_IRB-NEXT:    br label [[OMP_PAR_EXIT_SPLIT:%.*]]
726 // OMP_IRB:       omp.par.exit.split:
727 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_PREHEADER:%.*]]
728 // OMP_IRB:       omp_section_loop.preheader:
729 // OMP_IRB-NEXT:    store i32 0, i32* [[P_LOWERBOUND]], align 4
730 // OMP_IRB-NEXT:    store i32 0, i32* [[P_UPPERBOUND]], align 4
731 // OMP_IRB-NEXT:    store i32 1, i32* [[P_STRIDE]], align 4
732 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
733 // OMP_IRB-NEXT:    call void @__kmpc_for_static_init_4u(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]], i32 34, i32* [[P_LASTITER]], i32* [[P_LOWERBOUND]], i32* [[P_UPPERBOUND]], i32* [[P_STRIDE]], i32 1, i32 1)
734 // OMP_IRB-NEXT:    [[TMP0:%.*]] = load i32, i32* [[P_LOWERBOUND]], align 4
735 // OMP_IRB-NEXT:    [[TMP1:%.*]] = load i32, i32* [[P_UPPERBOUND]], align 4
736 // OMP_IRB-NEXT:    [[TMP2:%.*]] = sub i32 [[TMP1]], [[TMP0]]
737 // OMP_IRB-NEXT:    [[TMP3:%.*]] = add i32 [[TMP2]], 1
738 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_HEADER:%.*]]
739 // OMP_IRB:       omp_section_loop.header:
740 // OMP_IRB-NEXT:    [[OMP_SECTION_LOOP_IV:%.*]] = phi i32 [ 0, [[OMP_SECTION_LOOP_PREHEADER]] ], [ [[OMP_SECTION_LOOP_NEXT:%.*]], [[OMP_SECTION_LOOP_INC:%.*]] ]
741 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_COND:%.*]]
742 // OMP_IRB:       omp_section_loop.cond:
743 // OMP_IRB-NEXT:    [[OMP_SECTION_LOOP_CMP:%.*]] = icmp ult i32 [[OMP_SECTION_LOOP_IV]], [[TMP3]]
744 // OMP_IRB-NEXT:    br i1 [[OMP_SECTION_LOOP_CMP]], label [[OMP_SECTION_LOOP_BODY:%.*]], label [[OMP_SECTION_LOOP_EXIT:%.*]]
745 // OMP_IRB:       omp_section_loop.body:
746 // OMP_IRB-NEXT:    [[TMP4:%.*]] = add i32 [[OMP_SECTION_LOOP_IV]], [[TMP0]]
747 // OMP_IRB-NEXT:    [[TMP5:%.*]] = mul i32 [[TMP4]], 1
748 // OMP_IRB-NEXT:    [[TMP6:%.*]] = add i32 [[TMP5]], 0
749 // OMP_IRB-NEXT:    switch i32 [[TMP6]], label [[OMP_SECTION_LOOP_INC]] [
750 // OMP_IRB-NEXT:    i32 0, label [[OMP_SECTION_LOOP_BODY_CASE:%.*]]
751 // OMP_IRB-NEXT:    ]
752 // OMP_IRB:       omp_section_loop.inc:
753 // OMP_IRB-NEXT:    [[OMP_SECTION_LOOP_NEXT]] = add nuw i32 [[OMP_SECTION_LOOP_IV]], 1
754 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_HEADER]]
755 // OMP_IRB:       omp_section_loop.exit:
756 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM10]])
757 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM11:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
758 // OMP_IRB-NEXT:    call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM11]])
759 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_AFTER:%.*]]
760 // OMP_IRB:       omp_section_loop.after:
761 // OMP_IRB-NEXT:    br label [[OMP_SECTIONS_END:%.*]]
762 // OMP_IRB:       omp_sections.end:
763 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_PREHEADER12:%.*]]
764 // OMP_IRB:       omp_section_loop.preheader12:
765 // OMP_IRB-NEXT:    store i32 0, i32* [[P_LOWERBOUND27]], align 4
766 // OMP_IRB-NEXT:    store i32 1, i32* [[P_UPPERBOUND28]], align 4
767 // OMP_IRB-NEXT:    store i32 1, i32* [[P_STRIDE29]], align 4
768 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM30:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
769 // OMP_IRB-NEXT:    call void @__kmpc_for_static_init_4u(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]], i32 34, i32* [[P_LASTITER26]], i32* [[P_LOWERBOUND27]], i32* [[P_UPPERBOUND28]], i32* [[P_STRIDE29]], i32 1, i32 1)
770 // OMP_IRB-NEXT:    [[TMP7:%.*]] = load i32, i32* [[P_LOWERBOUND27]], align 4
771 // OMP_IRB-NEXT:    [[TMP8:%.*]] = load i32, i32* [[P_UPPERBOUND28]], align 4
772 // OMP_IRB-NEXT:    [[TMP9:%.*]] = sub i32 [[TMP8]], [[TMP7]]
773 // OMP_IRB-NEXT:    [[TMP10:%.*]] = add i32 [[TMP9]], 1
774 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_HEADER13:%.*]]
775 // OMP_IRB:       omp_section_loop.header13:
776 // OMP_IRB-NEXT:    [[OMP_SECTION_LOOP_IV19:%.*]] = phi i32 [ 0, [[OMP_SECTION_LOOP_PREHEADER12]] ], [ [[OMP_SECTION_LOOP_NEXT21:%.*]], [[OMP_SECTION_LOOP_INC16:%.*]] ]
777 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_COND14:%.*]]
778 // OMP_IRB:       omp_section_loop.cond14:
779 // OMP_IRB-NEXT:    [[OMP_SECTION_LOOP_CMP20:%.*]] = icmp ult i32 [[OMP_SECTION_LOOP_IV19]], [[TMP10]]
780 // OMP_IRB-NEXT:    br i1 [[OMP_SECTION_LOOP_CMP20]], label [[OMP_SECTION_LOOP_BODY15:%.*]], label [[OMP_SECTION_LOOP_EXIT17:%.*]]
781 // OMP_IRB:       omp_section_loop.body15:
782 // OMP_IRB-NEXT:    [[TMP11:%.*]] = add i32 [[OMP_SECTION_LOOP_IV19]], [[TMP7]]
783 // OMP_IRB-NEXT:    [[TMP12:%.*]] = mul i32 [[TMP11]], 1
784 // OMP_IRB-NEXT:    [[TMP13:%.*]] = add i32 [[TMP12]], 0
785 // OMP_IRB-NEXT:    switch i32 [[TMP13]], label [[OMP_SECTION_LOOP_INC16]] [
786 // OMP_IRB-NEXT:    i32 0, label [[OMP_SECTION_LOOP_BODY_CASE22:%.*]]
787 // OMP_IRB-NEXT:    i32 1, label [[OMP_SECTION_LOOP_BODY_CASE24:%.*]]
788 // OMP_IRB-NEXT:    ]
789 // OMP_IRB:       omp_section_loop.inc16:
790 // OMP_IRB-NEXT:    [[OMP_SECTION_LOOP_NEXT21]] = add nuw i32 [[OMP_SECTION_LOOP_IV19]], 1
791 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_HEADER13]]
792 // OMP_IRB:       omp_section_loop.exit17:
793 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM30]])
794 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM31:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
795 // OMP_IRB-NEXT:    call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3]], i32 [[OMP_GLOBAL_THREAD_NUM31]])
796 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_AFTER18:%.*]]
797 // OMP_IRB:       omp_section_loop.after18:
798 // OMP_IRB-NEXT:    br label [[OMP_SECTIONS_END32:%.*]]
799 // OMP_IRB:       omp_sections.end32:
800 // OMP_IRB-NEXT:    [[TMP14:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
801 // OMP_IRB-NEXT:    store i32 [[TMP14]], i32* [[DOTCAPTURE_EXPR_]], align 4
802 // OMP_IRB-NEXT:    [[TMP15:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
803 // OMP_IRB-NEXT:    [[SUB:%.*]] = sub nsw i32 [[TMP15]], 0
804 // OMP_IRB-NEXT:    [[DIV:%.*]] = sdiv i32 [[SUB]], 1
805 // OMP_IRB-NEXT:    [[SUB34:%.*]] = sub nsw i32 [[DIV]], 1
806 // OMP_IRB-NEXT:    store i32 [[SUB34]], i32* [[DOTCAPTURE_EXPR_33]], align 4
807 // OMP_IRB-NEXT:    store i32 0, i32* [[I]], align 4
808 // OMP_IRB-NEXT:    [[TMP16:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
809 // OMP_IRB-NEXT:    [[CMP:%.*]] = icmp slt i32 0, [[TMP16]]
810 // OMP_IRB-NEXT:    br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
811 // OMP_IRB:       omp.precond.then:
812 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_LB]], align 4
813 // OMP_IRB-NEXT:    [[TMP17:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_33]], align 4
814 // OMP_IRB-NEXT:    store i32 [[TMP17]], i32* [[DOTOMP_UB]], align 4
815 // OMP_IRB-NEXT:    store i32 1, i32* [[DOTOMP_STRIDE]], align 4
816 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
817 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM36:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB6:[0-9]+]])
818 // OMP_IRB-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB4:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM36]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
819 // OMP_IRB-NEXT:    [[TMP18:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
820 // OMP_IRB-NEXT:    [[TMP19:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_33]], align 4
821 // OMP_IRB-NEXT:    [[CMP37:%.*]] = icmp sgt i32 [[TMP18]], [[TMP19]]
822 // OMP_IRB-NEXT:    br i1 [[CMP37]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
823 // OMP_IRB:       cond.true:
824 // OMP_IRB-NEXT:    [[TMP20:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_33]], align 4
825 // OMP_IRB-NEXT:    br label [[COND_END:%.*]]
826 // OMP_IRB:       cond.false:
827 // OMP_IRB-NEXT:    [[TMP21:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
828 // OMP_IRB-NEXT:    br label [[COND_END]]
829 // OMP_IRB:       cond.end:
830 // OMP_IRB-NEXT:    [[COND:%.*]] = phi i32 [ [[TMP20]], [[COND_TRUE]] ], [ [[TMP21]], [[COND_FALSE]] ]
831 // OMP_IRB-NEXT:    store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
832 // OMP_IRB-NEXT:    [[TMP22:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
833 // OMP_IRB-NEXT:    store i32 [[TMP22]], i32* [[DOTOMP_IV]], align 4
834 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
835 // OMP_IRB:       omp.inner.for.cond:
836 // OMP_IRB-NEXT:    [[TMP23:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
837 // OMP_IRB-NEXT:    [[TMP24:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
838 // OMP_IRB-NEXT:    [[CMP38:%.*]] = icmp sle i32 [[TMP23]], [[TMP24]]
839 // OMP_IRB-NEXT:    br i1 [[CMP38]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
840 // OMP_IRB:       omp.inner.for.body:
841 // OMP_IRB-NEXT:    [[TMP25:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
842 // OMP_IRB-NEXT:    [[MUL:%.*]] = mul nsw i32 [[TMP25]], 1
843 // OMP_IRB-NEXT:    [[ADD39:%.*]] = add nsw i32 0, [[MUL]]
844 // OMP_IRB-NEXT:    store i32 [[ADD39]], i32* [[I35]], align 4
845 // OMP_IRB-NEXT:    [[TMP26:%.*]] = load float, float* @flag, align 4
846 // OMP_IRB-NEXT:    [[TOBOOL40:%.*]] = fcmp une float [[TMP26]], 0.000000e+00
847 // OMP_IRB-NEXT:    br i1 [[TOBOOL40]], label [[OMP_IF_THEN:%.*]], label [[OMP_IF_ELSE:%.*]]
848 // OMP_IRB:       omp_if.then:
849 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM41:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB8:[0-9]+]])
850 // OMP_IRB-NEXT:    [[TMP27:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM41]], i32 2)
851 // OMP_IRB-NEXT:    [[TMP28:%.*]] = icmp ne i32 [[TMP27]], 0
852 // OMP_IRB-NEXT:    br i1 [[TMP28]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
853 // OMP_IRB:       .cancel.exit:
854 // OMP_IRB-NEXT:    br label [[CANCEL_EXIT:%.*]]
855 // OMP_IRB:       omp_section_loop.body.case:
856 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM9:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
857 // OMP_IRB-NEXT:    [[TMP29:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM9]], i32 3)
858 // OMP_IRB-NEXT:    [[TMP30:%.*]] = icmp eq i32 [[TMP29]], 0
859 // OMP_IRB-NEXT:    br i1 [[TMP30]], label [[OMP_SECTION_LOOP_BODY_CASE_SPLIT:%.*]], label [[OMP_SECTION_LOOP_BODY_CASE_CNCL:%.*]]
860 // OMP_IRB:       omp_section_loop.body.case.split:
861 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_EXIT]]
862 // OMP_IRB:       omp_section_loop.body.case.cncl:
863 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_EXIT]]
864 // OMP_IRB:       omp_section_loop.body.case22:
865 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM23:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
866 // OMP_IRB-NEXT:    [[TMP31:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM23]], i32 3)
867 // OMP_IRB-NEXT:    [[TMP32:%.*]] = icmp eq i32 [[TMP31]], 0
868 // OMP_IRB-NEXT:    br i1 [[TMP32]], label [[OMP_SECTION_LOOP_BODY_CASE22_SPLIT:%.*]], label [[OMP_SECTION_LOOP_BODY_CASE22_CNCL:%.*]]
869 // OMP_IRB:       omp_section_loop.body.case22.split:
870 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_EXIT17]]
871 // OMP_IRB:       omp_section_loop.body.case22.cncl:
872 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_EXIT17]]
873 // OMP_IRB:       omp_section_loop.body.case24:
874 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM25:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
875 // OMP_IRB-NEXT:    [[TMP33:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM25]], i32 3)
876 // OMP_IRB-NEXT:    [[TMP34:%.*]] = icmp eq i32 [[TMP33]], 0
877 // OMP_IRB-NEXT:    br i1 [[TMP34]], label [[OMP_SECTION_LOOP_BODY_CASE24_SPLIT:%.*]], label [[OMP_SECTION_LOOP_BODY_CASE24_CNCL:%.*]]
878 // OMP_IRB:       omp_section_loop.body.case24.split:
879 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_EXIT17]]
880 // OMP_IRB:       omp_section_loop.body.case24.cncl:
881 // OMP_IRB-NEXT:    br label [[OMP_SECTION_LOOP_EXIT17]]
882 // OMP_IRB:       .cancel.continue:
883 // OMP_IRB-NEXT:    br label [[OMP_IF_END:%.*]]
884 // OMP_IRB:       omp_if.else:
885 // OMP_IRB-NEXT:    br label [[OMP_IF_END]]
886 // OMP_IRB:       omp_if.end:
887 // OMP_IRB-NEXT:    br label [[OMP_BODY_CONTINUE:%.*]]
888 // OMP_IRB:       omp.body.continue:
889 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
890 // OMP_IRB:       omp.inner.for.inc:
891 // OMP_IRB-NEXT:    [[TMP35:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
892 // OMP_IRB-NEXT:    [[ADD42:%.*]] = add nsw i32 [[TMP35]], 1
893 // OMP_IRB-NEXT:    store i32 [[ADD42]], i32* [[DOTOMP_IV]], align 4
894 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND]]
895 // OMP_IRB:       omp.inner.for.end:
896 // OMP_IRB-NEXT:    br label [[OMP_LOOP_EXIT:%.*]]
897 // OMP_IRB:       omp.loop.exit:
898 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM44:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB10:[0-9]+]])
899 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB4]], i32 [[OMP_GLOBAL_THREAD_NUM44]])
900 // OMP_IRB-NEXT:    br label [[OMP_PRECOND_END]]
901 // OMP_IRB:       cancel.exit:
902 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM43:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB10]])
903 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB4]], i32 [[OMP_GLOBAL_THREAD_NUM43]])
904 // OMP_IRB-NEXT:    br label [[CANCEL_CONT:%.*]]
905 // OMP_IRB:       omp.precond.end:
906 // OMP_IRB-NEXT:    br label [[CANCEL_CONT]]
907 // OMP_IRB:       cancel.cont:
908 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM45:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
909 // OMP_IRB-NEXT:    call void @__kmpc_barrier(%struct.ident_t* @[[GLOB3]], i32 [[OMP_GLOBAL_THREAD_NUM45]])
910 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM46:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB14:[0-9]+]])
911 // OMP_IRB-NEXT:    [[TMP36:%.*]] = call i8* @__kmpc_omp_task_alloc(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM46]], i32 1, i64 40, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %struct.kmp_task_t_with_privates*)* @.omp_task_entry. to i32 (i32, i8*)*))
912 // OMP_IRB-NEXT:    [[TMP37:%.*]] = bitcast i8* [[TMP36]] to %struct.kmp_task_t_with_privates*
913 // OMP_IRB-NEXT:    [[TMP38:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP37]], i32 0, i32 0
914 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM47:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB14]])
915 // OMP_IRB-NEXT:    [[TMP39:%.*]] = call i32 @__kmpc_omp_task(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM47]], i8* [[TMP36]])
916 // OMP_IRB-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))
917 // OMP_IRB-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..2 to void (i32*, i32*, ...)*))
918 // OMP_IRB-NEXT:    store i32 0, i32* [[R]], align 4
919 // OMP_IRB-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB1]], i32 2, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, i32*, i32*)* @.omp_outlined..3 to void (i32*, i32*, ...)*), i32* [[ARGC_ADDR]], i32* [[R]])
920 // OMP_IRB-NEXT:    [[TMP40:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
921 // OMP_IRB-NEXT:    ret i32 [[TMP40]]
922 //
923 //
924 // OMP_IRB-LABEL: @main..omp_par(
925 // OMP_IRB-NEXT:  omp.par.entry:
926 // OMP_IRB-NEXT:    [[TID_ADDR_LOCAL:%.*]] = alloca i32, align 4
927 // OMP_IRB-NEXT:    [[TMP0:%.*]] = load i32, i32* [[TID_ADDR:%.*]], align 4
928 // OMP_IRB-NEXT:    store i32 [[TMP0]], i32* [[TID_ADDR_LOCAL]], align 4
929 // OMP_IRB-NEXT:    [[TID:%.*]] = load i32, i32* [[TID_ADDR_LOCAL]], align 4
930 // OMP_IRB-NEXT:    br label [[OMP_PAR_REGION:%.*]]
931 // OMP_IRB:       omp.par.outlined.exit.exitStub:
932 // OMP_IRB-NEXT:    ret void
933 // OMP_IRB:       omp.par.region:
934 // OMP_IRB-NEXT:    [[TMP1:%.*]] = load float, float* @flag, align 4
935 // OMP_IRB-NEXT:    [[TOBOOL:%.*]] = fcmp une float [[TMP1]], 0.000000e+00
936 // OMP_IRB-NEXT:    br i1 [[TOBOOL]], label [[TMP13:%.*]], label [[TMP2:%.*]]
937 // OMP_IRB:       2:
938 // OMP_IRB-NEXT:    br label [[TMP3:%.*]]
939 // OMP_IRB:       3:
940 // OMP_IRB-NEXT:    [[TMP4:%.*]] = load i32, i32* [[ARGC_ADDR:%.*]], align 4
941 // OMP_IRB-NEXT:    [[CONV:%.*]] = trunc i32 [[TMP4]] to i8
942 // OMP_IRB-NEXT:    [[TMP5:%.*]] = load i8**, i8*** [[ARGV_ADDR:%.*]], align 8
943 // OMP_IRB-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP5]], i64 0
944 // OMP_IRB-NEXT:    [[TMP6:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
945 // OMP_IRB-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds i8, i8* [[TMP6]], i64 0
946 // OMP_IRB-NEXT:    store i8 [[CONV]], i8* [[ARRAYIDX2]], align 1
947 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
948 // OMP_IRB-NEXT:    [[TMP7:%.*]] = call i32 @__kmpc_cancel_barrier(%struct.ident_t* @[[GLOB2:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
949 // OMP_IRB-NEXT:    [[TMP8:%.*]] = icmp eq i32 [[TMP7]], 0
950 // OMP_IRB-NEXT:    br i1 [[TMP8]], label [[DOTCONT:%.*]], label [[DOTCNCL4:%.*]]
951 // OMP_IRB:       .cncl4:
952 // OMP_IRB-NEXT:    br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB:%.*]]
953 // OMP_IRB:       .cont:
954 // OMP_IRB-NEXT:    [[TMP9:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
955 // OMP_IRB-NEXT:    [[TMP10:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
956 // OMP_IRB-NEXT:    [[ARRAYIDX5:%.*]] = getelementptr inbounds i8*, i8** [[TMP10]], i64 0
957 // OMP_IRB-NEXT:    [[TMP11:%.*]] = load i8*, i8** [[ARRAYIDX5]], align 8
958 // OMP_IRB-NEXT:    [[ARRAYIDX6:%.*]] = getelementptr inbounds i8, i8* [[TMP11]], i64 0
959 // OMP_IRB-NEXT:    [[TMP12:%.*]] = load i8, i8* [[ARRAYIDX6]], align 1
960 // OMP_IRB-NEXT:    [[CONV7:%.*]] = sext i8 [[TMP12]] to i32
961 // OMP_IRB-NEXT:    [[ADD:%.*]] = add nsw i32 [[CONV7]], [[TMP9]]
962 // OMP_IRB-NEXT:    [[CONV8:%.*]] = trunc i32 [[ADD]] to i8
963 // OMP_IRB-NEXT:    store i8 [[CONV8]], i8* [[ARRAYIDX6]], align 1
964 // OMP_IRB-NEXT:    br label [[OMP_PAR_PRE_FINALIZE:%.*]]
965 // OMP_IRB:       omp.par.pre_finalize:
966 // OMP_IRB-NEXT:    br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB]]
967 // OMP_IRB:       13:
968 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
969 // OMP_IRB-NEXT:    [[TMP14:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM1]], i32 1)
970 // OMP_IRB-NEXT:    [[TMP15:%.*]] = icmp eq i32 [[TMP14]], 0
971 // OMP_IRB-NEXT:    br i1 [[TMP15]], label [[DOTSPLIT:%.*]], label [[DOTCNCL:%.*]]
972 // OMP_IRB:       .cncl:
973 // OMP_IRB-NEXT:    br label [[OMP_PAR_OUTLINED_EXIT_EXITSTUB]]
974 // OMP_IRB:       .split:
975 // OMP_IRB-NEXT:    br label [[TMP3]]
976 //
977 //
978 // OMP_IRB-LABEL: @.omp_task_entry.(
979 // OMP_IRB-NEXT:  entry:
980 // OMP_IRB-NEXT:    [[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4
981 // OMP_IRB-NEXT:    [[DOTPART_ID__ADDR_I:%.*]] = alloca i32*, align 8
982 // OMP_IRB-NEXT:    [[DOTPRIVATES__ADDR_I:%.*]] = alloca i8*, align 8
983 // OMP_IRB-NEXT:    [[DOTCOPY_FN__ADDR_I:%.*]] = alloca void (i8*, ...)*, align 8
984 // OMP_IRB-NEXT:    [[DOTTASK_T__ADDR_I:%.*]] = alloca i8*, align 8
985 // OMP_IRB-NEXT:    [[__CONTEXT_ADDR_I:%.*]] = alloca %struct.anon*, align 8
986 // OMP_IRB-NEXT:    [[CLEANUP_DEST_SLOT_I:%.*]] = alloca i32, align 4
987 // OMP_IRB-NEXT:    [[DOTADDR:%.*]] = alloca i32, align 4
988 // OMP_IRB-NEXT:    [[DOTADDR1:%.*]] = alloca %struct.kmp_task_t_with_privates*, align 8
989 // OMP_IRB-NEXT:    store i32 [[TMP0:%.*]], i32* [[DOTADDR]], align 4
990 // OMP_IRB-NEXT:    store %struct.kmp_task_t_with_privates* [[TMP1:%.*]], %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8
991 // OMP_IRB-NEXT:    [[TMP2:%.*]] = load i32, i32* [[DOTADDR]], align 4
992 // OMP_IRB-NEXT:    [[TMP3:%.*]] = load %struct.kmp_task_t_with_privates*, %struct.kmp_task_t_with_privates** [[DOTADDR1]], align 8
993 // OMP_IRB-NEXT:    [[TMP4:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T_WITH_PRIVATES:%.*]], %struct.kmp_task_t_with_privates* [[TMP3]], i32 0, i32 0
994 // OMP_IRB-NEXT:    [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T:%.*]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 2
995 // OMP_IRB-NEXT:    [[TMP6:%.*]] = getelementptr inbounds [[STRUCT_KMP_TASK_T]], %struct.kmp_task_t* [[TMP4]], i32 0, i32 0
996 // OMP_IRB-NEXT:    [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
997 // OMP_IRB-NEXT:    [[TMP8:%.*]] = bitcast i8* [[TMP7]] to %struct.anon*
998 // OMP_IRB-NEXT:    [[TMP9:%.*]] = bitcast %struct.kmp_task_t_with_privates* [[TMP3]] to i8*
999 // OMP_IRB-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META4:![0-9]+]])
1000 // OMP_IRB-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META7:![0-9]+]])
1001 // OMP_IRB-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]])
1002 // OMP_IRB-NEXT:    call void @llvm.experimental.noalias.scope.decl(metadata [[META11:![0-9]+]])
1003 // OMP_IRB-NEXT:    store i32 [[TMP2]], i32* [[DOTGLOBAL_TID__ADDR_I]], align 4, !noalias !13
1004 // OMP_IRB-NEXT:    store i32* [[TMP5]], i32** [[DOTPART_ID__ADDR_I]], align 8, !noalias !13
1005 // OMP_IRB-NEXT:    store i8* null, i8** [[DOTPRIVATES__ADDR_I]], align 8, !noalias !13
1006 // OMP_IRB-NEXT:    store void (i8*, ...)* null, void (i8*, ...)** [[DOTCOPY_FN__ADDR_I]], align 8, !noalias !13
1007 // OMP_IRB-NEXT:    store i8* [[TMP9]], i8** [[DOTTASK_T__ADDR_I]], align 8, !noalias !13
1008 // OMP_IRB-NEXT:    store %struct.anon* [[TMP8]], %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !13
1009 // OMP_IRB-NEXT:    [[TMP10:%.*]] = load %struct.anon*, %struct.anon** [[__CONTEXT_ADDR_I]], align 8, !noalias !13
1010 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM_I:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB12:[0-9]+]]) #[[ATTR2:[0-9]+]]
1011 // OMP_IRB-NEXT:    [[TMP11:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM_I]], i32 4) #[[ATTR2]]
1012 // OMP_IRB-NEXT:    [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0
1013 // OMP_IRB-NEXT:    br i1 [[TMP12]], label [[DOTCANCEL_EXIT_I:%.*]], label [[DOTCANCEL_CONTINUE_I:%.*]]
1014 // OMP_IRB:       .cancel.exit.i:
1015 // OMP_IRB-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT_I]], align 4, !noalias !13
1016 // OMP_IRB-NEXT:    br label [[DOTOMP_OUTLINED__EXIT:%.*]]
1017 // OMP_IRB:       .cancel.continue.i:
1018 // OMP_IRB-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT_I]], align 4, !noalias !13
1019 // OMP_IRB-NEXT:    br label [[DOTOMP_OUTLINED__EXIT]]
1020 // OMP_IRB:       .omp_outlined..exit:
1021 // OMP_IRB-NEXT:    [[CLEANUP_DEST_I:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT_I]], align 4, !noalias !13
1022 // OMP_IRB-NEXT:    ret i32 0
1023 //
1024 //
1025 // OMP_IRB-LABEL: @.omp_outlined..1(
1026 // OMP_IRB-NEXT:  entry:
1027 // OMP_IRB-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
1028 // OMP_IRB-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
1029 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
1030 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
1031 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
1032 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
1033 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
1034 // OMP_IRB-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
1035 // OMP_IRB-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
1036 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
1037 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_UB_]], align 4
1038 // OMP_IRB-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
1039 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
1040 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB17:[0-9]+]])
1041 // OMP_IRB-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB15:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
1042 // OMP_IRB-NEXT:    [[TMP0:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
1043 // OMP_IRB-NEXT:    [[TMP1:%.*]] = icmp slt i32 [[TMP0]], 0
1044 // OMP_IRB-NEXT:    [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[TMP0]], i32 0
1045 // OMP_IRB-NEXT:    store i32 [[TMP2]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
1046 // OMP_IRB-NEXT:    [[TMP3:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
1047 // OMP_IRB-NEXT:    store i32 [[TMP3]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
1048 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
1049 // OMP_IRB:       omp.inner.for.cond:
1050 // OMP_IRB-NEXT:    [[TMP4:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
1051 // OMP_IRB-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
1052 // OMP_IRB-NEXT:    [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
1053 // OMP_IRB-NEXT:    br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1054 // OMP_IRB:       omp.inner.for.body:
1055 // OMP_IRB-NEXT:    [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
1056 // OMP_IRB-NEXT:    switch i32 [[TMP6]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
1057 // OMP_IRB-NEXT:    i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
1058 // OMP_IRB-NEXT:    ]
1059 // OMP_IRB:       .omp.sections.case:
1060 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1061 // OMP_IRB-NEXT:    [[TMP7:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM1]], i32 3)
1062 // OMP_IRB-NEXT:    [[TMP8:%.*]] = icmp eq i32 [[TMP7]], 0
1063 // OMP_IRB-NEXT:    br i1 [[TMP8]], label [[DOTOMP_SECTIONS_CASE_SPLIT:%.*]], label [[DOTOMP_SECTIONS_CASE_CNCL:%.*]]
1064 // OMP_IRB:       .omp.sections.case.split:
1065 // OMP_IRB-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
1066 // OMP_IRB:       .omp.sections.case.cncl:
1067 // OMP_IRB-NEXT:    br label [[CANCEL_CONT:%.*]]
1068 // OMP_IRB:       .omp.sections.exit:
1069 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
1070 // OMP_IRB:       omp.inner.for.inc:
1071 // OMP_IRB-NEXT:    [[TMP9:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
1072 // OMP_IRB-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP9]], 1
1073 // OMP_IRB-NEXT:    store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
1074 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND]]
1075 // OMP_IRB:       omp.inner.for.end:
1076 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB19:[0-9]+]])
1077 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB15]], i32 [[OMP_GLOBAL_THREAD_NUM3]])
1078 // OMP_IRB-NEXT:    br label [[CANCEL_CONT]]
1079 // OMP_IRB:       cancel.cont:
1080 // OMP_IRB-NEXT:    ret void
1081 // OMP_IRB:       cancel.exit:
1082 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM2:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB19]])
1083 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB15]], i32 [[OMP_GLOBAL_THREAD_NUM2]])
1084 // OMP_IRB-NEXT:    br label [[CANCEL_CONT]]
1085 //
1086 //
1087 // OMP_IRB-LABEL: @.omp_outlined..2(
1088 // OMP_IRB-NEXT:  entry:
1089 // OMP_IRB-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
1090 // OMP_IRB-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
1091 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_LB_:%.*]] = alloca i32, align 4
1092 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_UB_:%.*]] = alloca i32, align 4
1093 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_ST_:%.*]] = alloca i32, align 4
1094 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_IL_:%.*]] = alloca i32, align 4
1095 // OMP_IRB-NEXT:    [[DOTOMP_SECTIONS_IV_:%.*]] = alloca i32, align 4
1096 // OMP_IRB-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
1097 // OMP_IRB-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
1098 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_LB_]], align 4
1099 // OMP_IRB-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_UB_]], align 4
1100 // OMP_IRB-NEXT:    store i32 1, i32* [[DOTOMP_SECTIONS_ST_]], align 4
1101 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_SECTIONS_IL_]], align 4
1102 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB21:[0-9]+]])
1103 // OMP_IRB-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB15]], i32 [[OMP_GLOBAL_THREAD_NUM]], i32 34, i32* [[DOTOMP_SECTIONS_IL_]], i32* [[DOTOMP_SECTIONS_LB_]], i32* [[DOTOMP_SECTIONS_UB_]], i32* [[DOTOMP_SECTIONS_ST_]], i32 1, i32 1)
1104 // OMP_IRB-NEXT:    [[TMP0:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
1105 // OMP_IRB-NEXT:    [[TMP1:%.*]] = icmp slt i32 [[TMP0]], 1
1106 // OMP_IRB-NEXT:    [[TMP2:%.*]] = select i1 [[TMP1]], i32 [[TMP0]], i32 1
1107 // OMP_IRB-NEXT:    store i32 [[TMP2]], i32* [[DOTOMP_SECTIONS_UB_]], align 4
1108 // OMP_IRB-NEXT:    [[TMP3:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_LB_]], align 4
1109 // OMP_IRB-NEXT:    store i32 [[TMP3]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
1110 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
1111 // OMP_IRB:       omp.inner.for.cond:
1112 // OMP_IRB-NEXT:    [[TMP4:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
1113 // OMP_IRB-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_UB_]], align 4
1114 // OMP_IRB-NEXT:    [[CMP:%.*]] = icmp sle i32 [[TMP4]], [[TMP5]]
1115 // OMP_IRB-NEXT:    br i1 [[CMP]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1116 // OMP_IRB:       omp.inner.for.body:
1117 // OMP_IRB-NEXT:    [[TMP6:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
1118 // OMP_IRB-NEXT:    switch i32 [[TMP6]], label [[DOTOMP_SECTIONS_EXIT:%.*]] [
1119 // OMP_IRB-NEXT:    i32 0, label [[DOTOMP_SECTIONS_CASE:%.*]]
1120 // OMP_IRB-NEXT:    i32 1, label [[DOTOMP_SECTIONS_CASE2:%.*]]
1121 // OMP_IRB-NEXT:    ]
1122 // OMP_IRB:       .omp.sections.case:
1123 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM1:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1124 // OMP_IRB-NEXT:    [[TMP7:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM1]], i32 3)
1125 // OMP_IRB-NEXT:    [[TMP8:%.*]] = icmp eq i32 [[TMP7]], 0
1126 // OMP_IRB-NEXT:    br i1 [[TMP8]], label [[DOTOMP_SECTIONS_CASE_SPLIT:%.*]], label [[DOTOMP_SECTIONS_CASE_CNCL:%.*]]
1127 // OMP_IRB:       .omp.sections.case.split:
1128 // OMP_IRB-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
1129 // OMP_IRB:       .omp.sections.case.cncl:
1130 // OMP_IRB-NEXT:    br label [[CANCEL_CONT:%.*]]
1131 // OMP_IRB:       .omp.sections.case2:
1132 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM3:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB1]])
1133 // OMP_IRB-NEXT:    [[TMP9:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM3]], i32 3)
1134 // OMP_IRB-NEXT:    [[TMP10:%.*]] = icmp eq i32 [[TMP9]], 0
1135 // OMP_IRB-NEXT:    br i1 [[TMP10]], label [[DOTOMP_SECTIONS_CASE2_SPLIT:%.*]], label [[DOTOMP_SECTIONS_CASE2_CNCL:%.*]]
1136 // OMP_IRB:       .omp.sections.case2.split:
1137 // OMP_IRB-NEXT:    br label [[DOTOMP_SECTIONS_EXIT]]
1138 // OMP_IRB:       .omp.sections.case2.cncl:
1139 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_END]]
1140 // OMP_IRB:       .omp.sections.exit:
1141 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
1142 // OMP_IRB:       omp.inner.for.inc:
1143 // OMP_IRB-NEXT:    [[TMP11:%.*]] = load i32, i32* [[DOTOMP_SECTIONS_IV_]], align 4
1144 // OMP_IRB-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP11]], 1
1145 // OMP_IRB-NEXT:    store i32 [[INC]], i32* [[DOTOMP_SECTIONS_IV_]], align 4
1146 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND]]
1147 // OMP_IRB:       omp.inner.for.end:
1148 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM5:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB23:[0-9]+]])
1149 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB15]], i32 [[OMP_GLOBAL_THREAD_NUM5]])
1150 // OMP_IRB-NEXT:    br label [[CANCEL_CONT]]
1151 // OMP_IRB:       cancel.cont:
1152 // OMP_IRB-NEXT:    ret void
1153 // OMP_IRB:       cancel.exit:
1154 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM4:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB23]])
1155 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB15]], i32 [[OMP_GLOBAL_THREAD_NUM4]])
1156 // OMP_IRB-NEXT:    br label [[CANCEL_CONT]]
1157 //
1158 //
1159 // OMP_IRB-LABEL: @.omp_outlined..3(
1160 // OMP_IRB-NEXT:  entry:
1161 // OMP_IRB-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
1162 // OMP_IRB-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
1163 // OMP_IRB-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32*, align 8
1164 // OMP_IRB-NEXT:    [[R_ADDR:%.*]] = alloca i32*, align 8
1165 // OMP_IRB-NEXT:    [[DOTOMP_IV:%.*]] = alloca i32, align 4
1166 // OMP_IRB-NEXT:    [[TMP:%.*]] = alloca i32, align 4
1167 // OMP_IRB-NEXT:    [[DOTCAPTURE_EXPR_:%.*]] = alloca i32, align 4
1168 // OMP_IRB-NEXT:    [[DOTCAPTURE_EXPR_1:%.*]] = alloca i32, align 4
1169 // OMP_IRB-NEXT:    [[I:%.*]] = alloca i32, align 4
1170 // OMP_IRB-NEXT:    [[DOTOMP_LB:%.*]] = alloca i32, align 4
1171 // OMP_IRB-NEXT:    [[DOTOMP_UB:%.*]] = alloca i32, align 4
1172 // OMP_IRB-NEXT:    [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
1173 // OMP_IRB-NEXT:    [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
1174 // OMP_IRB-NEXT:    [[R3:%.*]] = alloca i32, align 4
1175 // OMP_IRB-NEXT:    [[I4:%.*]] = alloca i32, align 4
1176 // OMP_IRB-NEXT:    [[DOTOMP_REDUCTION_RED_LIST:%.*]] = alloca [1 x i8*], align 8
1177 // OMP_IRB-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
1178 // OMP_IRB-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
1179 // OMP_IRB-NEXT:    store i32* [[ARGC:%.*]], i32** [[ARGC_ADDR]], align 8
1180 // OMP_IRB-NEXT:    store i32* [[R:%.*]], i32** [[R_ADDR]], align 8
1181 // OMP_IRB-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[ARGC_ADDR]], align 8
1182 // OMP_IRB-NEXT:    [[TMP1:%.*]] = load i32*, i32** [[R_ADDR]], align 8
1183 // OMP_IRB-NEXT:    [[TMP2:%.*]] = load i32, i32* [[TMP0]], align 4
1184 // OMP_IRB-NEXT:    store i32 [[TMP2]], i32* [[DOTCAPTURE_EXPR_]], align 4
1185 // OMP_IRB-NEXT:    [[TMP3:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
1186 // OMP_IRB-NEXT:    [[SUB:%.*]] = sub nsw i32 [[TMP3]], 0
1187 // OMP_IRB-NEXT:    [[DIV:%.*]] = sdiv i32 [[SUB]], 1
1188 // OMP_IRB-NEXT:    [[SUB2:%.*]] = sub nsw i32 [[DIV]], 1
1189 // OMP_IRB-NEXT:    store i32 [[SUB2]], i32* [[DOTCAPTURE_EXPR_1]], align 4
1190 // OMP_IRB-NEXT:    store i32 0, i32* [[I]], align 4
1191 // OMP_IRB-NEXT:    [[TMP4:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_]], align 4
1192 // OMP_IRB-NEXT:    [[CMP:%.*]] = icmp slt i32 0, [[TMP4]]
1193 // OMP_IRB-NEXT:    br i1 [[CMP]], label [[OMP_PRECOND_THEN:%.*]], label [[OMP_PRECOND_END:%.*]]
1194 // OMP_IRB:       omp.precond.then:
1195 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_LB]], align 4
1196 // OMP_IRB-NEXT:    [[TMP5:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4
1197 // OMP_IRB-NEXT:    store i32 [[TMP5]], i32* [[DOTOMP_UB]], align 4
1198 // OMP_IRB-NEXT:    store i32 1, i32* [[DOTOMP_STRIDE]], align 4
1199 // OMP_IRB-NEXT:    store i32 0, i32* [[DOTOMP_IS_LAST]], align 4
1200 // OMP_IRB-NEXT:    store i32 0, i32* [[R3]], align 4
1201 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB25:[0-9]+]])
1202 // OMP_IRB-NEXT:    call void @__kmpc_for_static_init_4(%struct.ident_t* @[[GLOB4]], i32 [[OMP_GLOBAL_THREAD_NUM]], i32 34, i32* [[DOTOMP_IS_LAST]], i32* [[DOTOMP_LB]], i32* [[DOTOMP_UB]], i32* [[DOTOMP_STRIDE]], i32 1, i32 1)
1203 // OMP_IRB-NEXT:    [[TMP6:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
1204 // OMP_IRB-NEXT:    [[TMP7:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4
1205 // OMP_IRB-NEXT:    [[CMP5:%.*]] = icmp sgt i32 [[TMP6]], [[TMP7]]
1206 // OMP_IRB-NEXT:    br i1 [[CMP5]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
1207 // OMP_IRB:       cond.true:
1208 // OMP_IRB-NEXT:    [[TMP8:%.*]] = load i32, i32* [[DOTCAPTURE_EXPR_1]], align 4
1209 // OMP_IRB-NEXT:    br label [[COND_END:%.*]]
1210 // OMP_IRB:       cond.false:
1211 // OMP_IRB-NEXT:    [[TMP9:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
1212 // OMP_IRB-NEXT:    br label [[COND_END]]
1213 // OMP_IRB:       cond.end:
1214 // OMP_IRB-NEXT:    [[COND:%.*]] = phi i32 [ [[TMP8]], [[COND_TRUE]] ], [ [[TMP9]], [[COND_FALSE]] ]
1215 // OMP_IRB-NEXT:    store i32 [[COND]], i32* [[DOTOMP_UB]], align 4
1216 // OMP_IRB-NEXT:    [[TMP10:%.*]] = load i32, i32* [[DOTOMP_LB]], align 4
1217 // OMP_IRB-NEXT:    store i32 [[TMP10]], i32* [[DOTOMP_IV]], align 4
1218 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND:%.*]]
1219 // OMP_IRB:       omp.inner.for.cond:
1220 // OMP_IRB-NEXT:    [[TMP11:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
1221 // OMP_IRB-NEXT:    [[TMP12:%.*]] = load i32, i32* [[DOTOMP_UB]], align 4
1222 // OMP_IRB-NEXT:    [[CMP6:%.*]] = icmp sle i32 [[TMP11]], [[TMP12]]
1223 // OMP_IRB-NEXT:    br i1 [[CMP6]], label [[OMP_INNER_FOR_BODY:%.*]], label [[OMP_INNER_FOR_END:%.*]]
1224 // OMP_IRB:       omp.inner.for.body:
1225 // OMP_IRB-NEXT:    [[TMP13:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
1226 // OMP_IRB-NEXT:    [[MUL:%.*]] = mul nsw i32 [[TMP13]], 1
1227 // OMP_IRB-NEXT:    [[ADD:%.*]] = add nsw i32 0, [[MUL]]
1228 // OMP_IRB-NEXT:    store i32 [[ADD]], i32* [[I4]], align 4
1229 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM7:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB27:[0-9]+]])
1230 // OMP_IRB-NEXT:    [[TMP14:%.*]] = call i32 @__kmpc_cancel(%struct.ident_t* @[[GLOB1]], i32 [[OMP_GLOBAL_THREAD_NUM7]], i32 2)
1231 // OMP_IRB-NEXT:    [[TMP15:%.*]] = icmp ne i32 [[TMP14]], 0
1232 // OMP_IRB-NEXT:    br i1 [[TMP15]], label [[DOTCANCEL_EXIT:%.*]], label [[DOTCANCEL_CONTINUE:%.*]]
1233 // OMP_IRB:       .cancel.exit:
1234 // OMP_IRB-NEXT:    br label [[CANCEL_EXIT:%.*]]
1235 // OMP_IRB:       .cancel.continue:
1236 // OMP_IRB-NEXT:    [[TMP16:%.*]] = load i32, i32* [[I4]], align 4
1237 // OMP_IRB-NEXT:    [[TMP17:%.*]] = load i32, i32* [[R3]], align 4
1238 // OMP_IRB-NEXT:    [[ADD8:%.*]] = add nsw i32 [[TMP17]], [[TMP16]]
1239 // OMP_IRB-NEXT:    store i32 [[ADD8]], i32* [[R3]], align 4
1240 // OMP_IRB-NEXT:    br label [[OMP_BODY_CONTINUE:%.*]]
1241 // OMP_IRB:       omp.body.continue:
1242 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_INC:%.*]]
1243 // OMP_IRB:       omp.inner.for.inc:
1244 // OMP_IRB-NEXT:    [[TMP18:%.*]] = load i32, i32* [[DOTOMP_IV]], align 4
1245 // OMP_IRB-NEXT:    [[ADD9:%.*]] = add nsw i32 [[TMP18]], 1
1246 // OMP_IRB-NEXT:    store i32 [[ADD9]], i32* [[DOTOMP_IV]], align 4
1247 // OMP_IRB-NEXT:    br label [[OMP_INNER_FOR_COND]]
1248 // OMP_IRB:       omp.inner.for.end:
1249 // OMP_IRB-NEXT:    br label [[OMP_LOOP_EXIT:%.*]]
1250 // OMP_IRB:       omp.loop.exit:
1251 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM11:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB29:[0-9]+]])
1252 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB4]], i32 [[OMP_GLOBAL_THREAD_NUM11]])
1253 // OMP_IRB-NEXT:    [[TMP19:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]], i64 0, i64 0
1254 // OMP_IRB-NEXT:    [[TMP20:%.*]] = bitcast i32* [[R3]] to i8*
1255 // OMP_IRB-NEXT:    store i8* [[TMP20]], i8** [[TMP19]], align 8
1256 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM12:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB29]])
1257 // OMP_IRB-NEXT:    [[TMP21:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
1258 // OMP_IRB-NEXT:    [[TMP22:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* @[[GLOB30:[0-9]+]], i32 [[OMP_GLOBAL_THREAD_NUM12]], i32 1, i64 8, i8* [[TMP21]], void (i8*, i8*)* @.omp.reduction.reduction_func, [8 x i32]* @.gomp_critical_user_.reduction.var)
1259 // OMP_IRB-NEXT:    switch i32 [[TMP22]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
1260 // OMP_IRB-NEXT:    i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
1261 // OMP_IRB-NEXT:    i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]
1262 // OMP_IRB-NEXT:    ]
1263 // OMP_IRB:       .omp.reduction.case1:
1264 // OMP_IRB-NEXT:    [[TMP23:%.*]] = load i32, i32* [[TMP1]], align 4
1265 // OMP_IRB-NEXT:    [[TMP24:%.*]] = load i32, i32* [[R3]], align 4
1266 // OMP_IRB-NEXT:    [[ADD13:%.*]] = add nsw i32 [[TMP23]], [[TMP24]]
1267 // OMP_IRB-NEXT:    store i32 [[ADD13]], i32* [[TMP1]], align 4
1268 // OMP_IRB-NEXT:    call void @__kmpc_end_reduce_nowait(%struct.ident_t* @[[GLOB30]], i32 [[OMP_GLOBAL_THREAD_NUM12]], [8 x i32]* @.gomp_critical_user_.reduction.var)
1269 // OMP_IRB-NEXT:    br label [[DOTOMP_REDUCTION_DEFAULT]]
1270 // OMP_IRB:       cancel.exit:
1271 // OMP_IRB-NEXT:    [[OMP_GLOBAL_THREAD_NUM10:%.*]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* @[[GLOB29]])
1272 // OMP_IRB-NEXT:    call void @__kmpc_for_static_fini(%struct.ident_t* @[[GLOB4]], i32 [[OMP_GLOBAL_THREAD_NUM10]])
1273 // OMP_IRB-NEXT:    br label [[CANCEL_CONT:%.*]]
1274 // OMP_IRB:       .omp.reduction.case2:
1275 // OMP_IRB-NEXT:    [[TMP25:%.*]] = load i32, i32* [[R3]], align 4
1276 // OMP_IRB-NEXT:    [[TMP26:%.*]] = atomicrmw add i32* [[TMP1]], i32 [[TMP25]] monotonic, align 4
1277 // OMP_IRB-NEXT:    br label [[DOTOMP_REDUCTION_DEFAULT]]
1278 // OMP_IRB:       .omp.reduction.default:
1279 // OMP_IRB-NEXT:    br label [[OMP_PRECOND_END]]
1280 // OMP_IRB:       omp.precond.end:
1281 // OMP_IRB-NEXT:    br label [[CANCEL_CONT]]
1282 // OMP_IRB:       cancel.cont:
1283 // OMP_IRB-NEXT:    ret void
1284 //
1285 //
1286 // OMP_IRB-LABEL: @.omp.reduction.reduction_func(
1287 // OMP_IRB-NEXT:  entry:
1288 // OMP_IRB-NEXT:    [[DOTADDR:%.*]] = alloca i8*, align 8
1289 // OMP_IRB-NEXT:    [[DOTADDR1:%.*]] = alloca i8*, align 8
1290 // OMP_IRB-NEXT:    store i8* [[TMP0:%.*]], i8** [[DOTADDR]], align 8
1291 // OMP_IRB-NEXT:    store i8* [[TMP1:%.*]], i8** [[DOTADDR1]], align 8
1292 // OMP_IRB-NEXT:    [[TMP2:%.*]] = load i8*, i8** [[DOTADDR]], align 8
1293 // OMP_IRB-NEXT:    [[TMP3:%.*]] = bitcast i8* [[TMP2]] to [1 x i8*]*
1294 // OMP_IRB-NEXT:    [[TMP4:%.*]] = load i8*, i8** [[DOTADDR1]], align 8
1295 // OMP_IRB-NEXT:    [[TMP5:%.*]] = bitcast i8* [[TMP4]] to [1 x i8*]*
1296 // OMP_IRB-NEXT:    [[TMP6:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[TMP5]], i64 0, i64 0
1297 // OMP_IRB-NEXT:    [[TMP7:%.*]] = load i8*, i8** [[TMP6]], align 8
1298 // OMP_IRB-NEXT:    [[TMP8:%.*]] = bitcast i8* [[TMP7]] to i32*
1299 // OMP_IRB-NEXT:    [[TMP9:%.*]] = getelementptr inbounds [1 x i8*], [1 x i8*]* [[TMP3]], i64 0, i64 0
1300 // OMP_IRB-NEXT:    [[TMP10:%.*]] = load i8*, i8** [[TMP9]], align 8
1301 // OMP_IRB-NEXT:    [[TMP11:%.*]] = bitcast i8* [[TMP10]] to i32*
1302 // OMP_IRB-NEXT:    [[TMP12:%.*]] = load i32, i32* [[TMP11]], align 4
1303 // OMP_IRB-NEXT:    [[TMP13:%.*]] = load i32, i32* [[TMP8]], align 4
1304 // OMP_IRB-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP12]], [[TMP13]]
1305 // OMP_IRB-NEXT:    store i32 [[ADD]], i32* [[TMP11]], align 4
1306 // OMP_IRB-NEXT:    ret void
1307 //
1308 //
1309 // OMP_SIMD-LABEL: @main(
1310 // OMP_SIMD-NEXT:  entry:
1311 // OMP_SIMD-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
1312 // OMP_SIMD-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32, align 4
1313 // OMP_SIMD-NEXT:    [[ARGV_ADDR:%.*]] = alloca i8**, align 8
1314 // OMP_SIMD-NEXT:    [[I:%.*]] = alloca i32, align 4
1315 // OMP_SIMD-NEXT:    [[R:%.*]] = alloca i32, align 4
1316 // OMP_SIMD-NEXT:    [[I6:%.*]] = alloca i32, align 4
1317 // OMP_SIMD-NEXT:    store i32 0, i32* [[RETVAL]], align 4
1318 // OMP_SIMD-NEXT:    store i32 [[ARGC:%.*]], i32* [[ARGC_ADDR]], align 4
1319 // OMP_SIMD-NEXT:    store i8** [[ARGV:%.*]], i8*** [[ARGV_ADDR]], align 8
1320 // OMP_SIMD-NEXT:    [[TMP0:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
1321 // OMP_SIMD-NEXT:    [[CONV:%.*]] = trunc i32 [[TMP0]] to i8
1322 // OMP_SIMD-NEXT:    [[TMP1:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
1323 // OMP_SIMD-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8*, i8** [[TMP1]], i64 0
1324 // OMP_SIMD-NEXT:    [[TMP2:%.*]] = load i8*, i8** [[ARRAYIDX]], align 8
1325 // OMP_SIMD-NEXT:    [[ARRAYIDX1:%.*]] = getelementptr inbounds i8, i8* [[TMP2]], i64 0
1326 // OMP_SIMD-NEXT:    store i8 [[CONV]], i8* [[ARRAYIDX1]], align 1
1327 // OMP_SIMD-NEXT:    [[TMP3:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
1328 // OMP_SIMD-NEXT:    [[TMP4:%.*]] = load i8**, i8*** [[ARGV_ADDR]], align 8
1329 // OMP_SIMD-NEXT:    [[ARRAYIDX2:%.*]] = getelementptr inbounds i8*, i8** [[TMP4]], i64 0
1330 // OMP_SIMD-NEXT:    [[TMP5:%.*]] = load i8*, i8** [[ARRAYIDX2]], align 8
1331 // OMP_SIMD-NEXT:    [[ARRAYIDX3:%.*]] = getelementptr inbounds i8, i8* [[TMP5]], i64 0
1332 // OMP_SIMD-NEXT:    [[TMP6:%.*]] = load i8, i8* [[ARRAYIDX3]], align 1
1333 // OMP_SIMD-NEXT:    [[CONV4:%.*]] = sext i8 [[TMP6]] to i32
1334 // OMP_SIMD-NEXT:    [[ADD:%.*]] = add nsw i32 [[CONV4]], [[TMP3]]
1335 // OMP_SIMD-NEXT:    [[CONV5:%.*]] = trunc i32 [[ADD]] to i8
1336 // OMP_SIMD-NEXT:    store i8 [[CONV5]], i8* [[ARRAYIDX3]], align 1
1337 // OMP_SIMD-NEXT:    store i32 0, i32* [[I]], align 4
1338 // OMP_SIMD-NEXT:    br label [[FOR_COND:%.*]]
1339 // OMP_SIMD:       for.cond:
1340 // OMP_SIMD-NEXT:    [[TMP7:%.*]] = load i32, i32* [[I]], align 4
1341 // OMP_SIMD-NEXT:    [[TMP8:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
1342 // OMP_SIMD-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP7]], [[TMP8]]
1343 // OMP_SIMD-NEXT:    br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
1344 // OMP_SIMD:       for.body:
1345 // OMP_SIMD-NEXT:    br label [[FOR_INC:%.*]]
1346 // OMP_SIMD:       for.inc:
1347 // OMP_SIMD-NEXT:    [[TMP9:%.*]] = load i32, i32* [[I]], align 4
1348 // OMP_SIMD-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP9]], 1
1349 // OMP_SIMD-NEXT:    store i32 [[INC]], i32* [[I]], align 4
1350 // OMP_SIMD-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP2:![0-9]+]]
1351 // OMP_SIMD:       for.end:
1352 // OMP_SIMD-NEXT:    store i32 0, i32* [[R]], align 4
1353 // OMP_SIMD-NEXT:    store i32 0, i32* [[I6]], align 4
1354 // OMP_SIMD-NEXT:    br label [[FOR_COND7:%.*]]
1355 // OMP_SIMD:       for.cond7:
1356 // OMP_SIMD-NEXT:    [[TMP10:%.*]] = load i32, i32* [[I6]], align 4
1357 // OMP_SIMD-NEXT:    [[TMP11:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
1358 // OMP_SIMD-NEXT:    [[CMP8:%.*]] = icmp slt i32 [[TMP10]], [[TMP11]]
1359 // OMP_SIMD-NEXT:    br i1 [[CMP8]], label [[FOR_BODY9:%.*]], label [[FOR_END13:%.*]]
1360 // OMP_SIMD:       for.body9:
1361 // OMP_SIMD-NEXT:    [[TMP12:%.*]] = load i32, i32* [[I6]], align 4
1362 // OMP_SIMD-NEXT:    [[TMP13:%.*]] = load i32, i32* [[R]], align 4
1363 // OMP_SIMD-NEXT:    [[ADD10:%.*]] = add nsw i32 [[TMP13]], [[TMP12]]
1364 // OMP_SIMD-NEXT:    store i32 [[ADD10]], i32* [[R]], align 4
1365 // OMP_SIMD-NEXT:    br label [[FOR_INC11:%.*]]
1366 // OMP_SIMD:       for.inc11:
1367 // OMP_SIMD-NEXT:    [[TMP14:%.*]] = load i32, i32* [[I6]], align 4
1368 // OMP_SIMD-NEXT:    [[INC12:%.*]] = add nsw i32 [[TMP14]], 1
1369 // OMP_SIMD-NEXT:    store i32 [[INC12]], i32* [[I6]], align 4
1370 // OMP_SIMD-NEXT:    br label [[FOR_COND7]], !llvm.loop [[LOOP4:![0-9]+]]
1371 // OMP_SIMD:       for.end13:
1372 // OMP_SIMD-NEXT:    [[TMP15:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
1373 // OMP_SIMD-NEXT:    ret i32 [[TMP15]]
1374 //
1375