1## This reproduces a bug in aggressive tail duplication/copy propagation. 2 3# REQUIRES: system-linux 4# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o 5# RUN: link_fdata %s %t.o %t.fdata 6# RUN: llvm-strip --strip-unneeded %t.o 7# RUN: ld.lld %t.o -o %t.exe -q -nostdlib 8# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --relocs \ 9# RUN: --tail-duplication=aggressive \ 10# RUN: --tail-duplication-const-copy-propagation=1 11 12 .text 13 .type a, %function 14 .globl a 15a: 16 .cfi_startproc 17 jmpq *JT(,%rcx,8) 18b: 19 jb d 20# FDATA: 1 a #b# 1 a #d# 6 60 21e: 22 cmpl %eax, %ebx 23f: 24 jmp g 25# FDATA: 1 a #f# 1 a #g# 0 8 26d: 27 movl $0x1, %ebx 28 jmp e 29 jmp g 30h: 31 jmp h 32i: 33 jne j 34g: 35 jmp g 36j: 37 ud2 38 .cfi_endproc 39.size a, .-a 40 41.rodata 42JT: 43 .quad b 44 .quad i 45