source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AArch64/global-merge-2.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.6 KB
Line 
1; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-global-merge -global-merge-on-external -o - | FileCheck %s
2; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-global-merge -global-merge-on-external -o - | FileCheck %s
3; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-global-merge -global-merge-on-external -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS
4
5@x = global i32 0, align 4
6@y = global i32 0, align 4
7@z = global i32 0, align 4
8
9define void @f1(i32 %a1, i32 %a2) {
10;CHECK-APPLE-IOS-LABEL: _f1:
11;CHECK-APPLE-IOS-NOT: adrp
12;CHECK-APPLE-IOS: adrp  x8, l__MergedGlobals@PAGE
13;CHECK-APPLE-IOS: add   x8, x8, l__MergedGlobals@PAGEOFF
14;CHECK-APPLE-IOS-NOT: adrp
15  store i32 %a1, i32* @x, align 4
16  store i32 %a2, i32* @y, align 4
17  ret void
18}
19
20define void @g1(i32 %a1, i32 %a2) {
21;CHECK-APPLE-IOS-LABEL: _g1:
22;CHECK-APPLE-IOS: adrp  x8, l__MergedGlobals@PAGE
23;CHECK-APPLE-IOS: add   x8, x8, l__MergedGlobals@PAGEOFF
24;CHECK-APPLE-IOS-NOT: adrp
25  store i32 %a1, i32* @y, align 4
26  store i32 %a2, i32* @z, align 4
27  ret void
28}
29
30;CHECK: .type   .L_MergedGlobals,@object // @_MergedGlobals
31;CHECK: .local  .L_MergedGlobals
32;CHECK: .comm   .L_MergedGlobals,12,8
33
34;CHECK: .globl  x
35;CHECK: x = .L_MergedGlobals
36;CHECK: .size x, 4
37;CHECK: .globl  y
38;CHECK: y = .L_MergedGlobals+4
39;CHECK: .size y, 4
40;CHECK: .globl  z
41;CHECK: z = .L_MergedGlobals+8
42;CHECK: .size z, 4
43
44;CHECK-APPLE-IOS: .zerofill __DATA,__bss,l__MergedGlobals,12,3
45
46;CHECK-APPLE-IOS: .globl        _x
47;CHECK-APPLE-IOS:  = l__MergedGlobals
48;CHECK-APPLE-IOS: .globl        _y
49;CHECK-APPLE-IOS: _y = l__MergedGlobals+4
50;CHECK-APPLE-IOS: .globl        _z
51;CHECK-APPLE-IOS: _z = l__MergedGlobals+8
52;CHECK-APPLE-IOS: .subsections_via_symbols
Note: See TracBrowser for help on using the repository browser.