1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/CodeGen/ARM/pie.ll
Rafael Espindola 95d3b4d586 Add a use of shouldAssumeDSOLocal to ARM.
Now this code path knows about position independent executables.

llvm-svn: 271290
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}