Paschalis Mpeis | cb9bacf | 2024-10-17 07:59:05 | [diff] [blame] | 1 | # 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 |
| 15 | foo: |
| 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: {{.*}} |