1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o %t
3# RUN: llvm-readobj %t --cg-profile | FileCheck %s
4
5# CHECK:      CGProfile [
6# CHECK-NEXT:   CGProfileEntry {
7# CHECK-NEXT:     From: a (10)
8# CHECK-NEXT:     To: b (11)
9# CHECK-NEXT:     Weight: 32
10# CHECK-NEXT:   }
11# CHECK-NEXT:   CGProfileEntry {
12# CHECK-NEXT:     From: c (12)
13# CHECK-NEXT:     To: a (10)
14# CHECK-NEXT:     Weight: 11
15# CHECK-NEXT:   }
16# CHECK-NEXT:   CGProfileEntry {
17# CHECK-NEXT:     From: d (13)
18# CHECK-NEXT:     To: e (14)
19# CHECK-NEXT:     Weight: 20
20# CHECK-NEXT:   }
21# CHECK-NEXT: ]
22
23.section .test
24a:
25b:
26c:
27d:
28e:
29
30.section ".llvm.call-graph-profile"
31    .long 10    ## Symbol index of a.
32    .long 11    ## Symbol index of b.
33    .quad 32    ## Weight from a to b.
34
35    .long 12    ## Symbol index of c.
36    .long 10    ## Symbol index of a.
37    .quad 11    ## Weight from c to a.
38
39    .long 13    ## Symbol index of d.
40    .long 14    ## Symbol index of e.
41    .quad 20    ## Weight from d to e.
42