blob: af4ad15d9c1d89a45cd7e7c9dc6a07e4b0ab3b01 [file] [log] [blame]
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +00001; RUN: opt < %s -analyze -block-freq | FileCheck %s
2
Duncan P. N. Exon Smith84408d12014-04-25 04:38:37 +00003; A loop with multiple exits isn't irreducible. It should be handled
4; correctly.
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +00005;
6; CHECK-LABEL: Printing analysis {{.*}} for function 'multiexit':
7; CHECK-NEXT: block-frequency-info: multiexit
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +00008define void @multiexit(i1 %x) {
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +00009; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
10entry:
11 br label %loop.1
12
Duncan P. N. Exon Smith84408d12014-04-25 04:38:37 +000013; CHECK-NEXT: loop.1: float = 2.0,
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000014loop.1:
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +000015 br i1 %x, label %exit.1, label %loop.2, !prof !0
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000016
Duncan P. N. Exon Smith84408d12014-04-25 04:38:37 +000017; CHECK-NEXT: loop.2: float = 1.75,
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000018loop.2:
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +000019 br i1 %x, label %exit.2, label %loop.1, !prof !1
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000020
Duncan P. N. Exon Smith84408d12014-04-25 04:38:37 +000021; CHECK-NEXT: exit.1: float = 0.25,
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000022exit.1:
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000023 br label %return
24
Duncan P. N. Exon Smith84408d12014-04-25 04:38:37 +000025; CHECK-NEXT: exit.2: float = 0.75,
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000026exit.2:
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000027 br label %return
28
29; CHECK-NEXT: return: float = 1.0, int = [[ENTRY]]
30return:
31 ret void
32}
33
Duncan P. N. Exon Smith84408d12014-04-25 04:38:37 +000034!0 = metadata !{metadata !"branch_weights", i32 1, i32 7}
35!1 = metadata !{metadata !"branch_weights", i32 3, i32 4}
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000036
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +000037; Irreducible control flow
38; ========================
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000039;
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +000040; LoopInfo defines a loop as a non-trivial SCC dominated by a single block,
41; called the header. A given loop, L, can have sub-loops, which are loops
42; within the subgraph of L that excludes the header.
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000043;
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +000044; In addition to loops, -block-freq has limited support for irreducible SCCs,
45; which are SCCs with multiple entry blocks. Irreducible SCCs are discovered
46; on they fly, and modelled as loops with multiple headers.
47;
48; The headers of irreducible sub-SCCs consist of its entry blocks and all nodes
49; that are targets of a backedge within it (excluding backedges within true
50; sub-loops).
51;
52; -block-freq is currently designed to act like a block is inserted that
53; intercepts all the edges to the headers. All backedges and entries point to
54; this block. Its successors are the headers, which split the frequency
55; evenly.
56;
57; There are a number of testcases below. Only the first two have detailed
58; explanations.
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000059;
60; Testcase #1
61; ===========
62;
63; In this case c1 and c2 should have frequencies of 15/7 and 13/7,
64; respectively. To calculate this, consider assigning 1.0 to entry, and
65; distributing frequency iteratively (to infinity). At the first iteration,
66; entry gives 3/4 to c1 and 1/4 to c2. At every step after, c1 and c2 give 3/4
67; of what they have to each other. Somehow, all of it comes out to exit.
68;
69; c1 = 3/4 + 1/4*3/4 + 3/4*3^2/4^2 + 1/4*3^3/4^3 + 3/4*3^3/4^3 + ...
70; c2 = 1/4 + 3/4*3/4 + 1/4*3^2/4^2 + 3/4*3^3/4^3 + 1/4*3^3/4^3 + ...
71;
72; Simplify by splitting up the odd and even terms of the series and taking out
73; factors so that the infite series matches:
74;
75; c1 = 3/4 *(9^0/16^0 + 9^1/16^1 + 9^2/16^2 + ...)
76; + 3/16*(9^0/16^0 + 9^1/16^1 + 9^2/16^2 + ...)
77; c2 = 1/4 *(9^0/16^0 + 9^1/16^1 + 9^2/16^2 + ...)
78; + 9/16*(9^0/16^0 + 9^1/16^1 + 9^2/16^2 + ...)
79;
80; c1 = 15/16*(9^0/16^0 + 9^1/16^1 + 9^2/16^2 + ...)
81; c2 = 13/16*(9^0/16^0 + 9^1/16^1 + 9^2/16^2 + ...)
82;
83; Since this geometric series sums to 16/7:
84;
85; c1 = 15/7
86; c2 = 13/7
87;
88; If we treat c1 and c2 as members of the same loop, the exit frequency of the
89; loop as a whole is 1/4, so the loop scale should be 4. Summing c1 and c2
90; gives 28/7, or 4.0, which is nice confirmation of the math above.
91;
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +000092; -block-freq currently treats the two nodes as equals.
93define void @multientry(i1 %x) {
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000094; CHECK-LABEL: Printing analysis {{.*}} for function 'multientry':
95; CHECK-NEXT: block-frequency-info: multientry
Duncan P. N. Exon Smith42292ce2014-04-25 23:16:58 +000096entry:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +000097; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +000098 br i1 %x, label %c1, label %c2, !prof !2
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +000099
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000100c1:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000101; CHECK-NEXT: c1: float = 2.0,
102; The "correct" answer is: float = 2.142857{{[0-9]*}},
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +0000103 br i1 %x, label %c2, label %exit, !prof !2
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000104
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000105c2:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000106; CHECK-NEXT: c2: float = 2.0,
107; The "correct" answer is: float = 1.857142{{[0-9]*}},
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +0000108 br i1 %x, label %c1, label %exit, !prof !2
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000109
Duncan P. N. Exon Smith42292ce2014-04-25 23:16:58 +0000110exit:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000111; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000112 ret void
113}
114
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000115!2 = metadata !{metadata !"branch_weights", i32 3, i32 1}
116
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000117; Testcase #2
118; ===========
119;
120; In this case c1 and c2 should be treated as equals in a single loop. The
121; exit frequency is 1/3, so the scaling factor for the loop should be 3.0. The
122; loop is entered 2/3 of the time, and c1 and c2 split the total loop frequency
123; evenly (1/2), so they should each have frequencies of 1.0 (3.0*2/3*1/2).
124; Another way of computing this result is by assigning 1.0 to entry and showing
125; that c1 and c2 should accumulate frequencies of:
126;
127; 1/3 + 2/9 + 4/27 + 8/81 + ...
128; 2^0/3^1 + 2^1/3^2 + 2^2/3^3 + 2^3/3^4 + ...
129;
130; At the first step, c1 and c2 each get 1/3 of the entry. At each subsequent
131; step, c1 and c2 each get 1/3 of what's left in c1 and c2 combined. This
132; infinite series sums to 1.
133;
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000134; Since the currently algorithm *always* assumes entry blocks are equal,
135; -block-freq gets the right answers here.
136define void @crossloops(i2 %x) {
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000137; CHECK-LABEL: Printing analysis {{.*}} for function 'crossloops':
138; CHECK-NEXT: block-frequency-info: crossloops
Duncan P. N. Exon Smith42292ce2014-04-25 23:16:58 +0000139entry:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000140; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +0000141 switch i2 %x, label %exit [ i2 1, label %c1
142 i2 2, label %c2 ], !prof !3
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000143
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000144c1:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000145; CHECK-NEXT: c1: float = 1.0,
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +0000146 switch i2 %x, label %exit [ i2 1, label %c1
147 i2 2, label %c2 ], !prof !3
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000148
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000149c2:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000150; CHECK-NEXT: c2: float = 1.0,
Duncan P. N. Exon Smith58c89482014-04-25 04:38:35 +0000151 switch i2 %x, label %exit [ i2 1, label %c1
152 i2 2, label %c2 ], !prof !3
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000153
Duncan P. N. Exon Smith42292ce2014-04-25 23:16:58 +0000154exit:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000155; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000156 ret void
157}
158
Duncan P. N. Exon Smith10be9a82014-04-21 17:57:07 +0000159!3 = metadata !{metadata !"branch_weights", i32 2, i32 2, i32 2}
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000160
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000161; A true loop with irreducible control flow inside.
162define void @loop_around_irreducible(i1 %x) {
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000163; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_around_irreducible':
164; CHECK-NEXT: block-frequency-info: loop_around_irreducible
Duncan P. N. Exon Smith42292ce2014-04-25 23:16:58 +0000165entry:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000166; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000167 br label %loop
168
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000169loop:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000170; CHECK-NEXT: loop: float = 4.0, int = [[HEAD:[0-9]+]]
171 br i1 %x, label %left, label %right, !prof !4
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000172
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000173left:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000174; CHECK-NEXT: left: float = 8.0,
175 br i1 %x, label %right, label %loop.end, !prof !5
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000176
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000177right:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000178; CHECK-NEXT: right: float = 8.0,
179 br i1 %x, label %left, label %loop.end, !prof !5
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000180
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000181loop.end:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000182; CHECK-NEXT: loop.end: float = 4.0, int = [[HEAD]]
183 br i1 %x, label %loop, label %exit, !prof !5
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000184
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000185exit:
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000186; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
Duncan P. N. Exon Smithb3380ea2014-04-22 03:31:53 +0000187 ret void
188}
Duncan P. N. Exon Smithc5a31392014-04-28 20:02:29 +0000189!4 = metadata !{metadata !"branch_weights", i32 1, i32 1}
190!5 = metadata !{metadata !"branch_weights", i32 3, i32 1}
191
192; Two unrelated irreducible SCCs.
193define void @two_sccs(i1 %x) {
194; CHECK-LABEL: Printing analysis {{.*}} for function 'two_sccs':
195; CHECK-NEXT: block-frequency-info: two_sccs
196entry:
197; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
198 br i1 %x, label %a, label %b, !prof !6
199
200a:
201; CHECK-NEXT: a: float = 0.75,
202 br i1 %x, label %a.left, label %a.right, !prof !7
203
204a.left:
205; CHECK-NEXT: a.left: float = 1.5,
206 br i1 %x, label %a.right, label %exit, !prof !6
207
208a.right:
209; CHECK-NEXT: a.right: float = 1.5,
210 br i1 %x, label %a.left, label %exit, !prof !6
211
212b:
213; CHECK-NEXT: b: float = 0.25,
214 br i1 %x, label %b.left, label %b.right, !prof !7
215
216b.left:
217; CHECK-NEXT: b.left: float = 0.625,
218 br i1 %x, label %b.right, label %exit, !prof !8
219
220b.right:
221; CHECK-NEXT: b.right: float = 0.625,
222 br i1 %x, label %b.left, label %exit, !prof !8
223
224exit:
225; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
226 ret void
227}
228!6 = metadata !{metadata !"branch_weights", i32 3, i32 1}
229!7 = metadata !{metadata !"branch_weights", i32 1, i32 1}
230!8 = metadata !{metadata !"branch_weights", i32 4, i32 1}
231
232; A true loop inside irreducible control flow.
233define void @loop_inside_irreducible(i1 %x) {
234; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_inside_irreducible':
235; CHECK-NEXT: block-frequency-info: loop_inside_irreducible
236entry:
237; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
238 br i1 %x, label %left, label %right, !prof !9
239
240left:
241; CHECK-NEXT: left: float = 2.0,
242 br i1 %x, label %right, label %exit, !prof !10
243
244right:
245; CHECK-NEXT: right: float = 2.0, int = [[RIGHT:[0-9]+]]
246 br label %loop
247
248loop:
249; CHECK-NEXT: loop: float = 6.0,
250 br i1 %x, label %loop, label %right.end, !prof !11
251
252right.end:
253; CHECK-NEXT: right.end: float = 2.0, int = [[RIGHT]]
254 br i1 %x, label %left, label %exit, !prof !10
255
256exit:
257; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
258 ret void
259}
260!9 = metadata !{metadata !"branch_weights", i32 1, i32 1}
261!10 = metadata !{metadata !"branch_weights", i32 3, i32 1}
262!11 = metadata !{metadata !"branch_weights", i32 2, i32 1}
263
264; Irreducible control flow in a branch that's in a true loop.
265define void @loop_around_branch_with_irreducible(i1 %x) {
266; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_around_branch_with_irreducible':
267; CHECK-NEXT: block-frequency-info: loop_around_branch_with_irreducible
268entry:
269; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
270 br label %loop
271
272loop:
273; CHECK-NEXT: loop: float = 2.0, int = [[LOOP:[0-9]+]]
274 br i1 %x, label %normal, label %irreducible.entry, !prof !12
275
276normal:
277; CHECK-NEXT: normal: float = 1.5,
278 br label %loop.end
279
280irreducible.entry:
281; CHECK-NEXT: irreducible.entry: float = 0.5, int = [[IRREDUCIBLE:[0-9]+]]
282 br i1 %x, label %left, label %right, !prof !13
283
284left:
285; CHECK-NEXT: left: float = 1.0,
286 br i1 %x, label %right, label %irreducible.exit, !prof !12
287
288right:
289; CHECK-NEXT: right: float = 1.0,
290 br i1 %x, label %left, label %irreducible.exit, !prof !12
291
292irreducible.exit:
293; CHECK-NEXT: irreducible.exit: float = 0.5, int = [[IRREDUCIBLE]]
294 br label %loop.end
295
296loop.end:
297; CHECK-NEXT: loop.end: float = 2.0, int = [[LOOP]]
298 br i1 %x, label %loop, label %exit, !prof !13
299
300exit:
301; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
302 ret void
303}
304!12 = metadata !{metadata !"branch_weights", i32 3, i32 1}
305!13 = metadata !{metadata !"branch_weights", i32 1, i32 1}
306
307; Irreducible control flow between two true loops.
308define void @loop_around_branch_with_irreducible_around_loop(i1 %x) {
309; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_around_branch_with_irreducible_around_loop':
310; CHECK-NEXT: block-frequency-info: loop_around_branch_with_irreducible_around_loop
311entry:
312; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
313 br label %loop
314
315loop:
316; CHECK-NEXT: loop: float = 3.0, int = [[LOOP:[0-9]+]]
317 br i1 %x, label %normal, label %irreducible, !prof !14
318
319normal:
320; CHECK-NEXT: normal: float = 2.0,
321 br label %loop.end
322
323irreducible:
324; CHECK-NEXT: irreducible: float = 1.0,
325 br i1 %x, label %left, label %right, !prof !15
326
327left:
328; CHECK-NEXT: left: float = 2.0,
329 br i1 %x, label %right, label %loop.end, !prof !16
330
331right:
332; CHECK-NEXT: right: float = 2.0, int = [[RIGHT:[0-9]+]]
333 br label %right.loop
334
335right.loop:
336; CHECK-NEXT: right.loop: float = 10.0,
337 br i1 %x, label %right.loop, label %right.end, !prof !17
338
339right.end:
340; CHECK-NEXT: right.end: float = 2.0, int = [[RIGHT]]
341 br i1 %x, label %left, label %loop.end, !prof !16
342
343loop.end:
344; CHECK-NEXT: loop.end: float = 3.0, int = [[LOOP]]
345 br i1 %x, label %loop, label %exit, !prof !14
346
347exit:
348; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
349 ret void
350}
351!14 = metadata !{metadata !"branch_weights", i32 2, i32 1}
352!15 = metadata !{metadata !"branch_weights", i32 1, i32 1}
353!16 = metadata !{metadata !"branch_weights", i32 3, i32 1}
354!17 = metadata !{metadata !"branch_weights", i32 4, i32 1}
355
356; An irreducible SCC with a non-header.
357define void @nonheader(i1 %x) {
358; CHECK-LABEL: Printing analysis {{.*}} for function 'nonheader':
359; CHECK-NEXT: block-frequency-info: nonheader
360entry:
361; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
362 br i1 %x, label %left, label %right, !prof !18
363
364left:
365; CHECK-NEXT: left: float = 1.0,
366 br i1 %x, label %bottom, label %exit, !prof !19
367
368right:
369; CHECK-NEXT: right: float = 1.0,
370 br i1 %x, label %bottom, label %exit, !prof !20
371
372bottom:
373; CHECK-NEXT: bottom: float = 1.0,
374 br i1 %x, label %left, label %right, !prof !18
375
376exit:
377; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
378 ret void
379}
380!18 = metadata !{metadata !"branch_weights", i32 1, i32 1}
381!19 = metadata !{metadata !"branch_weights", i32 1, i32 3}
382!20 = metadata !{metadata !"branch_weights", i32 3, i32 1}
383
384; An irreducible SCC with an irreducible sub-SCC. In the current version of
385; -block-freq, this means an extra header.
386;
387; This testcases uses non-trivial branch weights. The CHECK statements here
388; will start to fail if we change -block-freq to be more accurate. Currently,
389; we expect left, right and top to be treated as equal headers.
390define void @nonentry_header(i1 %x, i2 %y) {
391; CHECK-LABEL: Printing analysis {{.*}} for function 'nonentry_header':
392; CHECK-NEXT: block-frequency-info: nonentry_header
393entry:
394; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
395 br i1 %x, label %left, label %right, !prof !21
396
397left:
398; CHECK-NEXT: left: float = 3.0,
399 br i1 %x, label %top, label %bottom, !prof !22
400
401right:
402; CHECK-NEXT: right: float = 3.0,
403 br i1 %x, label %top, label %bottom, !prof !22
404
405top:
406; CHECK-NEXT: top: float = 3.0,
407 switch i2 %y, label %exit [ i2 0, label %left
408 i2 1, label %right
409 i2 2, label %bottom ], !prof !23
410
411bottom:
412; CHECK-NEXT: bottom: float = 4.5,
413 br label %top
414
415exit:
416; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
417 ret void
418}
419!21 = metadata !{metadata !"branch_weights", i32 2, i32 1}
420!22 = metadata !{metadata !"branch_weights", i32 1, i32 1}
421!23 = metadata !{metadata !"branch_weights", i32 8, i32 1, i32 3, i32 12}