Home | History | Annotate | Download | only in SampleProfile
      1 ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/indirect-call.afdo -S | FileCheck %s
      2 
      3 ; Checks if indirect call targets are read correctly when reading from gcc
      4 ; format profile.
      5 ; It is expected to fail on certain architectures as gcc profile reader does
      6 ; not work.
      7 ; XFAIL: powerpc64-, s390x, mips-, mips64-, sparc
      8 
      9 define void @test(void ()*) !dbg !3 {
     10   %2 = alloca void ()*
     11   store void ()* %0, void ()** %2
     12   %3 = load void ()*, void ()** %2
     13   ; CHECK: call {{.*}}, !prof ![[PROF:[0-9]+]]
     14   call void %3(), !dbg !4
     15   ret void
     16 }
     17 
     18 !llvm.dbg.cu = !{!0}
     19 !llvm.module.flags = !{!2}
     20 
     21 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1)
     22 !1 = !DIFile(filename: "test.cc", directory: "/")
     23 !2 = !{i32 2, !"Debug Info Version", i32 3}
     24 !3 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 1, unit: !0)
     25 !4 = !DILocation(line: 5, scope: !3)
     26 ; CHECK: ![[PROF]] = !{!"VP", i32 0, i64 3457, i64 9191153033785521275, i64 2059, i64 -1069303473483922844, i64 1398}
     27