1 ; We should never separate alias from aliasee.
2 ; RUN: llvm-split -j=3 -preserve-locals -o %t %s
3 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
4 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
5 ; RUN: llvm-dis -o - %t2 | FileCheck --check-prefix=CHECK2 %s
7 ; Checks are not critical here - verifier will assert if we fail.
8 ; CHECK0: @funInternal2Alias = alias
9 ; CHECK0: @funExternal2Alias = alias
10 ; CHECK0: define internal i32 @funInternal2
11 ; CHECK0: define i32 @funExternal2
13 ; CHECK1: @funInternalAlias = alias
14 ; CHECK1: define internal i32 @funInternal
16 ; CHECK2: @funExternalAlias = alias
17 ; CHECK2: define i32 @funExternal
19 @funInternalAlias = alias i32 (), i32 ()* @funInternal
20 @funExternalAlias = alias i32 (), i32 ()* @funExternal
21 @funInternal2Alias = alias i32 (), i32 ()* @funInternal2
22 @funExternal2Alias = alias i32 (), i32 ()* @funExternal2
24 define internal i32 @funInternal() {
29 define i32 @funExternal() {
31 %x = call i32 @funInternalAlias()
35 define internal i32 @funInternal2() {
37 %x = call i32 @funInternalAlias()
41 define i32 @funExternal2() {
43 %x = call i32 @funInternal2()
44 %y = call i32 @funExternalAlias()
45 %z = add nsw i32 %x, %y