28 lines · plain
1; RUN: opt -S %s -passes=sample-profile -sample-profile-file=%S/Inputs/indirect-call.afdo | FileCheck %s2 3; Checks if indirect call targets are read correctly when reading from gcc4; format profile.5; It is expected to fail on certain architectures as gcc profile reader does6; not work.7 8define void @test(ptr) #0 !dbg !3 {9 %2 = alloca ptr10 store ptr %0, ptr %211 %3 = load ptr, ptr %212 ; CHECK: call {{.*}}, !prof ![[PROF:[0-9]+]]13 call void %3(), !dbg !414 ret void15}16 17attributes #0 = {"use-sample-profile"}18 19!llvm.dbg.cu = !{!0}20!llvm.module.flags = !{!2}21 22!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1)23!1 = !DIFile(filename: "test.cc", directory: "/")24!2 = !{i32 2, !"Debug Info Version", i32 3}25!3 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 1, unit: !0)26!4 = !DILocation(line: 5, scope: !3)27; CHECK: ![[PROF]] = !{!"VP", i32 0, i64 3457, i64 9191153033785521275, i64 2059, i64 -1069303473483922844, i64 1398}28