1 # REQUIRES: system-linux
3 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
5 # RUN: link_fdata %s %t.o %t.fdata
6 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
7 # RUN: llvm-bolt %t.exe --data %t.fdata --reorder-blocks=ext-tsp \
8 # RUN: --print-finalized \
9 # RUN: --tail-duplication=moderate --tail-duplication-minimum-offset=1 \
10 # RUN: --tail-duplication-const-copy-propagation=1 -o %t.out | FileCheck %s
11 # RUN: %t.exe; echo $?
12 # RUN: %t.out; echo $?
14 # FDATA: 1 main 14 1 main #.BB2# 0 10
15 # FDATA: 1 main 16 1 main #.BB2# 0 20
16 # CHECK: BOLT-INFO: tail duplication modified 1 ({{.*}}%) functions; duplicated 1 blocks ({{.*}} bytes) responsible for {{.*}} dynamic executions ({{.*}}% of all block executions)
17 # CHECK: BB Layout : .LBB00, .Ltail-dup0, .Ltmp0, .Ltmp1
18 # CHECK-NOT: mov $0x2, %rbx
23 .size main, .Lend-main