summaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/AArch64')
-rw-r--r--test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll16
-rw-r--r--test/CodeGen/AArch64/arm64-abi.ll4
-rw-r--r--test/CodeGen/AArch64/nonlazybind.ll40
3 files changed, 57 insertions, 3 deletions
diff --git a/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll b/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
index e40199d82c9d..71ea9d54f647 100644
--- a/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
+++ b/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
@@ -154,3 +154,19 @@ continue:
define fp128 @test_quad_dump() {
ret fp128 0xL00000000000000004000000000000000
}
+
+; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to legalize instruction: %vreg0<def>(p0) = G_EXTRACT_VECTOR_ELT %vreg1, %vreg2; (in function: vector_of_pointers_extractelement)
+; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for vector_of_pointers_extractelement
+; FALLBACK-WITH-REPORT-OUT-LABEL: vector_of_pointers_extractelement:
+define void @vector_of_pointers_extractelement() {
+ %dummy = extractelement <2 x i16*> undef, i32 0
+ ret void
+}
+
+; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to legalize instruction: %vreg0<def>(<2 x p0>) = G_INSERT_VECTOR_ELT %vreg1, %vreg2, %vreg3; (in function: vector_of_pointers_insertelement
+; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for vector_of_pointers_insertelement
+; FALLBACK-WITH-REPORT-OUT-LABEL: vector_of_pointers_insertelement:
+define void @vector_of_pointers_insertelement() {
+ %dummy = insertelement <2 x i16*> undef, i16* null, i32 0
+ ret void
+}
diff --git a/test/CodeGen/AArch64/arm64-abi.ll b/test/CodeGen/AArch64/arm64-abi.ll
index 6cf0ab35b9b5..5be84b7d493b 100644
--- a/test/CodeGen/AArch64/arm64-abi.ll
+++ b/test/CodeGen/AArch64/arm64-abi.ll
@@ -43,9 +43,7 @@ entry:
; CHECK-LABEL: i8i16caller
; The 8th, 9th, 10th and 11th arguments are passed at sp, sp+2, sp+4, sp+5.
; They are i8, i16, i8 and i8.
-; CHECK-DAG: strb {{w[0-9]+}}, [sp, #5]
-; CHECK-DAG: strb {{w[0-9]+}}, [sp, #4]
-; CHECK-DAG: strh {{w[0-9]+}}, [sp, #2]
+; CHECK-DAG: stur {{w[0-9]+}}, [sp, #2]
; CHECK-DAG: strb {{w[0-9]+}}, [sp]
; CHECK: bl
; FAST-LABEL: i8i16caller
diff --git a/test/CodeGen/AArch64/nonlazybind.ll b/test/CodeGen/AArch64/nonlazybind.ll
new file mode 100644
index 000000000000..4355d45fe84d
--- /dev/null
+++ b/test/CodeGen/AArch64/nonlazybind.ll
@@ -0,0 +1,40 @@
+; 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
+}