mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
754e0805e4
It's basically a terrible idea anyway but objc_msgSend gets emitted like that. We can decide on a better way to deal with it in the unlikely event that anyone actually uses it. llvm-svn: 300474
41 lines
956 B
LLVM
41 lines
956 B
LLVM
; RUN: llc -mtriple=aarch64-apple-ios %s -o - -aarch64-enable-nonlazybind | FileCheck %s
|
|
; RUN: llc -mtriple=aarch64-apple-ios %s -o - | FileCheck %s --check-prefix=CHECK-NORMAL
|
|
|
|
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]]
|
|
|
|
; CHECK-NORMAL-LABEL: test_laziness:
|
|
; CHECK-NORMAL: bl _local
|
|
; CHEKC-NORMAL: bl _nonlocal
|
|
|
|
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]]
|
|
|
|
; CHECK-NORMAL-LABEL: test_laziness_tail:
|
|
; CHECK-NORMAL: b _nonlocal
|
|
|
|
tail call void @nonlocal()
|
|
ret void
|
|
}
|