1 ; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-enable-global-merge -o - | FileCheck %s
2 ; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-enable-global-merge -global-merge-on-external -o - | FileCheck %s
4 ; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-enable-global-merge -o - | FileCheck %s
5 ; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-enable-global-merge -global-merge-on-external -o - | FileCheck %s
7 ; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-enable-global-merge -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS
8 ; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-enable-global-merge -global-merge-on-external -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS
10 @m = internal global i32 0, align 4
11 @n = internal global i32 0, align 4
13 define void @f1(i32 %a1, i32 %a2) {
14 ;CHECK-APPLE-IOS-NOT: adrp
15 ;CHECK-APPLE-IOS: adrp x8, __MergedGlobals@PAGE
16 ;CHECK-APPLE-IOS-NOT: adrp
17 ;CHECK-APPLE-IOS: add x8, x8, __MergedGlobals@PAGEOFF
18 store i32 %a1, ptr @m, align 4
19 store i32 %a2, ptr @n, align 4
23 ;CHECK: .type .L_MergedGlobals,@object // @_MergedGlobals
24 ;CHECK: .local .L_MergedGlobals
25 ;CHECK: .comm .L_MergedGlobals,8,4
26 ;CHECK: .set m, .L_MergedGlobals
27 ;CHECK: .set n, .L_MergedGlobals+4
29 ;CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,2 ; @_MergedGlobals
30 ;CHECK-APPLE-IOS-NOT: .set _m, l__MergedGlobals
31 ;CHECK-APPLE-IOS-NOT: .set _n, l__MergedGlobals+4