1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/CodeGen/ARM/fast-isel-pie.ll
Rafael Espindola 5a790c1a6d Use shouldAssumeDSOLocal.
With this ARM fast isel knows that PIE variable are not preemptable.

llvm-svn: 273169
2016-06-20 17:45:33 +00:00

20 lines
448 B
LLVM

; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=pic -mtriple=armv7-pc-linux-gnueabi | FileCheck %s
@var = global i32 42
define i32* @foo() {
; CHECK: foo:
; CHECK: ldr r0, .L[[POOL:.*]]
; CHECK-NEXT: .L[[ADDR:.*]]:
; CHECK-NEXT: add r0, pc, r0
; CHECK-NEXT: bx lr
; CHECK: .L[[POOL]]:
; CHECK-NEXT: .long var-(.L[[ADDR]]+8)
ret i32* @var
}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"PIE Level", i32 2}