Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / AArch64 / constant-island-alignment.s
blob3ce0df9d4f2908273e9618ec5e1b7cdd21489839
1 // This test checks that the constant island is aligned after BOLT tool.
2 // In case the nop before .Lci will be removed the pointer to exit function
3 // won't be alinged and the test will fail.
5 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
6 # RUN: %s -o %t.o
7 # RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -Wl,-q \
8 # RUN: -nostartfiles -nodefaultlibs -Wl,-z,notext
9 # RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 --trap-old-code
10 # RUN: llvm-objdump -d --disassemble-symbols='$d' %t.bolt | FileCheck %s
12 .text
13 .align 4
14 .global
15 .type dummy, %function
16 dummy:
17 add x0, x0, #1
18 ret
20 .global
21 .type exitOk, %function
22 exitOk:
23 mov x0, #0
24 ret
26 .global _start
27 .type _start, %function
28 _start:
29 adrp x0, .Lci
30 ldr x0, [x0, #:lo12:.Lci]
31 blr x0
32 mov x0, #1
33 ret
34 nop
35 # CHECK: {{0|8}} <$d>:
36 .Lci:
37 .xword exitOk
38 .xword 0