[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / bolt / test / X86 / bb-with-two-tail-calls.s
blob71807510527f9a23b45ab4a413363beb61214b8d
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 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
5 # RUN: %s -o %t.o
6 # RUN: link_fdata %s %t.o %t.fdata
7 # RUN: llvm-strip --strip-unneeded %t.o
8 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
9 # RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --lite=0 --dyno-stats \
10 # RUN: --print-sctc --print-only=_start -enable-bat 2>&1 | FileCheck %s
11 # RUN: llvm-objdump --syms %t.out > %t.log
12 # RUN: llvm-bat-dump %t.out --dump-all >> %t.log
13 # RUN: FileCheck %s --input-file %t.log --check-prefix=CHECK-BAT
15 # CHECK-NOT: Assertion `BranchInfo.size() == 2 && "could only be called for blocks with 2 successors"' failed.
16 # Two tail calls in the same basic block after SCTC:
17 # CHECK: {{.*}}: ja {{.*}} # TAILCALL # Offset: 7 # CTCTakenCount: 4
18 # CHECK-NEXT: {{.*}}: jmp {{.*}} # TAILCALL # Offset: 13
20 ## Confirm that a deleted basic block is emitted at function end offset (0xe)
21 # CHECK-BAT: [[#%x,ADDR:]] g .text [[#%x,SIZE:]] _start
22 # CHECK-BAT: Function Address: 0x[[#%x,ADDR]]
23 # CHECK-BAT: 0x[[#%x,SIZE]]
24 # CHECK-BAT: NumBlocks: 5
26 .globl _start
27 _start:
28 je x
29 a: ja b
30 jmp c
31 x: ret
32 # FDATA: 1 _start #a# 1 _start #b# 2 4
33 b: jmp e
35 .nops 1
36 jmp f
38 .globl e
40 nop
42 .globl f
44 nop