1 ; REQUIRES: x86-registered-target
2 ; RUN: llvm-profgen --binary=%S/Inputs/symbolize.perfbin --perfscript=%s --output=%t1 --show-disassembly-only -x86-asm-syntax=intel --show-source-locations | FileCheck %s --match-full-lines
3 ; RUN: llvm-profgen --binary=%S/Inputs/symbolize.perfbin --perfscript=%s --output=%t2 --show-disassembly-only -x86-asm-syntax=intel --show-source-locations --show-canonical-fname | FileCheck %s --match-full-lines --check-prefix=CHECK-CANO
5 ; CHECK: Disassembly of section .text [0x520, 0x62c]:
6 ; CHECK: <funcA.llvm.1000>:
7 ; CHECK-NEXT: 5e0: mov eax, edi funcA.llvm.1000:0
8 ; CHECK-NEXT: 5e2: mov edx, dword ptr [rip + 2099768] funcLeaf:2 @ funcA.llvm.1000:1
9 ; CHECK-NEXT: 5e8: mov ecx, edx fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
10 ; CHECK-NEXT: 5ea: add ecx, 3 fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
11 ; CHECK-NEXT: 5ed: cmp edx, 3 fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
12 ; CHECK-NEXT: 5f0: cmovl ecx, edx fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
13 ; CHECK-NEXT: 5f3: sub eax, ecx funcLeaf:2 @ funcA.llvm.1000:1
14 ; CHECK-NEXT: 5f5: ret funcA.llvm.1000:2
15 ; CHECK-CANO: <funcA>:
16 ; CHECK-CANO-NEXT: 5e0: mov eax, edi funcA:0
17 ; CHECK-CANO-NEXT: 5e2: mov edx, dword ptr [rip + 2099768] funcLeaf:2 @ funcA:1
18 ; CHECK-CANO-NEXT: 5e8: mov ecx, edx fib:2 @ funcLeaf:2 @ funcA:1
19 ; CHECK-CANO-NEXT: 5ea: add ecx, 3 fib:2 @ funcLeaf:2 @ funcA:1
20 ; CHECK-CANO-NEXT: 5ed: cmp edx, 3 fib:2 @ funcLeaf:2 @ funcA:1
21 ; CHECK-CANO-NEXT: 5f0: cmovl ecx, edx fib:2 @ funcLeaf:2 @ funcA:1
22 ; CHECK-CANO-NEXT: 5f3: sub eax, ecx funcLeaf:2 @ funcA:1
23 ; CHECK-CANO-NEXT: 5f5: ret funcA:2
25 ; CHECK-NEXT: 600: mov eax, edi funcLeaf:1
26 ; CHECK-NEXT: 602: mov edx, dword ptr [rip + 2099736] funcLeaf:2
27 ; CHECK-NEXT: 608: mov ecx, edx fib:2 @ funcLeaf:2
28 ; CHECK-NEXT: 60a: add ecx, 3 fib:2 @ funcLeaf:2
29 ; CHECK-NEXT: 60d: cmp edx, 3 fib:2 @ funcLeaf:2
30 ; CHECK-NEXT: 610: cmovl ecx, edx fib:2 @ funcLeaf:2
31 ; CHECK-NEXT: 613: sub eax, ecx funcLeaf:2
32 ; CHECK-NEXT: 615: ret funcLeaf:3
34 ; CHECK-NEXT: 620: mov eax, edi fib:2
35 ; CHECK-NEXT: 622: add eax, 3 fib:2
36 ; CHECK-NEXT: 625: cmp edi, 3 fib:2
37 ; CHECK-NEXT: 628: cmovl eax, edi fib:2
38 ; CHECK-NEXT: 62b: ret fib:8
40 ; symbolize.perfbin is from the following compile commands:
41 ; clang %S/Inputs/symbolize.ll -shared -fPIC -o %S/Inputs/symbolize.perfbin