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 -global-merge-aligned=true | FileCheck --check-prefix=NO-MERGE %s
4 ; RUN: llc < %s -mtriple=arm64-apple-ios -O0 | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE
5 ; RUN: llc < %s -mtriple=arm64-apple-ios -O0 -global-merge-on-external=true -global-merge-aligned=false | FileCheck %s --check-prefix=CHECK-APPLE-IOS-NO-MERGE
7 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O1 | FileCheck %s
8 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -O1 -global-merge-on-external=true -global-merge-aligned=true | FileCheck %s
10 ; RUN: llc < %s -mtriple=arm64-apple-ios -O1 | FileCheck %s --check-prefix=CHECK-APPLE-IOS
11 ; RUN: llc < %s -mtriple=arm64-apple-ios -O1 -global-merge-on-external=true -global-merge-aligned=false | FileCheck %s --check-prefix=CHECK-APPLE-IOS
13 @m = internal global i32 0, align 4
14 @n = internal global i32 0, align 4
16 define void @f1(i32 %a1, i32 %a2) {
18 ; CHECK: adrp x{{[0-9]+}}, _MergedGlobals
21 ; CHECK-APPLE-IOS-LABEL: f1:
22 ; CHECK-APPLE-IOS: adrp x{{[0-9]+}}, __MergedGlobals
23 ; CHECK-APPLE-IOS-NOT: adrp
24 store i32 %a1, i32* @m, align 4
25 store i32 %a2, i32* @n, align 4
29 ; CHECK: .local _MergedGlobals
30 ; CHECK: .comm _MergedGlobals,8,8
31 ; NO-MERGE-NOT: .local _MergedGlobals
33 ; CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,3
34 ; CHECK-APPLE-IOS-NO-MERGE-NOT: .zerofill __DATA,__bss,__MergedGlobals,8,3