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 --tail-duplication=moderate \
9 # RUN: --tail-duplication-minimum-offset=1 -o %t.out | FileCheck %s
10 # RUN: llvm-bolt %t.exe --data %t.fdata --print-finalized \
11 # RUN: --tail-duplication=aggressive --tail-duplication-minimum-offset=1 \
12 # RUN: -o %t.out | FileCheck %s --check-prefix CHECK-NOLOOP
14 # FDATA: 1 main 2 1 main #.BB2# 0 10
15 # FDATA: 1 main 4 1 main #.BB2# 0 20
16 # CHECK: BOLT-INFO: tail duplication modified 1 ({{.*}}%) functions; duplicated 1 blocks (1 bytes) responsible for {{.*}} dynamic executions ({{.*}}% of all block executions)
17 # CHECK: BB Layout : .LBB00, .Ltail-dup0, .Ltmp0, .Ltmp1
19 # Check that the successor of Ltail-dup0 is .LBB00, not itself.
20 # CHECK-NOLOOP: .Ltail-dup0 (1 instructions, align : 1)
21 # CHECK-NOLOOP: Predecessors: .LBB00
23 # CHECK-NOLOOP: .Ltmp0 (1 instructions, align : 1)
28 .size main, .Lend-main
36 # For relocations against .text