1 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O0 | FileCheck --check-prefix=NO-MERGE %s
2 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O0 -global-merge-on-external=true | FileCheck --check-prefix=NO-MERGE %s
4 ; RUN: llc < %s -mtriple=aarch64-apple-ios -O0 | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE
5 ; RUN: llc < %s -mtriple=aarch64-apple-ios -O0 -global-merge-on-external=true | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE
7 ; FIXME: add O1/O2 test for aarch64-none-linux-gnu and aarch64-apple-ios
9 @m = internal global i32 0, align 4
10 @n = internal global i32 0, align 4
12 define void @f1(i32 %a1, i32 %a2) {
14 ; CHECK: adrp x{{[0-9]+}}, _MergedGlobals
17 ; CHECK-APPLE-IOS-LABEL: f1:
18 ; CHECK-APPLE-IOS: adrp x{{[0-9]+}}, __MergedGlobals
19 ; CHECK-APPLE-IOS-NOT: adrp
20 store i32 %a1, ptr @m, align 4
21 store i32 %a2, ptr @n, align 4
25 ; CHECK: .local _MergedGlobals
26 ; CHECK: .comm _MergedGlobals,8,8
27 ; NO-MERGE-NOT: .local _MergedGlobals
29 ; CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,3
30 ; CHECK-APPLE-IOS-NO-MERGE-NOT: .zerofill __DATA,__bss,__MergedGlobals,8,3