Dehao Chen | c66a06a | 2016-06-24 22:57:06 +0000 | [diff] [blame^] | 1 | ; 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 |
| 3 | |
| 4 | define i32 @bar() #0 !dbg !1 { |
| 5 | entry: |
| 6 | ret i32 1, !dbg !2 |
| 7 | } |
| 8 | |
| 9 | ; CHECK-DAG: {{![0-9]+}} = !{i32 1, !"ProfileSummary", {{![0-9]+}}} |
| 10 | ; CHECK-DAG: {{![0-9]+}} = !{!"NumFunctions", i64 2} |
| 11 | ; CHECK-DAG: {{![0-9]+}} = !{!"MaxFunctionCount", i64 3} |
| 12 | |
| 13 | !1 = distinct !DISubprogram(name: "bar") |
| 14 | !2 = !DILocation(line: 2, scope: !2) |