1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple thumbv7-windows-itanium -relocation-model pic -filetype asm -o - %s \ 2*9880d681SAndroid Build Coastguard Worker; RUN: | FileCheck %s -check-prefix CHECK-WIN 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple thumbv7-windows-gnu -relocation-model pic -filetype asm -o - %s \ 5*9880d681SAndroid Build Coastguard Worker; RUN: | FileCheck %s -check-prefix CHECK-GNU 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker@external = external global i8 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workerdefine arm_aapcs_vfpcc i8 @return_external() { 10*9880d681SAndroid Build Coastguard Workerentry: 11*9880d681SAndroid Build Coastguard Worker %0 = load i8, i8* @external, align 1 12*9880d681SAndroid Build Coastguard Worker ret i8 %0 13*9880d681SAndroid Build Coastguard Worker} 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker; CHECK-WIN-LABEL: return_external 16*9880d681SAndroid Build Coastguard Worker; CHECK-WIN: movw r0, :lower16:external 17*9880d681SAndroid Build Coastguard Worker; CHECK-WIN: movt r0, :upper16:external 18*9880d681SAndroid Build Coastguard Worker; CHECK-WIN: ldrb r0, [r0] 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker; CHECK-GNU-LABEL: return_external 21*9880d681SAndroid Build Coastguard Worker; CHECK-GNU: movw r0, :lower16:external 22*9880d681SAndroid Build Coastguard Worker; CHECK-GNU: movt r0, :upper16:external 23*9880d681SAndroid Build Coastguard Worker; CHECK-GNU: ldrb r0, [r0] 24