1source_filename = "csfdo_bar.c" 2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 3target triple = "x86_64-unknown-linux-gnu" 4 5@odd = common dso_local local_unnamed_addr global i32 0, align 4 6@even = common dso_local local_unnamed_addr global i32 0, align 4 7@not_six = common dso_local local_unnamed_addr global i32 0, align 4 8 9define void @bar(i32 %n) !prof !29 { 10entry: 11 %call = tail call fastcc i32 @cond(i32 %n) 12 %tobool = icmp eq i32 %call, 0 13 br i1 %tobool, label %if.else, label %if.then, !prof !30 14 15if.then: 16 %0 = load i32, i32* @odd, align 4 17 %inc = add i32 %0, 1 18 store i32 %inc, i32* @odd, align 4 19 br label %for.inc 20 21if.else: 22 %1 = load i32, i32* @even, align 4 23 %inc1 = add i32 %1, 1 24 store i32 %inc1, i32* @even, align 4 25 br label %for.inc 26 27for.inc: 28 %rem.1 = srem i32 %n, 6 29 %tobool2.1 = icmp eq i32 %rem.1, 0 30 br i1 %tobool2.1, label %for.inc.1, label %if.then3.1, !prof !35 31 32if.then3.1: 33 %2 = load i32, i32* @not_six, align 4 34 %inc4.1 = add i32 %2, 1 35 store i32 %inc4.1, i32* @not_six, align 4 36 br label %for.inc.1 37 38for.inc.1: 39 %mul.2 = shl nsw i32 %n, 1 40 %rem.2 = srem i32 %mul.2, 6 41 %tobool2.2 = icmp eq i32 %rem.2, 0 42 br i1 %tobool2.2, label %for.inc.2, label %if.then3.2, !prof !35 43 44if.then3.2: 45 %3 = load i32, i32* @not_six, align 4 46 %inc4.2 = add i32 %3, 1 47 store i32 %inc4.2, i32* @not_six, align 4 48 br label %for.inc.2 49 50for.inc.2: 51 %mul.3 = mul nsw i32 %n, 3 52 %rem.3 = srem i32 %mul.3, 6 53 %tobool2.3 = icmp eq i32 %rem.3, 0 54 br i1 %tobool2.3, label %for.inc.3, label %if.then3.3, !prof !35 55 56if.then3.3: 57 %4 = load i32, i32* @not_six, align 4 58 %inc4.3 = add i32 %4, 1 59 store i32 %inc4.3, i32* @not_six, align 4 60 br label %for.inc.3 61 62for.inc.3: 63 ret void 64} 65 66define internal fastcc i32 @cond(i32 %i) #1 !prof !29 !PGOFuncName !36 { 67entry: 68 %rem = srem i32 %i, 2 69 ret i32 %rem 70} 71 72attributes #1 = { inlinehint noinline } 73 74!llvm.module.flags = !{!0, !1} 75 76!0 = !{i32 1, !"wchar_size", i32 4} 77!1 = !{i32 1, !"ProfileSummary", !2} 78!2 = !{!3, !4, !5, !6, !7, !8, !9, !10} 79!3 = !{!"ProfileFormat", !"InstrProf"} 80!4 = !{!"TotalCount", i64 1700001} 81!5 = !{!"MaxCount", i64 800000} 82!6 = !{!"MaxInternalCount", i64 399999} 83!7 = !{!"MaxFunctionCount", i64 800000} 84!8 = !{!"NumCounts", i64 8} 85!9 = !{!"NumFunctions", i64 4} 86!10 = !{!"DetailedSummary", !11} 87!11 = !{!12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27} 88!12 = !{i32 10000, i64 800000, i32 1} 89!13 = !{i32 100000, i64 800000, i32 1} 90!14 = !{i32 200000, i64 800000, i32 1} 91!15 = !{i32 300000, i64 800000, i32 1} 92!16 = !{i32 400000, i64 800000, i32 1} 93!17 = !{i32 500000, i64 399999, i32 2} 94!18 = !{i32 600000, i64 399999, i32 2} 95!19 = !{i32 700000, i64 399999, i32 2} 96!20 = !{i32 800000, i64 200000, i32 3} 97!21 = !{i32 900000, i64 100000, i32 6} 98!22 = !{i32 950000, i64 100000, i32 6} 99!23 = !{i32 990000, i64 100000, i32 6} 100!24 = !{i32 999000, i64 100000, i32 6} 101!25 = !{i32 999900, i64 100000, i32 6} 102!26 = !{i32 999990, i64 100000, i32 6} 103!27 = !{i32 999999, i64 100000, i32 6} 104!29 = !{!"function_entry_count", i64 200000} 105!30 = !{!"branch_weights", i32 100000, i32 100000} 106!31 = !{!32, !32, i64 0} 107!32 = !{!"int", !33, i64 0} 108!33 = !{!"omnipotent char", !34, i64 0} 109!34 = !{!"Simple C/C++ TBAA"} 110!35 = !{!"branch_weights", i32 400001, i32 399999} 111!36 = !{!"csfdo_bar.c:cond"} 112