[LV] Add test showing debug output for loops with uncountable BTCs.
[llvm-project.git] / bolt / test / AArch64 / internal-call.s
blob43b3a64f9d328036292b9cfab8a6ee4f6d38fa44
1 ## Test that llvm-bolt detects internal calls and marks the containing function
2 ## as non-simple.
4 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
5 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -static
6 # RUN: llvm-bolt %t.exe -o %t.null --print-all 2>&1 | FileCheck %s
8 # CHECK: Binary Function "_start" after building cfg
9 # CHECK: internal call detected in function _start
10 # CHECK-NOT: Binary Function "_start" after validate-internal-calls
12 .text
13 .globl _start
14 .type _start, %function
15 _start:
16 .cfi_startproc
17 .LBB00:
18 mov x11, #0x1fff
19 cmp x1, x11
20 b.hi .Ltmp1
22 .entry1:
23 movi v4.16b, #0x0
24 movi v5.16b, #0x0
25 subs x1, x1, #0x8
26 b.lo .Ltmp2
28 .entry2:
29 ld1 { v2.2d, v3.2d }, [x0], #32
30 ld1 { v0.2d, v1.2d }, [x0], #32
32 .Ltmp2:
33 uaddlp v4.4s, v4.8h
34 uaddlp v4.2d, v4.4s
35 mov x0, v4.d[0]
36 mov x1, v4.d[1]
37 add x0, x0, x1
38 ret x30
40 .Ltmp1:
41 mov x8, x30
43 .Lloop:
44 add x5, x0, x9
45 mov x1, #0xface
46 movi v4.16b, #0x0
47 movi v5.16b, #0x0
48 bl .entry2
49 add x4, x4, x0
50 mov x0, x5
51 sub x7, x7, x10
52 cmp x7, x11
53 b.hi .Lloop
55 mov x1, x7
56 bl .entry1
57 add x0, x4, x0
58 mov x30, x8
59 ret x30
61 .cfi_endproc
62 .size _start, .-_start
64 ## Force relocation mode.
65 .reloc 0, R_AARCH64_NONE