1 ; RUN: llc < %s -verify-machineinstrs -mtriple=armv7-eabi | FileCheck %s -check-prefix=EABI
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=armv7-apple-ios -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=IOS
3 ; RUN: llc < %s -verify-machineinstrs -mtriple=armv7-apple-ios -relocation-model=pic | FileCheck %s -check-prefix=IOS-PIC
4 ; RUN: llc < %s -verify-machineinstrs -mtriple=armv7-apple-ios -relocation-model=static | FileCheck %s -check-prefix=IOS-STATIC
6 @foo = common global i32 0
8 define i32* @bar1() nounwind readnone {
10 ; EABI: movw r0, :lower16:foo
11 ; EABI-NEXT: movt r0, :upper16:foo
13 ; IOS: movw r0, :lower16:L_foo$non_lazy_ptr
14 ; IOS-NEXT: movt r0, :upper16:L_foo$non_lazy_ptr
16 ; IOS-PIC: movw r0, :lower16:(L_foo$non_lazy_ptr-(LPC0_0+8))
17 ; IOS-PIC-NEXT: movt r0, :upper16:(L_foo$non_lazy_ptr-(LPC0_0+8))
19 ; IOS-STATIC: movw r0, :lower16:_foo
20 ; IOS-STATIC-NEXT: movt r0, :upper16:_foo
24 define void @bar2(i32 %baz) nounwind {
26 ; EABI: movw r1, :lower16:foo
27 ; EABI-NEXT: movt r1, :upper16:foo
29 ; IOS: movw r1, :lower16:L_foo$non_lazy_ptr
30 ; IOS-NEXT: movt r1, :upper16:L_foo$non_lazy_ptr
32 ; IOS-PIC: movw r1, :lower16:(L_foo$non_lazy_ptr-(LPC1_0+8))
33 ; IOS-PIC-NEXT: movt r1, :upper16:(L_foo$non_lazy_ptr-(LPC1_0+8))
35 ; IOS-STATIC: movw r1, :lower16:_foo
36 ; IOS-STATIC-NEXT: movt r1, :upper16:_foo
37 store i32 %baz, i32* @foo, align 4