1; All of the functions in this module must end up 2; in the same partition. 3 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 7 8; CHECK0: declare dso_local i32 @foo 9; CHECK0: declare dso_local i32 @baz 10; CHECK0: declare i32 @bar 11; CHECK0: declare i32 @bar2 12 13; CHECK1: @bla 14; CHECK1: @bla2 15; CHECK1: define internal i32 @foo 16; CHECK1: define internal i32 @baz 17; CHECK1: define i32 @bar 18; CHECK1: define i32 @bar2 19 20%struct.anon = type { i64, i64 } 21 22@bla = internal global %struct.anon { i64 1, i64 2 }, align 8 23@bla2 = internal global %struct.anon { i64 1, i64 2 }, align 8 24 25define internal i32 @foo() { 26entry: 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 29 ret i32 0 30} 31 32define internal i32 @baz() { 33entry: 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 36 ret i32 0 37} 38 39define i32 @bar() { 40 %call = call i32 @foo() 41 ret i32 0 42} 43 44define i32 @bar2() { 45 %call = call i32 @baz() 46 ret i32 0 47} 48 49