llvm/test/CodeGen/ARM/pie.ll
Rafael Espindola 1a9c272521 Add a use of shouldAssumeDSOLocal to ARM.
Now this code path knows about position independent executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 15:31:55 +00:00

19 lines
467 B
LLVM

; RUN: llc -mtriple=armv7-pc-linux-gnueabi -relocation-model=pic < %s | FileCheck %s
@foo = global i32 42
define i32* @get_foo() {
ret i32* @foo
}
; Test that we only use one load. Even that is only needed because there
; doesn't seem to be pc relative relocations for movw movt.
; CHECK: ldr r0, .LCPI0_0
; CHECK-NEXT: .L{{.*}}:
; CHECK-NEXT: add r0, pc, r0
; CHECK-NEXT: bx lr
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"PIE Level", i32 2}