1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/CodeGen/AArch64/nonlazybind.ll
Tim Northover 1091adce40 AArch64: support nonlazybind
It's almost certainly not a good idea to actually use it in most cases (there's
a pretty large code size overhead on AArch64), but we can't do those
experiments until it's supported.

llvm-svn: 300462
2017-04-17 17:27:56 +00:00

33 lines
675 B
LLVM

; RUN: llc -mtriple=aarch64-apple-ios %s -o - | FileCheck %s
define void @local() nonlazybind {
ret void
}
declare void @nonlocal() nonlazybind
define void @test_laziness() {
; CHECK-LABEL: test_laziness:
; CHECK: bl _local
; CHECK: adrp x[[TMP:[0-9]+]], _nonlocal@GOTPAGE
; CHECK: ldr [[FUNC:x[0-9]+]], [x[[TMP]], _nonlocal@GOTPAGEOFF]
; CHECK: blr [[FUNC]]
call void @local()
call void @nonlocal()
ret void
}
define void @test_laziness_tail() {
; CHECK-LABEL: test_laziness_tail:
; CHECK: adrp x[[TMP:[0-9]+]], _nonlocal@GOTPAGE
; CHECK: ldr [[FUNC:x[0-9]+]], [x[[TMP]], _nonlocal@GOTPAGEOFF]
; CHECK: br [[FUNC]]
tail call void @nonlocal()
ret void
}