1; Test to ensure that split cold function gets 0 entry count profile 2; metadata when compiling with pgo. 3 4; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=0 -S < %s | FileCheck %s 5 6target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 7target triple = "x86_64-apple-macosx10.14.0" 8 9; CHECK-LABEL: @fun 10; CHECK: call void @fun.cold.1 11define void @fun() !prof !14 { 12entry: 13 br i1 undef, label %if.then, label %if.else 14 15if.then: 16 ret void 17 18if.else: 19 call void @sink() 20 ret void 21} 22 23declare void @sink() cold 24 25; CHECK: define {{.*}} @fun.cold.1{{.*}} ![[PROF:[0-9]+]] 26; CHECK: ![[PROF]] = !{!"function_entry_count", i64 0} 27 28!llvm.module.flags = !{!0} 29!0 = !{i32 1, !"ProfileSummary", !1} 30!1 = !{!2, !3, !4, !5, !6, !7, !8, !9} 31!2 = !{!"ProfileFormat", !"InstrProf"} 32!3 = !{!"TotalCount", i64 10000} 33!4 = !{!"MaxCount", i64 10} 34!5 = !{!"MaxInternalCount", i64 1} 35!6 = !{!"MaxFunctionCount", i64 1000} 36!7 = !{!"NumCounts", i64 3} 37!8 = !{!"NumFunctions", i64 3} 38!9 = !{!"DetailedSummary", !10} 39!10 = !{!11, !12, !13} 40!11 = !{i32 10000, i64 100, i32 1} 41!12 = !{i32 999000, i64 100, i32 1} 42!13 = !{i32 999999, i64 1, i32 2} 43!14 = !{!"function_entry_count", i64 100} 44