1*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-global-merge -o - | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-global-merge -global-merge-on-external -o - | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-global-merge -o - | FileCheck %s 5*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-global-merge -global-merge-on-external -o - | FileCheck %s 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-global-merge -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS 8*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-global-merge -global-merge-on-external -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker@m = internal global i32 0, align 4 11*9880d681SAndroid Build Coastguard Worker@n = internal global i32 0, align 4 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerdefine void @f1(i32 %a1, i32 %a2) { 14*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS-NOT: adrp 15*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS: adrp x8, l__MergedGlobals@PAGE 16*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS-NOT: adrp 17*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS: add x8, x8, l__MergedGlobals@PAGEOFF 18*9880d681SAndroid Build Coastguard Worker store i32 %a1, i32* @m, align 4 19*9880d681SAndroid Build Coastguard Worker store i32 %a2, i32* @n, align 4 20*9880d681SAndroid Build Coastguard Worker ret void 21*9880d681SAndroid Build Coastguard Worker} 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker;CHECK: .type .L_MergedGlobals,@object // @_MergedGlobals 24*9880d681SAndroid Build Coastguard Worker;CHECK: .local .L_MergedGlobals 25*9880d681SAndroid Build Coastguard Worker;CHECK: .comm .L_MergedGlobals,8,8 26*9880d681SAndroid Build Coastguard Worker;CHECK: m = .L_MergedGlobals 27*9880d681SAndroid Build Coastguard Worker;CHECK: n = .L_MergedGlobals+4 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS: .zerofill __DATA,__bss,l__MergedGlobals,8,3 ; @_MergedGlobals 30*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS-NOT: _m = l__MergedGlobals 31*9880d681SAndroid Build Coastguard Worker;CHECK-APPLE-IOS-NOT: _n = l__MergedGlobals+4 32