[TableGen][SystemZ] Correctly check the range of a leaf immediate (#119931)
[llvm-project.git] / bolt / test / X86 / shrinkwrapping-insertcfi.s
blobb3813ad86b46ac8316e6bb299b4d4c3361d8babc
1 ## This test reproduces the issue with inserting updated CFI in shrink wrapping
2 ## into the first basic block.
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
7 # RUN: link_fdata %s %t.o %t.fdata
8 # RUN: llvm-strip --strip-unneeded %t.o
9 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
10 # RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --frame-opt=all --lite=0 \
11 # RUN: --print-fop 2>&1 | FileCheck %s
13 ## Check shrink wrapping results:
14 # CHECK: BOLT-INFO: Shrink wrapping moved 0 spills inserting load/stores and 1 spills inserting push/pops
16 ## Check that CFI is successfully inserted into the first basic block:
17 # CHECK: Binary Function "_start" after frame-optimizer
18 # CHECK: .LBB00 (2 instructions, align : 1)
19 # CHECK-NEXT: Entry Point
20 # CHECK: 00000000: !CFI {{.*}}
21 # CHECK-NEXT: 00000000: je .Ltmp{{.*}}
23 .globl _start
24 _start:
25 .cfi_startproc
26 # FDATA: 0 [unknown] 0 1 _start 0 0 6
27 # !CFI OpOffset for reg3/rbx is inserted into this block.
28 je a
29 b: jne _start
30 # FDATA: 1 _start #b# 1 _start #c# 0 3
33 push %rbx
34 .cfi_offset 3, 4
35 pop %rbx
37 ## This basic block is treated as having 0 execution count.
38 ## push and pop will be sinked into this block.
40 ud2
41 .cfi_endproc