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 5 6 @foo = common global i32 0 7 8 define i32* @bar1() nounwind readnone { 9 entry: 10 ; EABI: movw r0, :lower16:foo 11 ; EABI-NEXT: movt r0, :upper16:foo 12 13 ; IOS: movw r0, :lower16:L_foo$non_lazy_ptr 14 ; IOS-NEXT: movt r0, :upper16:L_foo$non_lazy_ptr 15 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)) 18 19 ; IOS-STATIC: movw r0, :lower16:_foo 20 ; IOS-STATIC-NEXT: movt r0, :upper16:_foo 21 ret i32* @foo 22 } 23 24 define void @bar2(i32 %baz) nounwind { 25 entry: 26 ; EABI: movw r1, :lower16:foo 27 ; EABI-NEXT: movt r1, :upper16:foo 28 29 ; IOS: movw r1, :lower16:L_foo$non_lazy_ptr 30 ; IOS-NEXT: movt r1, :upper16:L_foo$non_lazy_ptr 31 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)) 34 35 ; IOS-STATIC: movw r1, :lower16:_foo 36 ; IOS-STATIC-NEXT: movt r1, :upper16:_foo 37 store i32 %baz, i32* @foo, align 4 38 ret void 39 } 40