1 # This checks that shrink wrapping does attempt at accessing stack elements
2 # using RSP when the function is aligning RSP and changing offsets.
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
8 # RUN: link_fdata %s %t.o %t.fdata
9 # RUN: llvm-strip --strip-unneeded %t.o
10 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
11 # RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata \
12 # RUN: --frame-opt=all --simplify-conditional-tail-calls=false \
13 # RUN: --eliminate-unreachable=false | FileCheck %s
15 # Here we have a function that aligns the stack at prologue. Stack pointer
16 # analysis can't try to infer offset positions after AND because that depends
17 # on the runtime value of the stack pointer of callee (whether it is misaligned
20 .type _start, %function
23 # FDATA: 0 [unknown] 0 1 _start 0 0 1
28 and $
0xffffffffffffffe0,%rsp
31 # FDATA: 1 _start #b# 1 _start #hot_path# 0 1
35 # Block push-pop mode by using an instruction that requires the
36 # stack to be aligned to 128B. This will force the pass
37 # to try to index stack elements by using RSP +offset directly, but
38 # we do not know how to access individual elements of the stack thanks
53 .size _start, .-_start
55 # CHECK: BOLT-INFO: Shrink wrapping moved 0 spills inserting load/stores and 0 spills inserting push/pops