Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / AArch64 / tailcall_traps.s
blob95009cd784f701c56feb88a59544de699ecfb7f5
1 ## Tests the peephole that adds trap instructions following indirect tail calls.
3 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
4 # RUN: %s -o %t.o
5 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
6 # RUN: llvm-bolt %t.exe -o %t.bolt --peepholes=tailcall-traps \
7 # RUN: --print-peepholes --funcs=foo,bar 2>&1 | FileCheck %s
9 # CHECK: Binary Function "foo"
10 # CHECK: br x0 # TAILCALL
11 # CHECK-NEXT: brk #0x1
12 # CHECK: End of Function "foo"
14 # CHECK: Binary Function "bar"
15 # CHECK: b foo # TAILCALL
16 # CHECK: End of Function "bar"
18 .text
19 .align 4
20 .global _start
21 .type _start, %function
22 _start:
23 nop
24 ret
25 .size _start, .-_start
27 .global foo
28 .type foo, %function
29 foo:
30 br x0
31 .size foo, .-foo
33 .global bar
34 .type bar, %function
35 bar:
36 b foo
37 .size bar, .-bar