mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
1a9c272521
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
19 lines
467 B
LLVM
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}
|