31 lines · plain
1## Check that BOLT preserves nop instruction if it's the only instruction2## in a function.3 4# REQUIRES: system-linux5 6# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o7# RUN: ld.lld %t.o -o %t.exe -q8# RUN: llvm-bolt %t.exe -o %t.bolt.exe --relocs=09# RUN: llvm-objdump -d %t.bolt.exe | FileCheck %s10 11 .text12 .globl nop_function13 .type nop_function,@function14nop_function:15 .cfi_startproc16 nop17# CHECK: <nop_function>:18# CHECK-NEXT: nop19 20 .size nop_function, .-nop_function21 .cfi_endproc22 23 24 .globl _start25 .type _start,@function26_start:27 .cfi_startproc28 call nop_function29 .size _start, .-_start30 .cfi_endproc31