1 # This checks that shrink wrapping correctly drops moving push/pops when
2 # there is an LEA instruction.
5 # REQUIRES: system-linux
7 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
9 # RUN: link_fdata %s %t.o %t.fdata
10 # RUN: llvm-strip --strip-unneeded %t.o
11 # RUN: ld.lld %t.o -o %t.exe -q
12 # RUN: llvm-bolt %t.exe -relocs -o %t.out -data %t.fdata \
13 # RUN: -frame-opt=all -simplify-conditional-tail-calls=false \
14 # RUN: -experimental-shrink-wrapping \
15 # RUN: -eliminate-unreachable=false | FileCheck %s
16 # RUN: llvm-objdump -d %t.out --print-imm-hex | \
17 # RUN: FileCheck --check-prefix CHECK-OBJDUMP %s
20 .type _start, %function
23 # FDATA: 0 [unknown] 0 1 _start 0 0 1
42 leaq
-0x20(%rbp
), %r14
43 movq
-0x20(%rbp
), %rdi
51 .size _start, .-_start
59 # CHECK: BOLT-INFO: Shrink wrapping moved 2 spills inserting load/stores and 0 spills inserting push/pops
61 # Checks that offsets of instructions accessing the stack were not changed
62 # CHECK-OBJDUMP: <_start>:
63 # CHECK-OBJDUMP: movq %rbx, %rdi
64 # CHECK-OBJDUMP-NEXT: leaq -0x20(%rbp), %r14
65 # CHECK-OBJDUMP: movq -0x20(%rbp), %rdi