aboutsummaryrefslogtreecommitdiff
path: root/bolt/test/AArch64/split-funcs-lite.s
blob: 5f95eea17ae75fdfea20f707824a22bfc819e7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This test checks that tentative code layout for cold blocks always runs.
# It commonly happens when using lite mode with split functions.

# REQUIRES: system-linux, asserts

# RUN: %clang %cflags -o %t %s
# RUN: %clang %s %cflags -Wl,-q -o %t
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions \
# RUN:   -debug 2>&1 | FileCheck %s

  .text
  .globl  foo
  .type foo, %function
foo:
.entry_bb:
# FDATA: 1 foo #.entry_bb# 10
    cmp x0, #0
    b.eq .Lcold_bb1
    ret
.Lcold_bb1:
    ret

## Force relocation mode.
.reloc 0, R_AARCH64_NONE

# CHECK: foo{{.*}} cold tentative: {{.*}}