1; RUN: llc -mtriple=arm-eabi -print-machineinstrs=tailduplication -tail-dup-size=100 \
2; RUN:      -enable-tail-merge=false -disable-cgp %s -o /dev/null 2>&1 \
3; RUN:	| FileCheck %s
4
5; CHECK: Machine code for function test0:
6; CHECK: Successors according to CFG: BB#1(4) BB#2(124)
7
8define void @test0(i32 %a, i32 %b, i32* %c, i32* %d) {
9entry:
10  store i32 3, i32* %d
11  br label %B1
12
13B2:
14  store i32 2, i32* %c
15  br label %B4
16
17B3:
18  store i32 2, i32* %c
19  br label %B4
20
21B1:
22  store i32 1, i32* %d
23  %test0 = icmp slt i32 %a, %b
24  br i1 %test0, label %B2, label %B3, !prof !0
25
26B4:
27  ret void
28}
29
30!0 = !{!"branch_weights", i32 4, i32 124}
31
32; CHECK: Machine code for function test1:
33; CHECK: Successors according to CFG: BB#1(8) BB#2(248)
34
35@g0 = common global i32 0, align 4
36
37define void @test1(i32 %a, i32 %b, i32* %c, i32* %d, i32* %e) {
38
39  %test0 = icmp slt i32 %a, %b
40  br i1 %test0, label %B1, label %B2, !prof !1
41
42B1:
43  br label %B3
44
45B2:
46  store i32 2, i32* %c
47  br label %B3
48
49B3:
50  store i32 3, i32* %e
51  ret void
52}
53
54!1 = !{!"branch_weights", i32 248, i32 8}
55