1 # This checks that shrink wrapping correctly drops moving push/pops when
2 # there is a MOV instruction loading the value of the stack pointer in
3 # order to do pointer arithmetic with a stack address.
6 # REQUIRES: system-linux
8 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
10 # RUN: link_fdata %s %t.o %t.fdata
11 # RUN: llvm-strip --strip-unneeded %t.o
12 # RUN: ld.lld %t.o -o %t.exe -q
13 # RUN: llvm-bolt %t.exe -relocs -o %t.out -data %t.fdata \
14 # RUN: -frame-opt=all -simplify-conditional-tail-calls=false \
15 # RUN: -experimental-shrink-wrapping \
16 # RUN: -eliminate-unreachable=false | FileCheck %s
19 .type _start, %function
22 # FDATA: 0 [unknown] 0 1 _start 0 0 1
50 .size _start, .-_start
58 # CHECK: BOLT-INFO: Shrink wrapping moved 2 spills inserting load/stores and 0 spills inserting push/pops