1## This reproduces a bug in TailDuplication::isInCacheLine 2## with accessing BlockLayout past bounds (unreachable blocks). 3 4# REQUIRES: system-linux 5 6# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ 7# RUN: %s -o %t.o 8# RUN: link_fdata %s %t.o %t.fdata 9# RUN: llvm-strip --strip-unneeded %t.o 10# RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -nostdlib 11# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --relocs \ 12# RUN: --tail-duplication=aggressive 13 .globl _start 14_start: 15 jmp d 16 je _start 17 movl %esi, %edi 18d: 19 jmpq *JT0(,%rcx,8) 20# FDATA: 1 _start #d# 1 _start #e# 1 3 21f: 22 movl 0, %esi 23g: 24 movl 0, %esi 25e: 26 jmp f 27 28.rodata 29JT0: 30 .quad g 31 .quad e 32