llvm-capstone/bolt/test/X86/tail-duplication-cacheline.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

32 lines
669 B
ArmAsm

# This reproduces a bug in TailDuplication::isInCacheLine
# with accessing BlockLayout past bounds (unreachable blocks).
# 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 -o %t.out --data %t.fdata --relocs \
# RUN: --tail-duplication=aggressive
.globl _start
_start:
jmp d
je _start
movl %esi, %edi
d:
jmpq *JT0(,%rcx,8)
# FDATA: 1 _start #d# 1 _start #e# 1 3
f:
movl 0, %esi
g:
movl 0, %esi
e:
jmp f
.rodata
JT0:
.quad g
.quad e