• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; 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
9; CHECK0: declare i32 @funInternal0
10; CHECK0: declare i32 @funInternal1
11; 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
45