2016-08-01 13:56:57 +08:00
|
|
|
; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-enable-global-merge -o - | FileCheck %s
|
|
|
|
; RUN: llc %s -mtriple=aarch64-none-linux-gnu -aarch64-enable-global-merge -global-merge-on-external -o - | FileCheck %s
|
2014-06-14 06:57:59 +08:00
|
|
|
|
2016-08-01 13:56:57 +08:00
|
|
|
; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-enable-global-merge -o - | FileCheck %s
|
|
|
|
; RUN: llc %s -mtriple=aarch64-linux-gnuabi -aarch64-enable-global-merge -global-merge-on-external -o - | FileCheck %s
|
2014-06-14 06:57:59 +08:00
|
|
|
|
2016-08-01 13:56:57 +08:00
|
|
|
; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-enable-global-merge -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS
|
|
|
|
; RUN: llc %s -mtriple=aarch64-apple-ios -aarch64-enable-global-merge -global-merge-on-external -o - | FileCheck %s --check-prefix=CHECK-APPLE-IOS
|
2014-06-14 06:57:59 +08:00
|
|
|
|
|
|
|
@m = internal global i32 0, align 4
|
|
|
|
@n = internal global i32 0, align 4
|
|
|
|
|
|
|
|
define void @f1(i32 %a1, i32 %a2) {
|
2014-12-03 07:53:43 +08:00
|
|
|
;CHECK-APPLE-IOS-NOT: adrp
|
2016-11-12 01:50:09 +08:00
|
|
|
;CHECK-APPLE-IOS: adrp x8, __MergedGlobals@PAGE
|
2014-06-14 06:57:59 +08:00
|
|
|
;CHECK-APPLE-IOS-NOT: adrp
|
2016-11-12 01:50:09 +08:00
|
|
|
;CHECK-APPLE-IOS: add x8, x8, __MergedGlobals@PAGEOFF
|
2014-06-14 06:57:59 +08:00
|
|
|
store i32 %a1, i32* @m, align 4
|
|
|
|
store i32 %a2, i32* @n, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-08-11 23:48:04 +08:00
|
|
|
;CHECK: .type .L_MergedGlobals,@object // @_MergedGlobals
|
|
|
|
;CHECK: .local .L_MergedGlobals
|
2018-06-06 22:48:32 +08:00
|
|
|
;CHECK: .comm .L_MergedGlobals,8,4
|
2018-03-28 00:44:41 +08:00
|
|
|
;CHECK: .set m, .L_MergedGlobals
|
|
|
|
;CHECK: .set n, .L_MergedGlobals+4
|
2014-06-14 06:57:59 +08:00
|
|
|
|
2018-06-06 22:48:32 +08:00
|
|
|
;CHECK-APPLE-IOS: .zerofill __DATA,__bss,__MergedGlobals,8,2 ; @_MergedGlobals
|
2018-03-28 00:44:41 +08:00
|
|
|
;CHECK-APPLE-IOS-NOT: .set _m, l__MergedGlobals
|
|
|
|
;CHECK-APPLE-IOS-NOT: .set _n, l__MergedGlobals+4
|