~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/AArch64/global-merge-3.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 [1000 x i32] zeroinitializer, align 1
 
6
@y = global [1000 x i32] zeroinitializer, align 1
 
7
@z = internal global i32 1, align 4
 
8
 
 
9
define void @f1(i32 %a1, i32 %a2, i32 %a3) {
 
10
;CHECK-APPLE-IOS: adrp  x8, __MergedGlobals_x@PAGE
 
11
;CHECK-APPLE-IOS-NOT: adrp
 
12
;CHECK-APPLE-IOS: add   x8, x8, __MergedGlobals_x@PAGEOFF
 
13
;CHECK-APPLE-IOS: adrp  x9, __MergedGlobals_y@PAGE
 
14
;CHECK-APPLE-IOS: add   x9, x9, __MergedGlobals_y@PAGEOFF
 
15
  %x3 = getelementptr inbounds [1000 x i32], [1000 x i32]* @x, i32 0, i64 3
 
16
  %y3 = getelementptr inbounds [1000 x i32], [1000 x i32]* @y, i32 0, i64 3
 
17
  store i32 %a1, i32* %x3, align 4
 
18
  store i32 %a2, i32* %y3, align 4
 
19
  store i32 %a3, i32* @z, align 4
 
20
  ret void
 
21
}
 
22
 
 
23
;CHECK: .type   _MergedGlobals_x,@object // @_MergedGlobals_x
 
24
;CHECK: .globl  _MergedGlobals_x
 
25
;CHECK: .align  4
 
26
;CHECK: _MergedGlobals_x:
 
27
;CHECK: .size   _MergedGlobals_x, 4004
 
28
 
 
29
;CHECK: .type   _MergedGlobals_y,@object // @_MergedGlobals_y
 
30
;CHECK: .globl  _MergedGlobals_y
 
31
;CHECK: _MergedGlobals_y:
 
32
;CHECK: .size   _MergedGlobals_y, 4000
 
33
 
 
34
;CHECK-APPLE-IOS: .globl        __MergedGlobals_x       ; @_MergedGlobals_x
 
35
;CHECK-APPLE-IOS: .align        4
 
36
;CHECK-APPLE-IOS:  __MergedGlobals_x:
 
37
;CHECK-APPLE-IOS: .long 1
 
38
;CHECK-APPLE-IOS: .space        4000
 
39
 
 
40
;CHECK-APPLE-IOS: .globl        __MergedGlobals_y       ; @_MergedGlobals_y
 
41
;CHECK-APPLE-IOS: .zerofill __DATA,__common,__MergedGlobals_y,4000,4
 
42
 
 
43
;CHECK: .globl  x
 
44
;CHECK: x = _MergedGlobals_x+4
 
45
;CHECK: .globl  y
 
46
;CHECK: y = _MergedGlobals_y
 
47
 
 
48
;CHECK-APPLE-IOS:.globl _x
 
49
;CHECK-APPLE-IOS: _x = __MergedGlobals_x+4
 
50
;CHECK-APPLE-IOS:.globl _y
 
51
;CHECK-APPLE-IOS: _y = __MergedGlobals_y