46 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \4# RUN: %s -o %t.o5# RUN: link_fdata %s %t.o %t.fdata6# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q7# 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 %s11# RUN: not %t.exe12# RUN: not %t.out13 14# FDATA: 1 main 14 1 main #.BB2# 0 1015# FDATA: 1 main 16 1 main #.BB2# 0 2016# 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, .Ltmp118# CHECK-NOT: mov $0x2, %rbx19 20 .text21 .globl main22 .type main, %function23 .size main, .Lend-main24main:25 mov $0x2, %rbx26 mov $0x1, %rdi27 inc %rdi28 mov %rdi, %rsi29 jmp .BB230.BB1:31 mov $0x9, %rbx32.BB2:33 mov %rbx, %rax34 mov $0x5, %rbx35 add %rsi, %rax36 retq37.BB3:38 mov $0x9, %rbx39.BB4:40 mov $0xa, %rsi41 add %rbx, %rax42 add %rsi, %rax43.BB5:44 retq45.Lend:46