[llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710)
[llvm-project.git] / bolt / test / X86 / nolbr.s
blobbebb697122f4907ae940c5043887d9b19c33cd97
1 # This reproduces a bug where profile collected from perf without LBRs and
2 # converted into fdata-no-lbr format is reported to not contain profile for any
3 # functions.
5 # REQUIRES: system-linux
7 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
8 # RUN: %s -o %t.o
9 # RUN: link_fdata --no-lbr %s %t.o %t.fdata
10 # RUN: FileCheck %s --input-file %t.fdata --check-prefix=CHECK-FDATA
11 # RUN: llvm-strip --strip-unneeded %t.o
12 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
13 # RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --dyno-stats -nl \
14 # RUN: --print-only=_start 2>&1 | FileCheck %s --check-prefix=CHECK-BOLT
16 # CHECK-FDATA: no_lbr
17 # CHECK-FDATA-NEXT: 1 _start [[#]] 1
19 # CHECK-BOLT: BOLT-INFO: pre-processing profile using branch profile reader
20 # CHECK-BOLT: BOLT-INFO: operating with basic samples profiling data (no LBR).
21 # CHECK-BOLT: BOLT-INFO: 1 out of 1 functions in the binary (100.0%) have non-empty execution profile
23 .globl _start
24 .type _start, %function
25 _start:
26 pushq %rbp
27 movq %rsp, %rbp
28 cmpl $0x0, %eax
30 # FDATA: 1 _start #a# 1
31 je b
32 movl $0x0, %eax
33 jmp c
35 movl $0x1, %eax
37 popq %rbp
38 retq
39 .size _start, .-_start