1 # This reproduces a bug with dynostats when trying to compute branch stats
2 # at a block with two tails calls (one conditional and one unconditional).
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
8 # RUN: link_fdata %s %t.o %t.fdata
9 # RUN: llvm-strip --strip-unneeded %t.o
10 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
11 # RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --lite=0 --dyno-stats \
12 # RUN: --print-sctc --print-only=_start 2>&1 | FileCheck %s
13 # CHECK-NOT: Assertion `BranchInfo.size() == 2 && "could only be called for blocks with 2 successors"' failed.
14 # Two tail calls in the same basic block after SCTC:
15 # CHECK: {{.*}}: ja {{.*}} # TAILCALL # CTCTakenCount: {{.*}}
16 # CHECK-NEXT: {{.*}}: jmp {{.*}} # TAILCALL
24 # FDATA: 1 _start #a# 1 _start #b# 2 4