summaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64/dllimport.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 10:51:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 10:51:19 +0000
commiteb11fae6d08f479c0799db45860a98af528fa6e7 (patch)
tree44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /test/CodeGen/AArch64/dllimport.ll
parentb8a2042aa938069e862750553db0e4d82d25822c (diff)
Notes
Diffstat (limited to 'test/CodeGen/AArch64/dllimport.ll')
-rw-r--r--test/CodeGen/AArch64/dllimport.ll18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/CodeGen/AArch64/dllimport.ll b/test/CodeGen/AArch64/dllimport.ll
index fad049a54cd2..281c847a39a5 100644
--- a/test/CodeGen/AArch64/dllimport.ll
+++ b/test/CodeGen/AArch64/dllimport.ll
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple aarch64-unknown-windows-msvc -filetype asm -o - %s | FileCheck %s
+; RUN: llc -mtriple aarch64-unknown-windows-msvc -filetype asm -o - %s | FileCheck %s -check-prefixes=CHECK,DAG-ISEL
+; RUN: llc -mtriple aarch64-unknown-windows-msvc -fast-isel -filetype asm -o - %s | FileCheck %s -check-prefixes=CHECK,FAST-ISEL
+; RUN: llc -mtriple aarch64-unknown-windows-msvc -O0 -filetype asm -o - %s | FileCheck %s -check-prefixes=CHECK,GLOBAL-ISEL,GLOBAL-ISEL-FALLBACK
@var = external dllimport global i32
@ext = external global i32
@@ -23,7 +25,11 @@ define i32 @get_ext() {
; CHECK-LABEL: get_ext
; CHECK: adrp x8, ext
-; CHECK: ldr w0, [x8, ext]
+; DAG-ISEL: ldr w0, [x8, ext]
+; FAST-ISEL: add x8, x8, ext
+; FAST-ISEL: ldr w0, [x8]
+; GLOBAL-ISEL-FALLBACK: add x8, x8, ext
+; GLOBAL-ISEL-FALLBACK: ldr w0, [x8]
; CHECK: ret
define i32* @get_var_pointer() {
@@ -31,8 +37,8 @@ define i32* @get_var_pointer() {
}
; CHECK-LABEL: get_var_pointer
-; CHECK: adrp x0, __imp_var
-; CHECK: ldr x0, [x0, __imp_var]
+; CHECK: adrp [[REG1:x[0-9]+]], __imp_var
+; CHECK: ldr {{x[0-9]+}}, {{\[}}[[REG1]], __imp_var]
; CHECK: ret
define i32 @call_external() {
@@ -51,4 +57,6 @@ define i32 @call_internal() {
}
; CHECK-LABEL: call_internal
-; CHECK: b internal
+; DAG-ISEL: b internal
+; FAST-ISEL: b internal
+; GLOBAL-ISEL: bl internal