blob: 0a3d1a276480036dad3c41de8bb8fccbb12e3fd7 [file] [log] [blame]
Dehao Chenc66a06a2016-06-24 22:57:06 +00001; Test that we annotate entire program's summary to IR.
2; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/summary.prof -S | FileCheck %s
Dehao Chen40dd8c52016-12-14 22:06:49 +00003; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/summary.prof -S | opt -sample-profile -sample-profile-file=%S/Inputs/summary.prof -S | FileCheck %s
Dehao Chenc66a06a2016-06-24 22:57:06 +00004
5define i32 @bar() #0 !dbg !1 {
6entry:
7 ret i32 1, !dbg !2
8}
9
10; CHECK-DAG: {{![0-9]+}} = !{i32 1, !"ProfileSummary", {{![0-9]+}}}
11; CHECK-DAG: {{![0-9]+}} = !{!"NumFunctions", i64 2}
12; CHECK-DAG: {{![0-9]+}} = !{!"MaxFunctionCount", i64 3}
13
14!1 = distinct !DISubprogram(name: "bar")
15!2 = !DILocation(line: 2, scope: !2)