Sergei Larin | d19d4d3 | 2016-01-18 21:07:13 +0000 | [diff] [blame] | 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 | |
Rafael Espindola | e4b0231 | 2018-01-11 22:15:05 +0000 | [diff] [blame] | 9 | ; CHECK0: declare dso_local i32 @funInternal0 |
| 10 | ; CHECK0: declare dso_local i32 @funInternal1 |
Sergei Larin | d19d4d3 | 2016-01-18 21:07:13 +0000 | [diff] [blame] | 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 | |
| 19 | define internal i32 @funInternal0() { |
| 20 | entry: |
| 21 | %x = call i32 @funInternal1() |
| 22 | ret i32 %x |
| 23 | } |
| 24 | |
| 25 | define internal i32 @funInternal1() { |
| 26 | entry: |
| 27 | %x = call i32 @funInternal0() |
| 28 | ret i32 %x |
| 29 | } |
| 30 | |
| 31 | ; Extrnal functions |
| 32 | |
| 33 | define i32 @funExternal0() { |
| 34 | entry: |
| 35 | %x = call i32 @funInternal0() |
| 36 | ret i32 %x |
| 37 | } |
| 38 | |
| 39 | define i32 @funExternal1() { |
| 40 | entry: |
| 41 | %x = call i32 @funInternal1() |
| 42 | ret i32 %x |
| 43 | } |
| 44 | |