1 ; All of the functions in this module must end up
2 ; in the same partition.
4 ; RUN: llvm-split -j=2 -preserve-locals -o %t %s
5 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK1 %s
6 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK0 %s
8 ; CHECK0: declare dso_local i32 @foo
9 ; CHECK0: declare dso_local i32 @baz
10 ; CHECK0: declare i32 @bar
11 ; CHECK0: declare i32 @bar2
15 ; CHECK1: define internal i32 @foo
16 ; CHECK1: define internal i32 @baz
17 ; CHECK1: define i32 @bar
18 ; CHECK1: define i32 @bar2
20 %struct.anon = type { i64, i64 }
22 @bla = internal global %struct.anon { i64 1, i64 2 }, align 8
23 @bla2 = internal global %struct.anon { i64 1, i64 2 }, align 8
25 define internal i32 @foo() {
27 store i64 5, i64* getelementptr inbounds (%struct.anon, %struct.anon* @bla, i32 0, i32 0), align 8
28 store i32 -1, i32* bitcast (i64* getelementptr inbounds (%struct.anon, %struct.anon* @bla2, i32 0, i32 1) to i32*), align 8
32 define internal i32 @baz() {
34 store i64 5, i64* getelementptr inbounds (%struct.anon, %struct.anon* @bla, i32 0, i32 0), align 8
35 store i32 -1, i32* bitcast (i64* getelementptr inbounds (%struct.anon, %struct.anon* @bla2, i32 0, i32 1) to i32*), align 8
40 %call = call i32 @foo()
45 %call = call i32 @baz()