1 ; RUN: llc -mtriple thumbv7-windows -filetype asm -o - %s | FileCheck %s
3 ; ModuleID = 'dllimport.c'
5 @var = external dllimport global i32
6 @ext = external global i32
7 declare dllimport arm_aapcs_vfpcc i32 @external()
8 declare arm_aapcs_vfpcc i32 @internal()
10 define arm_aapcs_vfpcc i32 @get_var() {
11 %1 = load i32, i32* @var, align 4
15 ; CHECK-LABEL: get_var
16 ; CHECK: movw r0, :lower16:__imp_var
17 ; CHECK: movt r0, :upper16:__imp_var
22 define arm_aapcs_vfpcc i32 @get_ext() {
23 %1 = load i32, i32* @ext, align 4
27 ; CHECK-LABEL: get_ext
28 ; CHECK: movw r0, :lower16:ext
29 ; CHECK: movt r0, :upper16:ext
33 define arm_aapcs_vfpcc i32* @get_var_pointer() {
37 ; CHECK-LABEL: get_var_pointer
38 ; CHECK: movw r0, :lower16:__imp_var
39 ; CHECK: movt r0, :upper16:__imp_var
43 define arm_aapcs_vfpcc i32 @call_external() {
44 %call = tail call arm_aapcs_vfpcc i32 @external()
48 ; CHECK-LABEL: call_external
49 ; CHECK: movw r0, :lower16:__imp_external
50 ; CHECK: movt r0, :upper16:__imp_external
54 define arm_aapcs_vfpcc i32 @call_internal() {
55 %call = tail call arm_aapcs_vfpcc i32 @internal()
59 ; CHECK-LABEL: call_internal