46 lines · plain
1## Test that infer-fall-throughs would correctly infer the wrong fall-through2## edge count in the example3 4# RUN: llvm-mc --filetype=obj --triple x86_64-unknown-unknown %s -o %t.o5# RUN: link_fdata %s %t.o %t.fdata6# RUN: llvm-strip --strip-unneeded %t.o7# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q8# RUN: llvm-bolt %t.exe -o %t.bolt \9# RUN: --print-estimate-edge-counts --data=%t.fdata \10# RUN: 2>&1 | FileCheck --check-prefix=WITHOUTINFERENCE %s11# RUN: llvm-bolt %t.exe -o %t.bolt --infer-fall-throughs \12# RUN: --print-estimate-edge-counts --data=%t.fdata \13# RUN: 2>&1 | FileCheck --check-prefix=CORRECTINFERENCE %s14 15 16# WITHOUTINFERENCE: Binary Function "main" after estimate-edge-counts17# WITHOUTINFERENCE: {{^\.Ltmp0}}18# WITHOUTINFERENCE: Successors: .Ltmp1 (mispreds: 0, count: 10), .LFT0 (mispreds: 0, count: 0)19# WITHOUTINFERENCE: {{^\.LFT0}}20# WITHOUTINFERENCE: Exec Count : 49021 22# CORRECTINFERENCE: Binary Function "main" after estimate-edge-counts23# CORRECTINFERENCE: {{^\.Ltmp0}}24# CORRECTINFERENCE: Successors: .Ltmp1 (mispreds: 0, count: 10), .LFT0 (inferred count: 490)25# CORRECTINFERENCE: {{^\.LFT0}}26# CORRECTINFERENCE: Exec Count : 49027 28 29 .globl main30 .type main, @function31main:32LLmain_LLstart:33 jmp LLstart34# FDATA: 1 main #LLmain_LLstart# 1 main #LLstart# 0 50035LLstart:36 jge LLexit37# FDATA: 1 main #LLstart# 1 main #LLexit# 0 1038# FDATA: 1 main #LLstart# 1 main #LLmore# 0 039LLmore:40 movl $5, %eax41# FDATA: 1 main #LLmore# 1 main #LLexit# 0 49042LLexit:43 ret44.LLmain_end:45 .size main, .LLmain_end-main46