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