brintos

brintos / llvm-project-archived public Read only

0
0
Text · 17.7 KiB · 77d861a Raw
635 lines · plain
1; RUN: llc -O2 -ppc-reduce-cr-logicals -o - %s | FileCheck \2; RUN:   --check-prefix=CHECK --check-prefix=CHECK-O2 %s3; RUN: llc -O3 -ppc-reduce-cr-logicals -o - %s | FileCheck \4; RUN:   --check-prefix=CHECK --check-prefix=CHECK-O3 %s5target datalayout = "e-m:e-i64:64-n32:64"6target triple = "powerpc64le-grtev4-linux-gnu"7 8; Intended layout:9; The chain-based outlining produces the layout10; test111; test212; test313; test414; optional115; optional216; optional317; optional418; exit19; Tail duplication puts test n+1 at the end of optional n20; so optional1 includes a copy of test2 at the end, and branches21; to test3 (at the top) or falls through to optional 2.22; The CHECK statements check for the whole string of tests23; and then check that the correct test has been duplicated into the end of24; the optional blocks and that the optional blocks are in the correct order.25;CHECK-LABEL: straight_test:26; test1 may have been merged with entry27;CHECK: mr [[TAGREG:[0-9]+]], 328;CHECK: andi. {{[0-9]+}}, [[TAGREG:[0-9]+]], 129;CHECK-NEXT: bc 12, 1, .[[OPT1LABEL:[_0-9A-Za-z]+]]30;CHECK-NEXT: # %test231;CHECK-NEXT: andi. {{[0-9]+}}, [[TAGREG]], 232;CHECK-NEXT: bne 0, .[[OPT2LABEL:[_0-9A-Za-z]+]]33;CHECK-NEXT: .[[TEST3LABEL:[_0-9A-Za-z]+]]: # %test334;CHECK-NEXT: andi. {{[0-9]+}}, [[TAGREG]], 435;CHECK-NEXT: bne 0, .[[OPT3LABEL:[_0-9A-Za-z]+]]36;CHECK-NEXT: .[[TEST4LABEL:[_0-9A-Za-z]+]]: # %test437;CHECK-NEXT: andi. {{[0-9]+}}, [[TAGREG]], 838;CHECK-NEXT: bne 0, .[[OPT4LABEL:[_0-9A-Za-z]+]]39;CHECK-NEXT: .[[EXITLABEL:[_0-9A-Za-z]+]]: # %exit40;CHECK: blr41;CHECK-NEXT: .[[OPT1LABEL]]:42;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 243;CHECK-NEXT: beq 0, .[[TEST3LABEL]]44;CHECK-NEXT: .[[OPT2LABEL]]:45;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 446;CHECK-NEXT: beq 0, .[[TEST4LABEL]]47;CHECK-NEXT: .[[OPT3LABEL]]:48;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 849;CHECK-NEXT: beq 0, .[[EXITLABEL]]50;CHECK-NEXT: .[[OPT4LABEL]]:51;CHECK: b .[[EXITLABEL]]52 53define void @straight_test(i32 %tag) {54entry:55  br label %test156test1:57  %tagbit1 = and i32 %tag, 158  %tagbit1eq0 = icmp eq i32 %tagbit1, 059  br i1 %tagbit1eq0, label %test2, label %optional1, !prof !160optional1:61  call void @a()62  call void @a()63  call void @a()64  call void @a()65  br label %test266test2:67  %tagbit2 = and i32 %tag, 268  %tagbit2eq0 = icmp eq i32 %tagbit2, 069  br i1 %tagbit2eq0, label %test3, label %optional2, !prof !170optional2:71  call void @b()72  call void @b()73  call void @b()74  call void @b()75  br label %test376test3:77  %tagbit3 = and i32 %tag, 478  %tagbit3eq0 = icmp eq i32 %tagbit3, 079  br i1 %tagbit3eq0, label %test4, label %optional3, !prof !180optional3:81  call void @c()82  call void @c()83  call void @c()84  call void @c()85  br label %test486test4:87  %tagbit4 = and i32 %tag, 888  %tagbit4eq0 = icmp eq i32 %tagbit4, 089  br i1 %tagbit4eq0, label %exit, label %optional4, !prof !190optional4:91  call void @d()92  call void @d()93  call void @d()94  call void @d()95  br label %exit96exit:97  ret void98}99 100; Intended layout:101; The chain-of-triangles based duplicating produces the layout102; test1103; test2104; test3105; optional1106; optional2107; optional3108; exit109; even for 50/50 branches.110; Tail duplication puts test n+1 at the end of optional n111; so optional1 includes a copy of test2 at the end, and branches112; to test3 (at the top) or falls through to optional 2.113; The CHECK statements check for the whole string of tests114; and then check that the correct test has been duplicated into the end of115; the optional blocks and that the optional blocks are in the correct order.116;CHECK-LABEL: straight_test_50:117; test1 may have been merged with entry118;CHECK: mr [[TAGREG:[0-9]+]], 3119;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 1120;CHECK-NEXT: bc 12, 1, .[[OPT1LABEL:[_0-9A-Za-z]+]]121;CHECK-NEXT: # %test2122;CHECK-NEXT: andi. {{[0-9]+}}, [[TAGREG]], 2123;CHECK-NEXT: bne 0, .[[OPT2LABEL:[_0-9A-Za-z]+]]124;CHECK-NEXT: .[[TEST3LABEL:[_0-9A-Za-z]+]]: # %test3125;CHECK-NEXT: andi. {{[0-9]+}}, [[TAGREG]], 4126;CHECK-NEXT: bne 0, .[[OPT3LABEL:[_0-9A-Za-z]+]]127;CHECK-NEXT: .[[EXITLABEL:[_0-9A-Za-z]+]]: # %exit128;CHECK: blr129;CHECK-NEXT: .[[OPT1LABEL]]:130;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 2131;CHECK-NEXT: beq 0, .[[TEST3LABEL]]132;CHECK-NEXT: .[[OPT2LABEL]]:133;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 4134;CHECK-NEXT: beq 0, .[[EXITLABEL]]135;CHECK-NEXT: .[[OPT3LABEL]]:136;CHECK: b .[[EXITLABEL]]137 138define void @straight_test_50(i32 %tag) {139entry:140  br label %test1141test1:142  %tagbit1 = and i32 %tag, 1143  %tagbit1eq0 = icmp eq i32 %tagbit1, 0144  br i1 %tagbit1eq0, label %test2, label %optional1, !prof !2145optional1:146  call void @a()147  br label %test2148test2:149  %tagbit2 = and i32 %tag, 2150  %tagbit2eq0 = icmp eq i32 %tagbit2, 0151  br i1 %tagbit2eq0, label %test3, label %optional2, !prof !2152optional2:153  call void @b()154  br label %test3155test3:156  %tagbit3 = and i32 %tag, 4157  %tagbit3eq0 = icmp eq i32 %tagbit3, 0158  br i1 %tagbit3eq0, label %exit, label %optional3, !prof !1159optional3:160  call void @c()161  br label %exit162exit:163  ret void164}165 166; Intended layout:167; The chain-of-triangles based duplicating produces the layout when 3168; instructions are allowed for tail-duplication.169; test1170; test2171; test3172; optional1173; optional2174; optional3175; exit176;177; Otherwise it produces the layout:178; test1179; optional1180; test2181; optional2182; test3183; optional3184; exit185 186;CHECK-LABEL: straight_test_3_instr_test:187; test1 may have been merged with entry188;CHECK: mr [[TAGREG:[0-9]+]], 3189;CHECK: clrlwi {{[0-9]+}}, [[TAGREG]], 30190;CHECK-NEXT: cmplwi {{[0-9]+}}, 2191 192;CHECK-O3-NEXT: bne 0, .[[OPT1LABEL:[_0-9A-Za-z]+]]193;CHECK-O3-NEXT: # %test2194;CHECK-O3-NEXT: rlwinm {{[0-9]+}}, [[TAGREG]], 0, 28, 29195;CHECK-O3-NEXT: cmplwi {{[0-9]+}}, 8196;CHECK-O3-NEXT: bne 0, .[[OPT2LABEL:[_0-9A-Za-z]+]]197;CHECK-O3-NEXT: .[[TEST3LABEL:[_0-9A-Za-z]+]]: # %test3198;CHECK-O3-NEXT: rlwinm {{[0-9]+}}, [[TAGREG]], 0, 26, 27199;CHECK-O3-NEXT: cmplwi {{[0-9]+}}, 32200;CHECK-O3-NEXT: bne 0, .[[OPT3LABEL:[_0-9A-Za-z]+]]201;CHECK-O3-NEXT: .[[EXITLABEL:[_0-9A-Za-z]+]]: # %exit202;CHECK-O3: blr203;CHECK-O3-NEXT: .[[OPT1LABEL]]:204;CHECK-O3: rlwinm {{[0-9]+}}, [[TAGREG]], 0, 28, 29205;CHECK-O3-NEXT: cmplwi {{[0-9]+}}, 8206;CHECK-O3-NEXT: beq 0, .[[TEST3LABEL]]207;CHECK-O3-NEXT: .[[OPT2LABEL]]:208;CHECK-O3: rlwinm {{[0-9]+}}, [[TAGREG]], 0, 26, 27209;CHECK-O3-NEXT: cmplwi {{[0-9]+}}, 32210;CHECK-O3-NEXT: beq 0, .[[EXITLABEL]]211;CHECK-O3-NEXT: .[[OPT3LABEL]]:212;CHECK-O3: b .[[EXITLABEL]]213 214;CHECK-O2-NEXT: beq 0, .[[TEST2LABEL:[_0-9A-Za-z]+]]215;CHECK-O2-NEXT: # %optional1216;CHECK-O2: .[[TEST2LABEL]]: # %test2217;CHECK-O2-NEXT: rlwinm {{[0-9]+}}, [[TAGREG]], 0, 28, 29218;CHECK-O2-NEXT: cmplwi {{[0-9]+}}, 8219;CHECK-O2-NEXT: beq 0, .[[TEST3LABEL:[_0-9A-Za-z]+]]220;CHECK-O2-NEXT: # %optional2221;CHECK-O2: .[[TEST3LABEL]]: # %test3222;CHECK-O2-NEXT: rlwinm {{[0-9]+}}, [[TAGREG]], 0, 26, 27223;CHECK-O2-NEXT: cmplwi {{[0-9]+}}, 32224;CHECK-O2-NEXT: beq 0, .[[EXITLABEL:[_0-9A-Za-z]+]]225;CHECK-O2-NEXT: # %optional3226;CHECK-O2: .[[EXITLABEL:[_0-9A-Za-z]+]]: # %exit227;CHECK-O2: blr228 229 230define void @straight_test_3_instr_test(i32 %tag) {231entry:232  br label %test1233test1:234  %tagbit1 = and i32 %tag, 3235  %tagbit1eq0 = icmp eq i32 %tagbit1, 2236  br i1 %tagbit1eq0, label %test2, label %optional1, !prof !2237optional1:238  call void @a()239  br label %test2240test2:241  %tagbit2 = and i32 %tag, 12242  %tagbit2eq0 = icmp eq i32 %tagbit2, 8243  br i1 %tagbit2eq0, label %test3, label %optional2, !prof !2244optional2:245  call void @b()246  br label %test3247test3:248  %tagbit3 = and i32 %tag, 48249  %tagbit3eq0 = icmp eq i32 %tagbit3, 32250  br i1 %tagbit3eq0, label %exit, label %optional3, !prof !1251optional3:252  call void @c()253  br label %exit254exit:255  ret void256}257 258; Intended layout:259; The chain-based outlining produces the layout260; entry261; --- Begin loop ---262; for.latch263; for.check264; test1265; test2266; test3267; test4268; optional1269; optional2270; optional3271; optional4272; --- End loop ---273; exit274; The CHECK statements check for the whole string of tests and exit block,275; and then check that the correct test has been duplicated into the end of276; the optional blocks and that the optional blocks are in the correct order.277;CHECK-LABEL: loop_test:278;CHECK: add [[TAGPTRREG:[0-9]+]], 3, 4279;CHECK: .[[LATCHLABEL:[._0-9A-Za-z]+]]: # %for.latch280;CHECK: addi281;CHECK-O2: .[[CHECKLABEL:[._0-9A-Za-z]+]]: # %for.check282;CHECK: lwz [[TAGREG:[0-9]+]], 0([[TAGPTRREG]])283;CHECK-O3: .[[CHECKLABEL:[._0-9A-Za-z]+]]: # %for.check284;CHECK: # %bb.{{[0-9]+}}: # %test1285;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 1286;CHECK-NEXT: bc 12, 1, .[[OPT1LABEL:[._0-9A-Za-z]+]]287;CHECK-NEXT: # %test2288;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 2289;CHECK-NEXT: bne 0, .[[OPT2LABEL:[._0-9A-Za-z]+]]290;CHECK-NEXT: .[[TEST3LABEL:[._0-9A-Za-z]+]]: # %test3291;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 4292;CHECK-NEXT: bne 0, .[[OPT3LABEL:[._0-9A-Za-z]+]]293;CHECK-NEXT: .[[TEST4LABEL:[._0-9A-Za-z]+]]: # %{{(test4|optional3)}}294;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 8295;CHECK-NEXT: beq 0, .[[LATCHLABEL]]296;CHECK-NEXT: b .[[OPT4LABEL:[._0-9A-Za-z]+]]297;CHECK: [[OPT1LABEL]]298;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 2299;CHECK-NEXT: beq 0, .[[TEST3LABEL]]300;CHECK-NEXT: .[[OPT2LABEL]]301;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 4302;CHECK-NEXT: beq 0, .[[TEST4LABEL]]303;CHECK-NEXT: .[[OPT3LABEL]]304;CHECK: andi. {{[0-9]+}}, [[TAGREG]], 8305;CHECK-NEXT: beq 0, .[[LATCHLABEL]]306;CHECK: [[OPT4LABEL]]:307;CHECK: b .[[LATCHLABEL]]308define void @loop_test(ptr %tags, i32 %count) {309entry:310  br label %for.check311for.check:312  %count.loop = phi i32 [%count, %entry], [%count.sub, %for.latch]313  %done.count = icmp ugt i32 %count.loop, 0314  %tag_ptr = getelementptr inbounds i32, ptr %tags, i32 %count315  %tag = load i32, ptr %tag_ptr316  %done.tag = icmp eq i32 %tag, 0317  %done = and i1 %done.count, %done.tag318  br i1 %done, label %test1, label %exit, !prof !1319test1:320  %tagbit1 = and i32 %tag, 1321  %tagbit1eq0 = icmp eq i32 %tagbit1, 0322  br i1 %tagbit1eq0, label %test2, label %optional1, !prof !1323optional1:324  call void @a()325  call void @a()326  call void @a()327  call void @a()328  br label %test2329test2:330  %tagbit2 = and i32 %tag, 2331  %tagbit2eq0 = icmp eq i32 %tagbit2, 0332  br i1 %tagbit2eq0, label %test3, label %optional2, !prof !1333optional2:334  call void @b()335  call void @b()336  call void @b()337  call void @b()338  br label %test3339test3:340  %tagbit3 = and i32 %tag, 4341  %tagbit3eq0 = icmp eq i32 %tagbit3, 0342  br i1 %tagbit3eq0, label %test4, label %optional3, !prof !1343optional3:344  call void @c()345  call void @c()346  call void @c()347  call void @c()348  br label %test4349test4:350  %tagbit4 = and i32 %tag, 8351  %tagbit4eq0 = icmp eq i32 %tagbit4, 0352  br i1 %tagbit4eq0, label %for.latch, label %optional4, !prof !1353optional4:354  call void @d()355  call void @d()356  call void @d()357  call void @d()358  br label %for.latch359for.latch:360  %count.sub = sub i32 %count.loop, 1361  br label %for.check362exit:363  ret void364}365 366; The block then2 is not unavoidable, meaning it does not dominate the exit.367; But since it can be tail-duplicated, it should be placed as a fallthrough from368; test2 and copied. The purpose here is to make sure that the tail-duplication369; code is independent of the outlining code, which works by choosing the370; "unavoidable" blocks.371; CHECK-LABEL: avoidable_test:372; CHECK: # %bb.{{[0-9]+}}: # %entry373; CHECK: andi.374; CHECK: # %bb.{{[0-9]+}}: # %test2375; Make sure else2 falls through from test2376; CHECK-NOT: # %{{[-_a-zA-Z0-9]+}}377; CHECK: # %bb.{{[0-9]+}}: # %else2378; CHECK: bl c379; CHECK: # %else1380; CHECK: bl a381; CHECK: bl a382; CHECK: # %then2383; CHECK: andi. {{[0-9]+}}, {{[0-9]+}}, 4384; CHECK: # %end1385; CHECK: bl d386; CHECK: # %end2387define void @avoidable_test(i32 %tag) {388entry:389  br label %test1390test1:391  %tagbit1 = and i32 %tag, 1392  %tagbit1eq0 = icmp eq i32 %tagbit1, 0393  br i1 %tagbit1eq0, label %test2, label %else1, !prof !1 ; %test2 more likely394else1:395  call void @a()396  call void @a()397  br label %then2398test2:399  %tagbit2 = and i32 %tag, 2400  %tagbit2eq0 = icmp eq i32 %tagbit2, 0401  br i1 %tagbit2eq0, label %then2, label %else2, !prof !1 ; %then2 more likely402then2:403  %tagbit3 = and i32 %tag, 4404  %tagbit3eq0 = icmp eq i32 %tagbit3, 0405  br i1 %tagbit3eq0, label %end2, label %end1, !prof !1 ; %end2 more likely406else2:407  call void @c()408  br label %end2409end2:410  ret void411end1:412  call void @d()413  ret void414}415 416; CHECK-LABEL: trellis_test417; The number in the block labels is the expected block frequency given the418; probabilities annotated. There is a conflict in the b;c->d;e trellis that419; should be resolved as c->e;b->d.420; The d;e->f;g trellis should be resolved as e->g;d->f.421; The f;g->h;i trellis should be resolved as f->i;g->h.422; The h;i->j;ret trellis contains a triangle edge, and should be resolved as423; h->j->ret424; CHECK: # %bb.{{[0-9]+}}: # %entry425; CHECK: # %bb.{{[0-9]+}}: # %c10426; CHECK: # %e9427; CHECK: # %g10428; CHECK: # %h10429; CHECK: # %j8430; CHECK: # %ret431; CHECK: # %b6432; CHECK: # %d7433; CHECK: # %f6434; CHECK: # %i6435define void @trellis_test(i32 %tag) {436entry:437  br label %a16438a16:439  call void @a()440  call void @a()441  %tagbits.a = and i32 %tag, 3442  %tagbits.a.eq0 = icmp eq i32 %tagbits.a, 0443  br i1 %tagbits.a.eq0, label %c10, label %b6, !prof !1 ; 10 to 6444c10:445  call void @c()446  call void @c()447  %tagbits.c = and i32 %tag, 12448  %tagbits.c.eq0 = icmp eq i32 %tagbits.c, 0449  ; Both of these edges should be hotter than the other incoming edge450  ; for e9 or d7451  br i1 %tagbits.c.eq0, label %e9, label %d7, !prof !3 ; 6 to 4452e9:453  call void @e()454  call void @e()455  %tagbits.e = and i32 %tag, 48456  %tagbits.e.eq0 = icmp eq i32 %tagbits.e, 0457  br i1 %tagbits.e.eq0, label %g10, label %f6, !prof !4 ; 7 to 2458g10:459  call void @g()460  call void @g()461  %tagbits.g = and i32 %tag, 192462  %tagbits.g.eq0 = icmp eq i32 %tagbits.g, 0463  br i1 %tagbits.g.eq0, label %i6, label %h10, !prof !5 ; 2 to 8464i6:465  call void @i()466  call void @i()467  %tagbits.i = and i32 %tag, 768468  %tagbits.i.eq0 = icmp eq i32 %tagbits.i, 0469  br i1 %tagbits.i.eq0, label %ret, label %j8, !prof !2 ; balanced (3 to 3)470b6:471  call void @b()472  call void @b()473  %tagbits.b = and i32 %tag, 12474  %tagbits.b.eq1 = icmp eq i32 %tagbits.b, 8475  br i1 %tagbits.b.eq1, label %e9, label %d7, !prof !2 ; balanced (3 to 3)476d7:477  call void @d()478  call void @d()479  %tagbits.d = and i32 %tag, 48480  %tagbits.d.eq1 = icmp eq i32 %tagbits.d, 32481  br i1 %tagbits.d.eq1, label %g10, label %f6, !prof !6 ; 3 to 4482f6:483  call void @f()484  call void @f()485  %tagbits.f = and i32 %tag, 192486  %tagbits.f.eq1 = icmp eq i32 %tagbits.f, 128487  br i1 %tagbits.f.eq1, label %i6, label %h10, !prof !7 ; 4 to 2488h10:489  call void @h()490  call void @h()491  %tagbits.h = and i32 %tag, 768492  %tagbits.h.eq1 = icmp eq i32 %tagbits.h, 512493  br i1 %tagbits.h.eq1, label %ret, label %j8, !prof !2 ; balanced (5 to 5)494j8:495  call void @j()496  call void @j()497  br label %ret498ret:499  ret void500}501 502; Verify that we still consider tail-duplication opportunities if we find a503; triangle trellis. Here D->F->G is the triangle, and D;E are both predecessors504; of both F and G. The basic trellis algorithm picks the F->G edge, but after505; checking, it's profitable to duplicate G into F. The weights here are not506; really important. They are there to help make the test stable.507; CHECK-LABEL: trellis_then_dup_test508; CHECK: # %bb.{{[0-9]+}}: # %entry509; CHECK: # %bb.{{[0-9]+}}: # %b510; CHECK: # %d511; CHECK: # %g512; CHECK: # %ret1513; CHECK: # %c514; CHECK: # %e515; CHECK: # %f516; CHECK: # %ret2517; CHECK: # %ret518define void @trellis_then_dup_test(i32 %tag) {519entry:520  br label %a521a:522  call void @a()523  call void @a()524  %tagbits.a = and i32 %tag, 3525  %tagbits.a.eq0 = icmp eq i32 %tagbits.a, 0526  br i1 %tagbits.a.eq0, label %b, label %c, !prof !1 ; 5 to 3527b:528  call void @b()529  call void @b()530  %tagbits.b = and i32 %tag, 12531  %tagbits.b.eq1 = icmp eq i32 %tagbits.b, 8532  br i1 %tagbits.b.eq1, label %d, label %e, !prof !1 ; 5 to 3533d:534  call void @d()535  call void @d()536  %tagbits.d = and i32 %tag, 48537  %tagbits.d.eq1 = icmp eq i32 %tagbits.d, 32538  br i1 %tagbits.d.eq1, label %g, label %f, !prof !1 ; 5 to 3539f:540  call void @f()541  call void @f()542  br label %g543g:544  %tagbits.g = and i32 %tag, 192545  %tagbits.g.eq0 = icmp eq i32 %tagbits.g, 0546  br i1 %tagbits.g.eq0, label %ret1, label %ret2, !prof !2 ; balanced547c:548  call void @c()549  call void @c()550  %tagbits.c = and i32 %tag, 12551  %tagbits.c.eq0 = icmp eq i32 %tagbits.c, 0552  br i1 %tagbits.c.eq0, label %d, label %e, !prof !1 ; 5 to 3553e:554  call void @e()555  call void @e()556  %tagbits.e = and i32 %tag, 48557  %tagbits.e.eq0 = icmp eq i32 %tagbits.e, 0558  br i1 %tagbits.e.eq0, label %g, label %f, !prof !1 ; 5 to 3559ret1:560  call void @a()561  br label %ret562ret2:563  call void @b()564  br label %ret565ret:566  ret void567}568 569; Verify that we did not mis-identify triangle trellises if it is not570; really a triangle.571; CHECK-LABEL: trellis_no_triangle572; CHECK: # %bb.{{[0-9]+}}: # %entry573; CHECK: # %bb.{{[0-9]+}}: # %b574; CHECK: # %d575; CHECK: # %ret576; CHECK: # %c577; CHECK: # %e578define void @trellis_no_triangle(i32 %tag) {579entry:580  br label %a581a:582  call void @a()583  call void @a()584  %tagbits.a = and i32 %tag, 3585  %tagbits.a.eq0 = icmp eq i32 %tagbits.a, 0586  br i1 %tagbits.a.eq0, label %b, label %c, !prof !8 ; 98 to 2587b:588  call void @b()589  call void @b()590  %tagbits.b = and i32 %tag, 12591  %tagbits.b.eq1 = icmp eq i32 %tagbits.b, 8592  br i1 %tagbits.b.eq1, label %d, label %e, !prof !9 ; 97 to 1593d:594  call void @d()595  call void @d()596  %tagbits.d = and i32 %tag, 48597  %tagbits.d.eq1 = icmp eq i32 %tagbits.d, 32598  br i1 %tagbits.d.eq1, label %ret, label %e, !prof !10 ; 96 to 2599c:600  call void @c()601  call void @c()602  %tagbits.c = and i32 %tag, 12603  %tagbits.c.eq0 = icmp eq i32 %tagbits.c, 0604  br i1 %tagbits.c.eq0, label %d, label %e, !prof !2 ; 1 to 1605e:606  call void @e()607  call void @e()608  br label %ret609ret:610  call void @f()611  ret void612}613 614declare void @a()615declare void @b()616declare void @c()617declare void @d()618declare void @e()619declare void @f()620declare void @g()621declare void @h()622declare void @i()623declare void @j()624 625!1 = !{!"branch_weights", i32 5, i32 3}626!2 = !{!"branch_weights", i32 50, i32 50}627!3 = !{!"branch_weights", i32 6, i32 4}628!4 = !{!"branch_weights", i32 7, i32 2}629!5 = !{!"branch_weights", i32 2, i32 8}630!6 = !{!"branch_weights", i32 3, i32 4}631!7 = !{!"branch_weights", i32 4, i32 2}632!8 = !{!"branch_weights", i32 98, i32 2}633!9 = !{!"branch_weights", i32 97, i32 1}634!10 = !{!"branch_weights", i32 96, i32 2}635