| ; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=STATIC |
| ; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DYNAMIC |
| ; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC |
| ; RUN: llc < %s -mtriple=thumbv6-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC_T |
| ; RUN: llc < %s -mtriple=armv7-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC_V7 |
| ; RUN: llc < %s -mtriple=armv6-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LINUX |
| ; STATIC: ldr r0, LCPI0_0 |
| ; DYNAMIC: ldr r0, LCPI0_0 |
| ; DYNAMIC: .long L_G$non_lazy_ptr |
| ; PIC: .long L_G$non_lazy_ptr-(LPC0_0+8) |
| ; PIC_T: ldr.n r0, LCPI0_0 |
| ; PIC_T: .long L_G$non_lazy_ptr-(LPC0_0+4) |
| ; PIC_V7: movw r0, :lower16:(L_G$non_lazy_ptr-(LPC0_0+8)) |
| ; PIC_V7: movt r0, :upper16:(L_G$non_lazy_ptr-(LPC0_0+8)) |
| ; PIC_V7: ldr r0, [pc, r0] |
| ; LINUX: ldr r0, .LCPI0_0 |
| ; LINUX: ldr r1, .LCPI0_1 |
| ; LINUX: ldr r0, [r1, r0] |