blob: 704ac9a97ad3744fb8e6b03edc2e8be108ed056b [file] [log] [blame]
Sergei Larind19d4d32016-01-18 21:07:13 +00001; All of the functions in this module must end up
2; in the same partition.
3
4; Mutually recursive calls
5; RUN: llvm-split -j=2 -preserve-locals -o %t %s
6; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK1 %s
7; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK0 %s
8
Rafael Espindolae4b02312018-01-11 22:15:05 +00009; CHECK0: declare dso_local i32 @funInternal0
10; CHECK0: declare dso_local i32 @funInternal1
Sergei Larind19d4d32016-01-18 21:07:13 +000011; CHECK0: declare i32 @funExternal0
12; CHECK0: declare i32 @funExternal1
13
14; CHECK1: define internal i32 @funInternal0
15; CHECK1: define internal i32 @funInternal1
16; CHECK1: define i32 @funExternal0
17; CHECK1: define i32 @funExternal1
18
19define internal i32 @funInternal0() {
20entry:
21 %x = call i32 @funInternal1()
22 ret i32 %x
23}
24
25define internal i32 @funInternal1() {
26entry:
27 %x = call i32 @funInternal0()
28 ret i32 %x
29}
30
31; Extrnal functions
32
33define i32 @funExternal0() {
34entry:
35 %x = call i32 @funInternal0()
36 ret i32 %x
37}
38
39define i32 @funExternal1() {
40entry:
41 %x = call i32 @funInternal1()
42 ret i32 %x
43}
44