blob: 5f95eea17ae75fdfea20f707824a22bfc819e7c0 [file] [log] [blame]
Paschalis Mpeiscb9bacf2024-10-17 07:59:051# This test checks that tentative code layout for cold blocks always runs.
2# It commonly happens when using lite mode with split functions.
3
4# REQUIRES: system-linux, asserts
5
6# RUN: %clang %cflags -o %t %s
7# RUN: %clang %s %cflags -Wl,-q -o %t
8# RUN: link_fdata --no-lbr %s %t %t.fdata
9# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions \
10# RUN: -debug 2>&1 | FileCheck %s
11
12 .text
13 .globl foo
14 .type foo, %function
15foo:
16.entry_bb:
17# FDATA: 1 foo #.entry_bb# 10
18 cmp x0, #0
19 b.eq .Lcold_bb1
20 ret
21.Lcold_bb1:
22 ret
23
24## Force relocation mode.
25.reloc 0, R_AARCH64_NONE
26
27# CHECK: foo{{.*}} cold tentative: {{.*}}