mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-23 04:52:54 +02:00
1091adce40
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
33 lines
675 B
LLVM
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
|
|
}
|