Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / nop-function.s
blob44d997a5ddb4f5fb4c0487ab038460dbf1e11876
1 ## Check that BOLT preserves nop instruction if it's the only instruction
2 ## in a function.
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
7 # RUN: ld.lld %t.o -o %t.exe -q
8 # RUN: llvm-bolt %t.exe -o %t.bolt.exe --relocs=0
9 # RUN: llvm-objdump -d %t.bolt.exe | FileCheck %s
11 .text
12 .globl nop_function
13 .type nop_function,@function
14 nop_function:
15 .cfi_startproc
16 nop
17 # CHECK: <nop_function>:
18 # CHECK-NEXT: nop
20 .size nop_function, .-nop_function
21 .cfi_endproc
24 .globl _start
25 .type _start,@function
26 _start:
27 .cfi_startproc
28 call nop_function
29 .size _start, .-_start
30 .cfi_endproc