blob: e0979d89473903324c2bd1def05b230f9889665b [file] [log] [blame]
Kyle Butt7fbec9b2017-02-15 19:49:14 +00001; RUN: llc -O2 < %s | FileCheck %s
Kyle Butt0846e562016-10-11 20:36:43 +00002target datalayout = "e-m:e-i64:64-n32:64"
3target triple = "powerpc64le-grtev4-linux-gnu"
4
5; Intended layout:
Kyle Butt7fbec9b2017-02-15 19:49:14 +00006; The chain-based outlining produces the layout
Kyle Butt0846e562016-10-11 20:36:43 +00007; test1
8; test2
9; test3
10; test4
Kyle Butt0846e562016-10-11 20:36:43 +000011; optional1
12; optional2
13; optional3
14; optional4
Kyle Butt7fbec9b2017-02-15 19:49:14 +000015; exit
Kyle Butt0846e562016-10-11 20:36:43 +000016; Tail duplication puts test n+1 at the end of optional n
17; so optional1 includes a copy of test2 at the end, and branches
18; to test3 (at the top) or falls through to optional 2.
Kyle Butt7fbec9b2017-02-15 19:49:14 +000019; The CHECK statements check for the whole string of tests
Kyle Butt0846e562016-10-11 20:36:43 +000020; and then check that the correct test has been duplicated into the end of
21; the optional blocks and that the optional blocks are in the correct order.
Kyle Butt7fbec9b2017-02-15 19:49:14 +000022;CHECK-LABEL: straight_test:
Kyle Butt0846e562016-10-11 20:36:43 +000023; test1 may have been merged with entry
24;CHECK: mr [[TAGREG:[0-9]+]], 3
25;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 1
Kyle Butt7fbec9b2017-02-15 19:49:14 +000026;CHECK-NEXT: bc 12, 1, .[[OPT1LABEL:[_0-9A-Za-z]+]]
27;CHECK-NEXT: # %test2
Kyle Butt0846e562016-10-11 20:36:43 +000028;CHECK-NEXT: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 30, 30
Kyle Butt7fbec9b2017-02-15 19:49:14 +000029;CHECK-NEXT: bne 0, .[[OPT2LABEL:[_0-9A-Za-z]+]]
30;CHECK-NEXT: .[[TEST3LABEL:[_0-9A-Za-z]+]]: # %test3
Kyle Butt0846e562016-10-11 20:36:43 +000031;CHECK-NEXT: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 29, 29
Kyle Butt7fbec9b2017-02-15 19:49:14 +000032;CHECK-NEXT: bne 0, .[[OPT3LABEL:[_0-9A-Za-z]+]]
33;CHECK-NEXT: .[[TEST4LABEL:[_0-9A-Za-z]+]]: # %test4
Kyle Butt0846e562016-10-11 20:36:43 +000034;CHECK-NEXT: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 28, 28
Kyle Butt7fbec9b2017-02-15 19:49:14 +000035;CHECK-NEXT: bne 0, .[[OPT4LABEL:[_0-9A-Za-z]+]]
36;CHECK-NEXT: .[[EXITLABEL:[_0-9A-Za-z]+]]: # %exit
Kyle Butt0846e562016-10-11 20:36:43 +000037;CHECK: blr
Kyle Butt7fbec9b2017-02-15 19:49:14 +000038;CHECK-NEXT: .[[OPT1LABEL]]:
Kyle Butt0846e562016-10-11 20:36:43 +000039;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 30, 30
Kyle Butt7fbec9b2017-02-15 19:49:14 +000040;CHECK-NEXT: beq 0, .[[TEST3LABEL]]
41;CHECK-NEXT: .[[OPT2LABEL]]:
Kyle Butt0846e562016-10-11 20:36:43 +000042;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 29, 29
Kyle Butt7fbec9b2017-02-15 19:49:14 +000043;CHECK-NEXT: beq 0, .[[TEST4LABEL]]
44;CHECK-NEXT: .[[OPT3LABEL]]:
Kyle Butt0846e562016-10-11 20:36:43 +000045;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 28, 28
Kyle Butt7fbec9b2017-02-15 19:49:14 +000046;CHECK-NEXT: beq 0, .[[EXITLABEL]]
47;CHECK-NEXT: .[[OPT4LABEL]]:
48;CHECK: b .[[EXITLABEL]]
Kyle Butt0846e562016-10-11 20:36:43 +000049
Kyle Butt7fbec9b2017-02-15 19:49:14 +000050define void @straight_test(i32 %tag) {
Kyle Butt0846e562016-10-11 20:36:43 +000051entry:
52 br label %test1
53test1:
54 %tagbit1 = and i32 %tag, 1
55 %tagbit1eq0 = icmp eq i32 %tagbit1, 0
Kyle Butt7fbec9b2017-02-15 19:49:14 +000056 br i1 %tagbit1eq0, label %test2, label %optional1, !prof !1
Kyle Butt0846e562016-10-11 20:36:43 +000057optional1:
58 call void @a()
59 call void @a()
60 call void @a()
61 call void @a()
62 br label %test2
63test2:
64 %tagbit2 = and i32 %tag, 2
65 %tagbit2eq0 = icmp eq i32 %tagbit2, 0
Kyle Butt7fbec9b2017-02-15 19:49:14 +000066 br i1 %tagbit2eq0, label %test3, label %optional2, !prof !1
Kyle Butt0846e562016-10-11 20:36:43 +000067optional2:
68 call void @b()
69 call void @b()
70 call void @b()
71 call void @b()
72 br label %test3
73test3:
74 %tagbit3 = and i32 %tag, 4
75 %tagbit3eq0 = icmp eq i32 %tagbit3, 0
Kyle Butt7fbec9b2017-02-15 19:49:14 +000076 br i1 %tagbit3eq0, label %test4, label %optional3, !prof !1
Kyle Butt0846e562016-10-11 20:36:43 +000077optional3:
78 call void @c()
79 call void @c()
80 call void @c()
81 call void @c()
82 br label %test4
83test4:
84 %tagbit4 = and i32 %tag, 8
85 %tagbit4eq0 = icmp eq i32 %tagbit4, 0
Kyle Butt7fbec9b2017-02-15 19:49:14 +000086 br i1 %tagbit4eq0, label %exit, label %optional4, !prof !1
Kyle Butt0846e562016-10-11 20:36:43 +000087optional4:
88 call void @d()
89 call void @d()
90 call void @d()
91 call void @d()
92 br label %exit
93exit:
94 ret void
95}
96
Kyle Butt7fbec9b2017-02-15 19:49:14 +000097; Intended layout:
Kyle Butt1fa60302017-03-03 01:00:22 +000098; The chain-of-triangles based duplicating produces the layout
99; test1
100; test2
101; test3
102; test4
103; optional1
104; optional2
105; optional3
106; optional4
107; exit
108; even for 50/50 branches.
109; Tail duplication puts test n+1 at the end of optional n
110; so optional1 includes a copy of test2 at the end, and branches
111; to test3 (at the top) or falls through to optional 2.
112; The CHECK statements check for the whole string of tests
113; and then check that the correct test has been duplicated into the end of
114; the optional blocks and that the optional blocks are in the correct order.
115;CHECK-LABEL: straight_test_50:
116; test1 may have been merged with entry
117;CHECK: mr [[TAGREG:[0-9]+]], 3
118;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 1
119;CHECK-NEXT: bc 12, 1, .[[OPT1LABEL:[_0-9A-Za-z]+]]
120;CHECK-NEXT: # %test2
121;CHECK-NEXT: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 30, 30
122;CHECK-NEXT: bne 0, .[[OPT2LABEL:[_0-9A-Za-z]+]]
123;CHECK-NEXT: .[[TEST3LABEL:[_0-9A-Za-z]+]]: # %test3
124;CHECK-NEXT: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 29, 29
125;CHECK-NEXT: bne 0, .[[OPT3LABEL:[_0-9A-Za-z]+]]
126;CHECK-NEXT: .[[TEST4LABEL:[_0-9A-Za-z]+]]: # %test4
127;CHECK-NEXT: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 28, 28
128;CHECK-NEXT: bne 0, .[[OPT4LABEL:[_0-9A-Za-z]+]]
129;CHECK-NEXT: .[[EXITLABEL:[_0-9A-Za-z]+]]: # %exit
130;CHECK: blr
131;CHECK-NEXT: .[[OPT1LABEL]]:
132;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 30, 30
133;CHECK-NEXT: beq 0, .[[TEST3LABEL]]
134;CHECK-NEXT: .[[OPT2LABEL]]:
135;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 29, 29
136;CHECK-NEXT: beq 0, .[[TEST4LABEL]]
137;CHECK-NEXT: .[[OPT3LABEL]]:
138;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 28, 28
139;CHECK-NEXT: beq 0, .[[EXITLABEL]]
140;CHECK-NEXT: .[[OPT4LABEL]]:
141;CHECK: b .[[EXITLABEL]]
142
143define void @straight_test_50(i32 %tag) {
144entry:
145 br label %test1
146test1:
147 %tagbit1 = and i32 %tag, 1
148 %tagbit1eq0 = icmp eq i32 %tagbit1, 0
149 br i1 %tagbit1eq0, label %test2, label %optional1, !prof !2
150optional1:
151 call void @a()
152 br label %test2
153test2:
154 %tagbit2 = and i32 %tag, 2
155 %tagbit2eq0 = icmp eq i32 %tagbit2, 0
156 br i1 %tagbit2eq0, label %test3, label %optional2, !prof !2
157optional2:
158 call void @b()
159 br label %test3
160test3:
161 %tagbit3 = and i32 %tag, 4
162 %tagbit3eq0 = icmp eq i32 %tagbit3, 0
163 br i1 %tagbit3eq0, label %test4, label %optional3, !prof !2
164optional3:
165 call void @c()
166 br label %test4
167test4:
168 %tagbit4 = and i32 %tag, 8
169 %tagbit4eq0 = icmp eq i32 %tagbit4, 0
170 br i1 %tagbit4eq0, label %exit, label %optional4, !prof !1
171optional4:
172 call void @d()
173 br label %exit
174exit:
175 ret void
176}
177
178; Intended layout:
Kyle Butt7fbec9b2017-02-15 19:49:14 +0000179; The chain-based outlining produces the layout
180; entry
181; --- Begin loop ---
182; for.latch
183; for.check
184; test1
185; test2
186; test3
187; test4
188; optional1
189; optional2
190; optional3
191; optional4
192; --- End loop ---
193; exit
194; The CHECK statements check for the whole string of tests and exit block,
195; and then check that the correct test has been duplicated into the end of
196; the optional blocks and that the optional blocks are in the correct order.
197;CHECK-LABEL: loop_test:
198;CHECK: add [[TAGPTRREG:[0-9]+]], 3, 4
199;CHECK: .[[LATCHLABEL:[._0-9A-Za-z]+]]: # %for.latch
200;CHECK: addi
201;CHECK: .[[CHECKLABEL:[._0-9A-Za-z]+]]: # %for.check
202;CHECK: lwz [[TAGREG:[0-9]+]], 0([[TAGPTRREG]])
203;CHECK: # %test1
204;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 1
205;CHECK-NEXT: bc 12, 1, .[[OPT1LABEL:[._0-9A-Za-z]+]]
206;CHECK-NEXT: # %test2
207;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 30, 30
208;CHECK-NEXT: bne 0, .[[OPT2LABEL:[._0-9A-Za-z]+]]
209;CHECK-NEXT: .[[TEST3LABEL:[._0-9A-Za-z]+]]: # %test3
210;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 29, 29
211;CHECK-NEXT: bne 0, .[[OPT3LABEL:[._0-9A-Za-z]+]]
212;CHECK-NEXT: .[[TEST4LABEL:[._0-9A-Za-z]+]]: # %{{(test4|optional3)}}
213;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 28, 28
214;CHECK-NEXT: beq 0, .[[LATCHLABEL]]
215;CHECK-NEXT: b .[[OPT4LABEL:[._0-9A-Za-z]+]]
216;CHECK: [[OPT1LABEL]]
217;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 30, 30
218;CHECK-NEXT: beq 0, .[[TEST3LABEL]]
219;CHECK-NEXT: .[[OPT2LABEL]]
220;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 29, 29
221;CHECK-NEXT: beq 0, .[[TEST4LABEL]]
222;CHECK-NEXT: .[[OPT3LABEL]]
223;CHECK: rlwinm. {{[0-9]+}}, [[TAGREG]], 0, 28, 28
224;CHECK-NEXT: beq 0, .[[LATCHLABEL]]
225;CHECK: [[OPT4LABEL]]:
226;CHECK: b .[[LATCHLABEL]]
227define void @loop_test(i32* %tags, i32 %count) {
228entry:
229 br label %for.check
230for.check:
231 %count.loop = phi i32 [%count, %entry], [%count.sub, %for.latch]
232 %done.count = icmp ugt i32 %count.loop, 0
233 %tag_ptr = getelementptr inbounds i32, i32* %tags, i32 %count
234 %tag = load i32, i32* %tag_ptr
235 %done.tag = icmp eq i32 %tag, 0
236 %done = and i1 %done.count, %done.tag
237 br i1 %done, label %test1, label %exit, !prof !1
238test1:
239 %tagbit1 = and i32 %tag, 1
240 %tagbit1eq0 = icmp eq i32 %tagbit1, 0
241 br i1 %tagbit1eq0, label %test2, label %optional1, !prof !1
242optional1:
243 call void @a()
244 call void @a()
245 call void @a()
246 call void @a()
247 br label %test2
248test2:
249 %tagbit2 = and i32 %tag, 2
250 %tagbit2eq0 = icmp eq i32 %tagbit2, 0
251 br i1 %tagbit2eq0, label %test3, label %optional2, !prof !1
252optional2:
253 call void @b()
254 call void @b()
255 call void @b()
256 call void @b()
257 br label %test3
258test3:
259 %tagbit3 = and i32 %tag, 4
260 %tagbit3eq0 = icmp eq i32 %tagbit3, 0
261 br i1 %tagbit3eq0, label %test4, label %optional3, !prof !1
262optional3:
263 call void @c()
264 call void @c()
265 call void @c()
266 call void @c()
267 br label %test4
268test4:
269 %tagbit4 = and i32 %tag, 8
270 %tagbit4eq0 = icmp eq i32 %tagbit4, 0
271 br i1 %tagbit4eq0, label %for.latch, label %optional4, !prof !1
272optional4:
273 call void @d()
274 call void @d()
275 call void @d()
276 call void @d()
277 br label %for.latch
278for.latch:
279 %count.sub = sub i32 %count.loop, 1
280 br label %for.check
281exit:
282 ret void
283}
284
285; The block then2 is not unavoidable, meaning it does not dominate the exit.
286; But since it can be tail-duplicated, it should be placed as a fallthrough from
287; test2 and copied. The purpose here is to make sure that the tail-duplication
288; code is independent of the outlining code, which works by choosing the
289; "unavoidable" blocks.
290; CHECK-LABEL: avoidable_test:
291; CHECK: # %entry
292; CHECK: andi.
293; CHECK: # %test2
294; Make sure then2 falls through from test2
295; CHECK-NOT: # %{{[-_a-zA-Z0-9]+}}
296; CHECK: # %then2
297; CHECK: rlwinm. {{[0-9]+}}, {{[0-9]+}}, 0, 29, 29
298; CHECK: # %else1
299; CHECK: bl a
300; CHECK: bl a
301; Make sure then2 was copied into else1
302; CHECK: rlwinm. {{[0-9]+}}, {{[0-9]+}}, 0, 29, 29
303; CHECK: # %end1
304; CHECK: bl d
305; CHECK: # %else2
306; CHECK: bl c
307; CHECK: # %end2
308define void @avoidable_test(i32 %tag) {
309entry:
310 br label %test1
311test1:
312 %tagbit1 = and i32 %tag, 1
313 %tagbit1eq0 = icmp eq i32 %tagbit1, 0
314 br i1 %tagbit1eq0, label %test2, label %else1, !prof !1 ; %test2 more likely
315else1:
316 call void @a()
317 call void @a()
318 br label %then2
319test2:
320 %tagbit2 = and i32 %tag, 2
321 %tagbit2eq0 = icmp eq i32 %tagbit2, 0
322 br i1 %tagbit2eq0, label %then2, label %else2, !prof !1 ; %then2 more likely
323then2:
324 %tagbit3 = and i32 %tag, 4
325 %tagbit3eq0 = icmp eq i32 %tagbit3, 0
326 br i1 %tagbit3eq0, label %end2, label %end1, !prof !1 ; %end2 more likely
327else2:
328 call void @c()
329 br label %end2
330end2:
331 ret void
332end1:
333 call void @d()
334 ret void
335}
336
337; CHECK-LABEL: trellis_test
338; The number in the block labels is the expected block frequency given the
339; probabilities annotated. There is a conflict in the b;c->d;e trellis that
340; should be resolved as c->e;b->d.
341; The d;e->f;g trellis should be resolved as e->g;d->f.
342; The f;g->h;i trellis should be resolved as f->i;g->h.
343; The h;i->j;ret trellis contains a triangle edge, and should be resolved as
344; h->j->ret
345; CHECK: # %entry
346; CHECK: # %c10
347; CHECK: # %e9
348; CHECK: # %g10
349; CHECK: # %h10
350; CHECK: # %j8
351; CHECK: # %ret
352; CHECK: # %b6
353; CHECK: # %d7
354; CHECK: # %f6
355; CHECK: # %i6
356define void @trellis_test(i32 %tag) {
357entry:
358 br label %a16
359a16:
360 call void @a()
361 call void @a()
362 %tagbits.a = and i32 %tag, 3
363 %tagbits.a.eq0 = icmp eq i32 %tagbits.a, 0
364 br i1 %tagbits.a.eq0, label %c10, label %b6, !prof !1 ; 10 to 6
365c10:
366 call void @c()
367 call void @c()
368 %tagbits.c = and i32 %tag, 12
369 %tagbits.c.eq0 = icmp eq i32 %tagbits.c, 0
370 ; Both of these edges should be hotter than the other incoming edge
371 ; for e9 or d7
372 br i1 %tagbits.c.eq0, label %e9, label %d7, !prof !3 ; 6 to 4
373e9:
374 call void @e()
375 call void @e()
376 %tagbits.e = and i32 %tag, 48
377 %tagbits.e.eq0 = icmp eq i32 %tagbits.e, 0
378 br i1 %tagbits.e.eq0, label %g10, label %f6, !prof !4 ; 7 to 2
379g10:
380 call void @g()
381 call void @g()
382 %tagbits.g = and i32 %tag, 192
383 %tagbits.g.eq0 = icmp eq i32 %tagbits.g, 0
384 br i1 %tagbits.g.eq0, label %i6, label %h10, !prof !5 ; 2 to 8
385i6:
386 call void @i()
387 call void @i()
388 %tagbits.i = and i32 %tag, 768
389 %tagbits.i.eq0 = icmp eq i32 %tagbits.i, 0
390 br i1 %tagbits.i.eq0, label %ret, label %j8, !prof !2 ; balanced (3 to 3)
391b6:
392 call void @b()
393 call void @b()
394 %tagbits.b = and i32 %tag, 12
395 %tagbits.b.eq1 = icmp eq i32 %tagbits.b, 8
396 br i1 %tagbits.b.eq1, label %e9, label %d7, !prof !2 ; balanced (3 to 3)
397d7:
398 call void @d()
399 call void @d()
400 %tagbits.d = and i32 %tag, 48
401 %tagbits.d.eq1 = icmp eq i32 %tagbits.d, 32
402 br i1 %tagbits.d.eq1, label %g10, label %f6, !prof !6 ; 3 to 4
403f6:
404 call void @f()
405 call void @f()
406 %tagbits.f = and i32 %tag, 192
407 %tagbits.f.eq1 = icmp eq i32 %tagbits.f, 128
408 br i1 %tagbits.f.eq1, label %i6, label %h10, !prof !7 ; 4 to 2
409h10:
410 call void @h()
411 call void @h()
412 %tagbits.h = and i32 %tag, 768
413 %tagbits.h.eq1 = icmp eq i32 %tagbits.h, 512
414 br i1 %tagbits.h.eq1, label %ret, label %j8, !prof !2 ; balanced (5 to 5)
415j8:
416 call void @j()
417 call void @j()
418 br label %ret
419ret:
420 ret void
421}
422
423; Verify that we still consider tail-duplication opportunities if we find a
424; triangle trellis. Here D->F->G is the triangle, and D;E are both predecessors
425; of both F and G. The basic trellis algorithm picks the F->G edge, but after
426; checking, it's profitable to duplicate G into F. The weights here are not
427; really important. They are there to help make the test stable.
428; CHECK-LABEL: trellis_then_dup_test
429; CHECK: # %entry
430; CHECK: # %b
431; CHECK: # %d
432; CHECK: # %g
433; CHECK: # %ret1
434; CHECK: # %c
435; CHECK: # %e
436; CHECK: # %f
437; CHECK: # %ret2
438; CHECK: # %ret
439define void @trellis_then_dup_test(i32 %tag) {
440entry:
441 br label %a
442a:
443 call void @a()
444 call void @a()
445 %tagbits.a = and i32 %tag, 3
446 %tagbits.a.eq0 = icmp eq i32 %tagbits.a, 0
447 br i1 %tagbits.a.eq0, label %b, label %c, !prof !1 ; 5 to 3
448b:
449 call void @b()
450 call void @b()
451 %tagbits.b = and i32 %tag, 12
452 %tagbits.b.eq1 = icmp eq i32 %tagbits.b, 8
453 br i1 %tagbits.b.eq1, label %d, label %e, !prof !1 ; 5 to 3
454d:
455 call void @d()
456 call void @d()
457 %tagbits.d = and i32 %tag, 48
458 %tagbits.d.eq1 = icmp eq i32 %tagbits.d, 32
459 br i1 %tagbits.d.eq1, label %g, label %f, !prof !1 ; 5 to 3
460f:
461 call void @f()
462 call void @f()
463 br label %g
464g:
465 %tagbits.g = and i32 %tag, 192
466 %tagbits.g.eq0 = icmp eq i32 %tagbits.g, 0
467 br i1 %tagbits.g.eq0, label %ret1, label %ret2, !prof !2 ; balanced
468c:
469 call void @c()
470 call void @c()
471 %tagbits.c = and i32 %tag, 12
472 %tagbits.c.eq0 = icmp eq i32 %tagbits.c, 0
473 br i1 %tagbits.c.eq0, label %d, label %e, !prof !1 ; 5 to 3
474e:
475 call void @e()
476 call void @e()
477 %tagbits.e = and i32 %tag, 48
478 %tagbits.e.eq0 = icmp eq i32 %tagbits.e, 0
479 br i1 %tagbits.e.eq0, label %g, label %f, !prof !1 ; 5 to 3
480ret1:
481 call void @a()
482 br label %ret
483ret2:
484 call void @b()
485 br label %ret
486ret:
487 ret void
488}
489
Kyle Butt0846e562016-10-11 20:36:43 +0000490declare void @a()
491declare void @b()
492declare void @c()
493declare void @d()
Kyle Butt7fbec9b2017-02-15 19:49:14 +0000494declare void @e()
495declare void @f()
496declare void @g()
497declare void @h()
498declare void @i()
499declare void @j()
500
501!1 = !{!"branch_weights", i32 5, i32 3}
502!2 = !{!"branch_weights", i32 50, i32 50}
503!3 = !{!"branch_weights", i32 6, i32 4}
504!4 = !{!"branch_weights", i32 7, i32 2}
505!5 = !{!"branch_weights", i32 2, i32 8}
506!6 = !{!"branch_weights", i32 3, i32 4}
507!7 = !{!"branch_weights", i32 4, i32 2}