blob: 01192d80e94eb3b399e88811414544349fb3313b [file] [log] [blame]
Dehao Chen77079002017-01-20 22:56:07 +00001; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/indirect-call.prof -S | FileCheck %s
2
3define void @test(void ()*) !dbg !3 {
4 %2 = alloca void ()*
5 store void ()* %0, void ()** %2
6 %3 = load void ()*, void ()** %2
7 ; CHECK: call {{.*}}, !prof ![[PROF:[0-9]+]]
8 call void %3(), !dbg !4
9 ret void
10}
11
12!llvm.dbg.cu = !{!0}
13!llvm.module.flags = !{!2}
14
15!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1)
16!1 = !DIFile(filename: "test.cc", directory: "/")
17!2 = !{i32 2, !"Debug Info Version", i32 3}
18!3 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 1, unit: !0)
19!4 = !DILocation(line: 5, scope: !3)
20; CHECK: ![[PROF]] = !{!"VP", i32 0, i64 3457, i64 9191153033785521275, i64 2059, i64 -1069303473483922844, i64 1398}