[mips][mips64r6] Add Compact zero-compare branch-and-link instructions
[oota-llvm.git] / test / CodeGen / AArch64 / global-merge.ll
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
3
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
6
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
9
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
12
13 @m = internal global i32 0, align 4
14 @n = internal global i32 0, align 4
15
16 define void @f1(i32 %a1, i32 %a2) {
17 ; CHECK-LABEL: f1:
18 ; CHECK: adrp x{{[0-9]+}}, _MergedGlobals
19 ; CHECK-NOT: adrp
20
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
26   ret void
27 }
28
29 ; CHECK:        .local _MergedGlobals
30 ; CHECK:        .comm  _MergedGlobals,8,8
31 ; NO-MERGE-NOT: .local _MergedGlobals
32
33 ; CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,3
34 ; CHECK-APPLE-IOS-NO-MERGE-NOT: .zerofill __DATA,__bss,__MergedGlobals,8,3