1 // Test instrumentation of general constructs in C.
3 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOGEN %s
5 // RUN: llvm-profdata merge %S/Inputs/c-general.proftext -o %t.profdata
6 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
7 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v5 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
8 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v3 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
9 // Also check compatibility with older profiles.
10 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v1 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
12 // PGOGEN: @[[SLC:__profc_simple_loops]] = private global [4 x i64] zeroinitializer
13 // PGOGEN: @[[IFC:__profc_conditionals]] = private global [13 x i64] zeroinitializer
14 // PGOGEN: @[[EEC:__profc_early_exits]] = private global [9 x i64] zeroinitializer
15 // PGOGEN: @[[JMC:__profc_jumps]] = private global [22 x i64] zeroinitializer
16 // PGOGEN: @[[SWC:__profc_switches]] = private global [19 x i64] zeroinitializer
17 // PGOGEN: @[[BSC:__profc_big_switch]] = private global [17 x i64] zeroinitializer
18 // PGOGEN: @[[BOC:__profc_boolean_operators]] = private global [14 x i64] zeroinitializer
19 // PGOGEN: @[[BLC:__profc_boolop_loops]] = private global [13 x i64] zeroinitializer
20 // PGOGEN: @[[COC:__profc_conditional_operator]] = private global [3 x i64] zeroinitializer
21 // PGOGEN: @[[DFC:__profc_do_fallthrough]] = private global [4 x i64] zeroinitializer
22 // PGOGEN: @[[MAC:__profc_main]] = private global [1 x i64] zeroinitializer
23 // PGOGEN: @[[STC:__profc_c_general.c_static_func]] = private global [2 x i64] zeroinitializer
25 // PGOGEN-LABEL: @simple_loops()
26 // PGOUSE-LABEL: @simple_loops()
27 // PGOGEN: store {{.*}} @[[SLC]], i32 0, i32 0
28 void simple_loops(void) {
30 // PGOGEN: store {{.*}} @[[SLC]], i32 0, i32 1
31 // PGOUSE: br {{.*}} !prof ![[SL1:[0-9]+]]
32 for (i
= 0; i
< 100; ++i
) {
34 // PGOGEN: store {{.*}} @[[SLC]], i32 0, i32 2
35 // PGOUSE: br {{.*}} !prof ![[SL2:[0-9]+]]
38 // PGOGEN: store {{.*}} @[[SLC]], i32 0, i32 3
39 // PGOUSE: br {{.*}} !prof ![[SL3:[0-9]+]]
40 do {} while (i
++ < 75);
42 // PGOGEN-NOT: store {{.*}} @[[SLC]],
43 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
46 // PGOGEN-LABEL: @conditionals()
47 // PGOUSE-LABEL: @conditionals()
48 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 0
49 void conditionals(void) {
50 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 1
51 // PGOUSE: br {{.*}} !prof ![[IF1:[0-9]+]]
52 for (int i
= 0; i
< 100; ++i
) {
53 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 2
54 // PGOUSE: br {{.*}} !prof ![[IF2:[0-9]+]]
56 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 3
57 // PGOUSE: br {{.*}} !prof ![[IF3:[0-9]+]]
59 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 4
60 // PGOUSE: br {{.*}} !prof ![[IF4:[0-9]+]]
62 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 5
63 // PGOUSE: br {{.*}} !prof ![[IF5:[0-9]+]]
66 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 6
67 // PGOUSE: br {{.*}} !prof ![[IF6:[0-9]+]]
71 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 8
72 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 9
73 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 7
74 // PGOUSE: br {{.*}} !prof ![[IF7:[0-9]+]]
76 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 11
77 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 12
78 // PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 10
79 // PGOUSE: br {{.*}} !prof ![[IF8:[0-9]+]]
83 // PGOGEN-NOT: store {{.*}} @[[IFC]],
84 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
87 // PGOGEN-LABEL: @early_exits()
88 // PGOUSE-LABEL: @early_exits()
89 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 0
90 void early_exits(void) {
93 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 1
94 // PGOUSE: br {{.*}} !prof ![[EE1:[0-9]+]]
97 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 2
98 // PGOUSE: br {{.*}} !prof ![[EE2:[0-9]+]]
101 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 3
102 // PGOUSE: br {{.*}} !prof ![[EE3:[0-9]+]]
105 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 4
106 // PGOUSE: br {{.*}} !prof ![[EE4:[0-9]+]]
111 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 5
112 // PGOUSE: br {{.*}} !prof ![[EE5:[0-9]+]]
115 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 6
117 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 7
118 // PGOUSE: br {{.*}} !prof ![[EE6:[0-9]+]]
123 // PGOUSE: br {{.*}} !prof ![[EE7:[0-9]+]]
126 // PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 8
127 // Never reached -> no weights
130 // PGOGEN-NOT: store {{.*}} @[[EEC]],
131 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
134 // PGOGEN-LABEL: @jumps()
135 // PGOUSE-LABEL: @jumps()
136 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 0
140 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 1
141 // PGOUSE: br {{.*}} !prof ![[JM1:[0-9]+]]
142 for (i
= 0; i
< 2; ++i
) {
144 // Never reached -> no weights
147 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 3
149 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 4
150 // PGOUSE: br {{.*}} !prof ![[JM2:[0-9]+]]
155 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 5
156 // PGOUSE: br {{.*}} !prof ![[JM3:[0-9]+]]
158 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 6
160 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 7
161 // PGOUSE: br {{.*}} !prof ![[JM4:[0-9]+]]
166 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 8
168 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 9
170 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 10
173 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 11
174 // PGOUSE: br {{.*}} !prof ![[JM5:[0-9]+]]
178 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 12
179 // PGOUSE: br {{.*}} !prof ![[JM6:[0-9]+]]
181 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 13
183 // PGOUSE: switch {{.*}} [
184 // PGOUSE: ], !prof ![[JM7:[0-9]+]]
186 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 15
189 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 16
192 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 17
196 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 14
199 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 18
200 // PGOUSE: br {{.*}} !prof ![[JM8:[0-9]+]]
201 for (i
= 0; i
< 10; ++i
) {
203 // never reached -> no weights
205 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 20
207 // PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 21
208 // PGOUSE: br {{.*}} !prof ![[JM9:[0-9]+]]
212 // PGOGEN-NOT: store {{.*}} @[[JMC]],
213 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
216 // PGOGEN-LABEL: @switches()
217 // PGOUSE-LABEL: @switches()
218 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 0
219 void switches(void) {
220 static int weights
[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};
222 // No cases -> no weights
223 switch (weights
[0]) {
224 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 2
228 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 1
230 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 3
231 // PGOUSE: br {{.*}} !prof ![[SW1:[0-9]+]]
232 for (int i
= 0, len
= sizeof(weights
) / sizeof(weights
[0]); i
< len
; ++i
) {
233 // PGOUSE: switch {{.*}} [
234 // PGOUSE: ], !prof ![[SW2:[0-9]+]]
235 switch (i
[weights
]) {
236 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 5
238 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 6
239 // PGOUSE: br {{.*}} !prof ![[SW3:[0-9]+]]
242 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 7
244 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 8
245 // PGOUSE: br {{.*}} !prof ![[SW4:[0-9]+]]
248 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 9
250 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 10
251 // PGOUSE: br {{.*}} !prof ![[SW5:[0-9]+]]
254 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 11
256 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 12
257 // PGOUSE: br {{.*}} !prof ![[SW6:[0-9]+]]
259 // PGOUSE: switch {{.*}} [
260 // PGOUSE: ], !prof ![[SW7:[0-9]+]]
262 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 14
264 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 15
265 // PGOUSE: br {{.*}} !prof ![[SW8:[0-9]+]]
269 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 13
271 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 16
273 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 17
274 // PGOUSE: br {{.*}} !prof ![[SW9:[0-9]+]]
278 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 4
281 // PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 18
282 // Never reached -> no weights
285 // PGOGEN-NOT: store {{.*}} @[[SWC]],
286 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
289 // PGOGEN-LABEL: @big_switch()
290 // PGOUSE-LABEL: @big_switch()
291 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 0
292 void big_switch(void) {
293 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 1
294 // PGOUSE: br {{.*}} !prof ![[BS1:[0-9]+]]
295 for (int i
= 0; i
< 32; ++i
) {
296 // PGOUSE: switch {{.*}} [
297 // PGOUSE: ], !prof ![[BS2:[0-9]+]]
299 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 3
301 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 4
302 // PGOUSE: br {{.*}} !prof ![[BS3:[0-9]+]]
305 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 5
307 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 6
308 // PGOUSE: br {{.*}} !prof ![[BS4:[0-9]+]]
311 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 7
312 case (1 << 2) ... (1 << 12):
313 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 8
314 // PGOUSE: br {{.*}} !prof ![[BS5:[0-9]+]]
317 // The branch for the large case range above appears after the case body
318 // PGOUSE: br {{.*}} !prof ![[BS6:[0-9]+]]
320 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 9
322 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 10
323 // PGOUSE: br {{.*}} !prof ![[BS7:[0-9]+]]
326 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 11
327 case (1 << 14) ... (1 << 28):
328 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 12
329 // PGOUSE: br {{.*}} !prof ![[BS8:[0-9]+]]
332 // The branch for the large case range above appears after the case body
333 // PGOUSE: br {{.*}} !prof ![[BS9:[0-9]+]]
335 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 13
336 case (1 << 29) ... ((1 << 29) + 1):
337 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 14
338 // PGOUSE: br {{.*}} !prof ![[BS10:[0-9]+]]
341 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 15
343 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 16
344 // PGOUSE: br {{.*}} !prof ![[BS11:[0-9]+]]
348 // PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 2
351 // PGOGEN-NOT: store {{.*}} @[[BSC]],
352 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
356 // PGOGEN-LABEL: @boolean_operators()
357 // PGOUSE-LABEL: @boolean_operators()
358 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 0
359 void boolean_operators(void) {
361 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 1
362 // PGOUSE: br {{.*}} !prof ![[BO1:[0-9]+]]
363 for (int i
= 0; i
< 100; ++i
) {
364 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 2
365 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 3
366 // PGOUSE: br {{.*}} !prof ![[BO2:[0-9]+]]
369 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 4
370 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 5
371 // PGOUSE: br {{.*}} !prof ![[BO3:[0-9]+]]
374 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 8
375 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 9
376 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 6
377 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 7
378 // PGOUSE: br {{.*}} !prof ![[BO4:[0-9]+]]
379 // PGOUSE: br {{.*}} !prof ![[BO5:[0-9]+]]
380 v
= i
% 3 || i
% 2 || i
;
382 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 12
383 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 13
384 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 10
385 // PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 11
386 // PGOUSE: br {{.*}} !prof ![[BO6:[0-9]+]]
387 // PGOUSE: br {{.*}} !prof ![[BO7:[0-9]+]]
388 v
= i
% 2 && i
% 3 && i
;
391 // PGOGEN-NOT: store {{.*}} @[[BOC]],
392 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
395 // PGOGEN-LABEL: @boolop_loops()
396 // PGOUSE-LABEL: @boolop_loops()
397 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 0
398 void boolop_loops(void) {
401 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 2
402 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 3
403 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 1
404 // PGOUSE: br {{.*}} !prof ![[BL1:[0-9]+]]
405 // PGOUSE: br {{.*}} !prof ![[BL2:[0-9]+]]
409 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 5
410 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 6
411 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 4
412 // PGOUSE: br {{.*}} !prof ![[BL3:[0-9]+]]
413 // PGOUSE: br {{.*}} !prof ![[BL4:[0-9]+]]
414 while ((i
% 2) || (i
> 0))
417 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 8
418 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 9
419 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 7
420 // PGOUSE: br {{.*}} !prof ![[BL5:[0-9]+]]
421 // PGOUSE: br {{.*}} !prof ![[BL6:[0-9]+]]
422 for (i
= 100; i
&& i
> 50; --i
);
424 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 11
425 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 12
426 // PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 10
427 // PGOUSE: br {{.*}} !prof ![[BL7:[0-9]+]]
428 // PGOUSE: br {{.*}} !prof ![[BL8:[0-9]+]]
429 for (; (i
% 2) || (i
> 0); --i
);
431 // PGOGEN-NOT: store {{.*}} @[[BLC]],
432 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
435 // PGOGEN-LABEL: @conditional_operator()
436 // PGOUSE-LABEL: @conditional_operator()
437 // PGOGEN: store {{.*}} @[[COC]], i32 0, i32 0
438 void conditional_operator(void) {
441 // PGOGEN: store {{.*}} @[[COC]], i32 0, i32 1
442 // PGOUSE: br {{.*}} !prof ![[CO1:[0-9]+]]
443 int j
= i
< 50 ? i
: 1;
445 // PGOGEN: store {{.*}} @[[COC]], i32 0, i32 2
446 // PGOUSE: br {{.*}} !prof ![[CO2:[0-9]+]]
449 // PGOGEN-NOT: store {{.*}} @[[COC]],
450 // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
453 // PGOGEN-LABEL: @do_fallthrough()
454 // PGOUSE-LABEL: @do_fallthrough()
455 // PGOGEN: store {{.*}} @[[DFC]], i32 0, i32 0
456 void do_fallthrough(void) {
457 // PGOGEN: store {{.*}} @[[DFC]], i32 0, i32 1
458 // PGOUSE: br {{.*}} !prof ![[DF1:[0-9]+]]
459 for (int i
= 0; i
< 10; ++i
) {
461 // PGOGEN: store {{.*}} @[[DFC]], i32 0, i32 2
463 // The number of exits out of this do-loop via the break statement
464 // exceeds the counter value for the loop (which does not include the
465 // fallthrough count). Make sure that does not violate any assertions.
466 // PGOGEN: store {{.*}} @[[DFC]], i32 0, i32 3
467 // PGOUSE: br {{.*}} !prof ![[DF3:[0-9]+]]
470 // PGOUSE: br {{.*}} !prof ![[DF2:[0-9]+]]
475 // PGOGEN-LABEL: @static_func()
476 // PGOUSE-LABEL: @static_func()
477 // PGOGEN: store {{.*}} @[[STC]], i32 0, i32 0
478 static void static_func(void) {
479 // PGOGEN: store {{.*}} @[[STC]], i32 0, i32 1
480 // PGOUSE: br {{.*}} !prof ![[ST1:[0-9]+]]
481 for (int i
= 0; i
< 10; ++i
) {
485 // PGOUSE-DAG: ![[SL1]] = !{!"branch_weights", i32 101, i32 2}
486 // PGOUSE-DAG: ![[SL2]] = !{!"branch_weights", i32 101, i32 2}
487 // PGOUSE-DAG: ![[SL3]] = !{!"branch_weights", i32 76, i32 2}
489 // PGOUSE-DAG: ![[EE1]] = !{!"branch_weights", i32 1, i32 2}
490 // PGOUSE-DAG: ![[EE2]] = !{!"branch_weights", i32 52, i32 1}
491 // PGOUSE-DAG: ![[EE3]] = !{!"branch_weights", i32 2, i32 51}
492 // PGOUSE-DAG: ![[EE4]] = !{!"branch_weights", i32 26, i32 26}
493 // PGOUSE-DAG: ![[EE5]] = !{!"branch_weights", i32 2, i32 1}
494 // PGOUSE-DAG: ![[EE6]] = !{!"branch_weights", i32 2, i32 26}
495 // PGOUSE-DAG: ![[EE7]] = !{!"branch_weights", i32 26, i32 1}
497 // PGOUSE-DAG: ![[IF1]] = !{!"branch_weights", i32 101, i32 2}
498 // PGOUSE-DAG: ![[IF2]] = !{!"branch_weights", i32 51, i32 51}
499 // PGOUSE-DAG: ![[IF3]] = !{!"branch_weights", i32 51, i32 1}
500 // PGOUSE-DAG: ![[IF4]] = !{!"branch_weights", i32 34, i32 18}
501 // PGOUSE-DAG: ![[IF5]] = !{!"branch_weights", i32 34, i32 1}
502 // PGOUSE-DAG: ![[IF6]] = !{!"branch_weights", i32 17, i32 2}
503 // PGOUSE-DAG: ![[IF7]] = !{!"branch_weights", i32 100, i32 2}
504 // PGOUSE-DAG: ![[IF8]] = !{!"branch_weights", i32 100, i32 2}
506 // PGOUSE-DAG: ![[JM1]] = !{!"branch_weights", i32 2, i32 1}
507 // PGOUSE-DAG: ![[JM2]] = !{!"branch_weights", i32 1, i32 2}
508 // PGOUSE-DAG: ![[JM3]] = !{!"branch_weights", i32 1, i32 2}
509 // PGOUSE-DAG: ![[JM4]] = !{!"branch_weights", i32 1, i32 2}
510 // PGOUSE-DAG: ![[JM5]] = !{!"branch_weights", i32 3, i32 2}
511 // PGOUSE-DAG: ![[JM6]] = !{!"branch_weights", i32 1, i32 2}
512 // PGOUSE-DAG: ![[JM7]] = !{!"branch_weights", i32 1, i32 2, i32 2, i32 2}
513 // PGOUSE-DAG: ![[JM8]] = !{!"branch_weights", i32 11, i32 2}
514 // PGOUSE-DAG: ![[JM9]] = !{!"branch_weights", i32 10, i32 2}
516 // PGOUSE-DAG: ![[SW1]] = !{!"branch_weights", i32 16, i32 1}
517 // PGOUSE-DAG: ![[SW2]] = !{!"branch_weights", i32 6, i32 2, i32 3, i32 4, i32 5}
518 // PGOUSE-DAG: ![[SW3]] = !{!"branch_weights", i32 1, i32 2}
519 // PGOUSE-DAG: ![[SW4]] = !{!"branch_weights", i32 3, i32 2}
520 // PGOUSE-DAG: ![[SW5]] = !{!"branch_weights", i32 4, i32 1}
521 // PGOUSE-DAG: ![[SW6]] = !{!"branch_weights", i32 5, i32 1}
522 // PGOUSE-DAG: ![[SW7]] = !{!"branch_weights", i32 1, i32 2, i32 2, i32 2, i32 2}
523 // PGOUSE-DAG: ![[SW8]] = !{!"branch_weights", i32 5, i32 1}
524 // PGOUSE-DAG: ![[SW9]] = !{!"branch_weights", i32 2, i32 5}
526 // PGOUSE-DAG: ![[BS1]] = !{!"branch_weights", i32 33, i32 2}
527 // PGOUSE-DAG: ![[BS2]] = !{!"branch_weights", i32 29, i32 2, i32 2, i32 2, i32 2, i32 1}
528 // PGOUSE-DAG: ![[BS3]] = !{!"branch_weights", i32 1, i32 2}
529 // PGOUSE-DAG: ![[BS4]] = !{!"branch_weights", i32 2, i32 2}
530 // PGOUSE-DAG: ![[BS5]] = !{!"branch_weights", i32 12, i32 1}
531 // PGOUSE-DAG: ![[BS6]] = !{!"branch_weights", i32 12, i32 3}
532 // PGOUSE-DAG: ![[BS7]] = !{!"branch_weights", i32 2, i32 1}
533 // PGOUSE-DAG: ![[BS8]] = !{!"branch_weights", i32 16, i32 1}
534 // PGOUSE-DAG: ![[BS9]] = !{!"branch_weights", i32 16, i32 14}
535 // PGOUSE-DAG: ![[BS10]] = !{!"branch_weights", i32 2, i32 1}
536 // PGOUSE-DAG: ![[BS11]] = !{!"branch_weights", i32 3, i32 1}
538 // PGOUSE-DAG: ![[BO1]] = !{!"branch_weights", i32 101, i32 2}
539 // PGOUSE-DAG: ![[BO2]] = !{!"branch_weights", i32 67, i32 35}
540 // PGOUSE-DAG: ![[BO3]] = !{!"branch_weights", i32 67, i32 35}
541 // PGOUSE-DAG: ![[BO4]] = !{!"branch_weights", i32 67, i32 35}
542 // PGOUSE-DAG: ![[BO5]] = !{!"branch_weights", i32 18, i32 18}
543 // PGOUSE-DAG: ![[BO6]] = !{!"branch_weights", i32 51, i32 51}
544 // PGOUSE-DAG: ![[BO7]] = !{!"branch_weights", i32 34, i32 18}
545 // PGOUSE-DAG: ![[BL1]] = !{!"branch_weights", i32 52, i32 1}
546 // PGOUSE-DAG: ![[BL2]] = !{!"branch_weights", i32 51, i32 2}
547 // PGOUSE-DAG: ![[BL3]] = !{!"branch_weights", i32 26, i32 27}
548 // PGOUSE-DAG: ![[BL4]] = !{!"branch_weights", i32 51, i32 2}
549 // PGOUSE-DAG: ![[BL5]] = !{!"branch_weights", i32 52, i32 1}
550 // PGOUSE-DAG: ![[BL6]] = !{!"branch_weights", i32 51, i32 2}
551 // PGOUSE-DAG: ![[BL7]] = !{!"branch_weights", i32 26, i32 27}
552 // PGOUSE-DAG: ![[BL8]] = !{!"branch_weights", i32 51, i32 2}
553 // PGOUSE-DAG: ![[CO1]] = !{!"branch_weights", i32 1, i32 2}
554 // PGOUSE-DAG: ![[CO2]] = !{!"branch_weights", i32 2, i32 1}
556 // PGOUSE-DAG: ![[DF1]] = !{!"branch_weights", i32 11, i32 2}
557 // PGOUSE-DAG: ![[DF2]] = !{!"branch_weights", i32 3, i32 3}
558 // PGOUSE-DAG: ![[DF3]] = !{!"branch_weights", i32 9, i32 5}
560 // PGOUSE-DAG: ![[ST1]] = !{!"branch_weights", i32 11, i32 2}
562 int main(int argc
, const char *argv
[]) {
571 conditional_operator();