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