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
8 # RUN: llvm-bolt %t.exe --data %t.fdata --print-finalized \
9 # RUN: --tail-duplication=moderate --tail-duplication-minimum-offset=1 \
10 # RUN: -o %t.out | FileCheck %s
12 # FDATA: 1 main f 1 main 19 0 10
13 # FDATA: 1 main f 1 main 11 0 13
14 # FDATA: 1 main 17 1 main 3c 0 10
15 # FDATA: 1 main 39 1 main 3c 0 10
17 # CHECK: tail duplication modified 1 ({{.*}}%) functions; duplicated 1 blocks ({{.*}} bytes) responsible for {{.*}} dynamic executions ({{.*}} of all block executions)
18 # CHECK: BB Layout : .LBB00, .Ltmp0, .Ltail-dup0, .Ltmp1, .Ltmp2
20 # This is the C++ code fed to Clang
24 # return fib(term-1) + fib(term-2);
30 .size main, .Lend-main