1# REQUIRES: system-linux 2 3# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ 4# RUN: %s -o %t.o 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 --print-finalized \ 8# RUN: -o %t.out --three-way-branch | FileCheck %s 9# RUN: %t.exe 10# RUN: %t.out 11 12# FDATA: 1 main 8 1 main a 0 22 13# FDATA: 1 main 8 1 main #.BB1# 0 50 14# FDATA: 1 main 12 1 main 14 0 30 15# FDATA: 1 main 12 1 main #.BB2# 0 40 16# CHECK: Successors: .Ltmp1 (mispreds: 0, count: 40), .Ltmp0 (mispreds: 0, count: 52) 17# CHECK: Successors: .LFT0 (mispreds: 0, count: 22), .LFT1 (mispreds: 0, count: 30) 18 19 .text 20 .globl main 21 .type main, %function 22 .size main, .Lend-main 23main: 24 mov $0x0, %eax 25 cmp $0x1, %eax 26 jge .BB1 27 mov $0xf, %eax 28 xor %eax, %eax 29 retq 30.BB1: 31 jg .BB2 32 retq 33.BB2: 34 mov $0x7, %eax 35 retq 36.Lend: 37