1target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 2target triple = "x86_64-unknown-linux-gnu" 3 4@odd = common dso_local global i32 0, align 4 5@even = common dso_local global i32 0, align 4 6 7define dso_local void @bar(i32 %n) #0 !prof !29 { 8entry: 9 %call = tail call fastcc i32 @cond(i32 %n) 10 %tobool = icmp eq i32 %call, 0 11 br i1 %tobool, label %if.else, label %if.then, !prof !30 12 13if.then: 14 ; The calls here ensure that the instructions are not hoisted by SimplifyCFG. 15 call void @clobber() 16 %0 = load i32, ptr @odd, align 4 17 %inc = add i32 %0, 1 18 store i32 %inc, ptr @odd, align 4 19 call void @clobber() 20 br label %if.end 21 22if.else: 23 %1 = load i32, ptr @even, align 4 24 %inc1 = add i32 %1, 1 25 store i32 %inc1, ptr @even, align 4 26 br label %if.end 27 28if.end: 29 ret void 30} 31 32declare void @clobber() 33 34define internal fastcc i32 @cond(i32 %i) #1 !prof !29 !PGOFuncName !35 { 35entry: 36 %rem = srem i32 %i, 2 37 ret i32 %rem 38} 39 40attributes #0 = { "target-cpu"="x86-64" } 41attributes #1 = { inlinehint noinline } 42 43!llvm.module.flags = !{!0, !1} 44 45!0 = !{i32 1, !"wchar_size", i32 4} 46!1 = !{i32 1, !"ProfileSummary", !2} 47!2 = !{!3, !4, !5, !6, !7, !8, !9, !10} 48!3 = !{!"ProfileFormat", !"InstrProf"} 49!4 = !{!"TotalCount", i64 500002} 50!5 = !{!"MaxCount", i64 200000} 51!6 = !{!"MaxInternalCount", i64 100000} 52!7 = !{!"MaxFunctionCount", i64 200000} 53!8 = !{!"NumCounts", i64 6} 54!9 = !{!"NumFunctions", i64 4} 55!10 = !{!"DetailedSummary", !11} 56!11 = !{!12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27} 57!12 = !{i32 10000, i64 200000, i32 1} 58!13 = !{i32 100000, i64 200000, i32 1} 59!14 = !{i32 200000, i64 200000, i32 1} 60!15 = !{i32 300000, i64 200000, i32 1} 61!16 = !{i32 400000, i64 200000, i32 1} 62!17 = !{i32 500000, i64 100000, i32 4} 63!18 = !{i32 600000, i64 100000, i32 4} 64!19 = !{i32 700000, i64 100000, i32 4} 65!20 = !{i32 800000, i64 100000, i32 4} 66!21 = !{i32 900000, i64 100000, i32 4} 67!22 = !{i32 950000, i64 100000, i32 4} 68!23 = !{i32 990000, i64 100000, i32 4} 69!24 = !{i32 999000, i64 100000, i32 4} 70!25 = !{i32 999900, i64 100000, i32 4} 71!26 = !{i32 999990, i64 100000, i32 4} 72!27 = !{i32 999999, i64 1, i32 6} 73!29 = !{!"function_entry_count", i64 200000} 74!30 = !{!"branch_weights", i32 100000, i32 100000} 75!35 = !{!"cspgo_bar.c:cond"} 76