1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=arm64ec-pc-windows-msvc < %s | FileCheck %s
4 @a = external dllimport global i32
5 declare dllimport void @b()
7 define ptr @dllimport_var() nounwind {
8 ; CHECK-LABEL: dllimport_var:
10 ; CHECK-NEXT: adrp x0, __imp_a
11 ; CHECK-NEXT: ldr x0, [x0, :lo12:__imp_a]
16 define ptr @dllimport_fn() nounwind {
17 ; CHECK-LABEL: dllimport_fn:
19 ; CHECK-NEXT: .globl __imp_b
20 ; CHECK-NEXT: adrp x0, __imp_aux_b
21 ; CHECK-NEXT: .globl __imp_b
22 ; CHECK-NEXT: ldr x0, [x0, :lo12:__imp_aux_b]
27 define void @dllimport_fn_call() nounwind {
28 ; CHECK-LABEL: dllimport_fn_call:
30 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
31 ; CHECK-NEXT: adrp x8, __imp_b
32 ; CHECK-NEXT: ldr x8, [x8, :lo12:__imp_b]
34 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload