llvm-capstone/bolt/test/X86/shrinkwrapping-critedge.s
Maksim Panchenko d648aa1b8e [BOLT][TEST] Use double dash flags in tests
Replace a single dash with a double dash for options that have more
than a single letter.

llvm-bolt-wrapper.py has special treatment for output options such as
"-o" and "-w" causing issues when a single dash is used, e.g. for
"-write-dwp". The wrapper can be fixed as well, but using a double dash
has other advantages as well.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D127538
2022-06-10 16:27:33 -07:00

36 lines
768 B
ArmAsm

# This reproduces a bug with shrink wrapping when trying to split critical
# edges originating at the same basic block.
# REQUIRES: system-linux
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
# RUN: %s -o %t.o
# RUN: link_fdata %s %t.o %t.fdata
# RUN: llvm-strip --strip-unneeded %t.o
# RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -nostdlib
# RUN: llvm-bolt %t.exe --relocs -o %t.out --data %t.fdata \
# RUN: --frame-opt=all --simplify-conditional-tail-calls=false \
# RUN: --eliminate-unreachable=false
.globl _start
_start:
# FDATA: 0 [unknown] 0 1 _start 0 0 1
push %rbx
je b
c:
pop %rbx
ret
b:
je f
jmp *JT(,%rbx,8)
d:
jmp d
mov %r14, %rdi
f:
ret
.data
JT:
.quad c
.quad d
.quad f