1 # This checks that frame optimizer does not try to optimize away caller-saved
2 # regs when we do not have complete aliasing info (when there is an LEA
3 # instruction and the function does arithmetic with stack addresses).
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: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
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: -lite=0 -eliminate-unreachable=false | FileCheck %s
16 # RUN: llvm-objdump -d %t.out --print-imm-hex | \
17 # RUN: FileCheck --check-prefix CHECK-OBJDUMP %s
30 .type _start, %function
33 # FDATA: 0 [unknown] 0 1 _start 0 0 1
44 movq
%r13, -0x08(%rbp
)
45 leaq
-0x08(%rbp
), %rsi
47 movq
-0x08(%rbp
), %r13
50 .size _start, .-_start
53 # CHECK: BOLT-INFO: FOP deleted 0 load(s) (dyn count: 0) and 0 store(s)
55 # CHECK-OBJDUMP: <_start>:
56 # CHECK-OBJDUMP: movq %rdi, %r13
57 # CHECK-OBJDUMP-NEXT: movq %r13, -0x8(%rbp)
58 # CHECK-OBJDUMP-NEXT: leaq
59 # CHECK-OBJDUMP-NEXT: callq
60 # CHECK-OBJDUMP-NEXT: movq -0x8(%rbp), %r13