1 ; RUN: llc -mtriple=aarch64-apple-ios %s -o - -aarch64-enable-nonlazybind | FileCheck %s
2 ; RUN: llc -mtriple=aarch64-apple-ios %s -o - | FileCheck %s --check-prefix=CHECK-NORMAL
4 define void @local() nonlazybind {
8 declare void @nonlocal() nonlazybind
10 define void @test_laziness() {
11 ; CHECK-LABEL: test_laziness:
15 ; CHECK: adrp x[[TMP:[0-9]+]], _nonlocal@GOTPAGE
16 ; CHECK: ldr [[FUNC:x[0-9]+]], [x[[TMP]], _nonlocal@GOTPAGEOFF]
19 ; CHECK-NORMAL-LABEL: test_laziness:
20 ; CHECK-NORMAL: bl _local
21 ; CHECK-NORMAL: bl _nonlocal
28 define void @test_laziness_tail() {
29 ; CHECK-LABEL: test_laziness_tail:
31 ; CHECK: adrp x[[TMP:[0-9]+]], _nonlocal@GOTPAGE
32 ; CHECK: ldr [[FUNC:x[0-9]+]], [x[[TMP]], _nonlocal@GOTPAGEOFF]
35 ; CHECK-NORMAL-LABEL: test_laziness_tail:
36 ; CHECK-NORMAL: b _nonlocal
38 tail call void @nonlocal()