1 ; RUN: llc < %s -mtriple=thumbv7-w64-mingw32 | FileCheck %s
3 @var = external local_unnamed_addr global i32, align 4
4 @dsolocalvar = external dso_local local_unnamed_addr global i32, align 4
5 @localvar = dso_local local_unnamed_addr global i32 0, align 4
6 @localcommon = common dso_local local_unnamed_addr global i32 0, align 4
7 @extvar = external dllimport local_unnamed_addr global i32, align 4
9 define dso_local i32 @getVar() {
10 ; CHECK-LABEL: getVar:
11 ; CHECK: movw r0, :lower16:.refptr.var
12 ; CHECK: movt r0, :upper16:.refptr.var
17 %0 = load i32, i32* @var, align 4
21 define dso_local i32 @getDsoLocalVar() {
22 ; CHECK-LABEL: getDsoLocalVar:
23 ; CHECK: movw r0, :lower16:dsolocalvar
24 ; CHECK: movt r0, :upper16:dsolocalvar
28 %0 = load i32, i32* @dsolocalvar, align 4
32 define dso_local i32 @getLocalVar() {
33 ; CHECK-LABEL: getLocalVar:
34 ; CHECK: movw r0, :lower16:localvar
35 ; CHECK: movt r0, :upper16:localvar
39 %0 = load i32, i32* @localvar, align 4
43 define dso_local i32 @getLocalCommon() {
44 ; CHECK-LABEL: getLocalCommon:
45 ; CHECK: movw r0, :lower16:localcommon
46 ; CHECK: movt r0, :upper16:localcommon
50 %0 = load i32, i32* @localcommon, align 4
54 define dso_local i32 @getExtVar() {
55 ; CHECK-LABEL: getExtVar:
56 ; CHECK: movw r0, :lower16:__imp_extvar
57 ; CHECK: movt r0, :upper16:__imp_extvar
62 %0 = load i32, i32* @extvar, align 4
66 define dso_local void @callFunc() {
67 ; CHECK-LABEL: callFunc:
70 tail call void @otherFunc()
74 declare dso_local void @otherFunc()
76 ; CHECK: .section .rdata$.refptr.var,"dr",discard,.refptr.var
77 ; CHECK: .globl .refptr.var