aboutsummaryrefslogtreecommitdiff
path: root/bolt/test/X86/sctc-bug4.test
blob: e192a238a4d0c9327864dd71fc0d07e2d2c8cb8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Check that fallthrough blocks are handled properly and Offset annotation is
## set for conditional tail calls.

RUN: %clang %cflags %S/Inputs/sctc_bug4.s -o %t
RUN: llvm-bolt %t -o %t.null --enable-bat \
RUN:   -funcs=test_func -print-sctc -sequential-disassembly 2>&1 | FileCheck %s

CHECK:      .Ltmp2 (3 instructions, align : 1)
CHECK-NEXT:   Input offset: 0x24
CHECK-NEXT:   Predecessors: .LFT1
CHECK-NEXT:     00000024: 	cmpq	$0x20, %rsi
CHECK-NEXT:     00000028: 	ja	dummy # TAILCALL # Offset: 53 # CTCTakenCount: 0
CHECK-NEXT:     0000002a: 	jmp .Ltmp4
CHECK-NEXT:   Successors: .Ltmp4

CHECK:      .Ltmp1 (2 instructions, align : 1)
CHECK-NEXT:   Input offset: 0x2c
CHECK-NEXT:   Predecessors: .LFT0
CHECK-NEXT:     0000002c: 	xorq	%r11, %rax
CHECK-NEXT:     0000002f: 	retq

CHECK:      .Ltmp4 (4 instructions, align : 1)
CHECK-NEXT:  Input offset: 0x3a
CHECK-NEXT:  Predecessors: .Ltmp2