1 ;; Check that we emit a $local alias for a dso_local function definition
2 ; RUN: llc -mtriple=armv7-linux-gnueabi -relocation-model=static < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,STATIC
4 ; RUN: llc -mtriple=armv7-linux-gnueabi -relocation-model=pic < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,PIC
7 define dso_local ptr @dsolocal_func() nounwind {
8 ; CHECK-LABEL: .globl dsolocal_func
9 ; CHECK-NEXT: .p2align 2
10 ; CHECK-NEXT: .type dsolocal_func,%function
11 ; CHECK-NEXT: .code 32
12 ; CHECK-NEXT: dsolocal_func:
13 ; PIC-NEXT: .Ldsolocal_func$local:
14 ; PIC-NEXT: .type .Ldsolocal_func$local,%function
15 ; CHECK-NEXT: .fnstart
16 ; CHECK-NEXT: @ %bb.0:
17 ; STATIC-NEXT: movw r0, :lower16:dsolocal_func
18 ; STATIC-NEXT: movt r0, :upper16:dsolocal_func
20 ; PIC-NEXT: ldr r0, .LCPI0_0
22 ; PIC-NEXT: add r0, pc, r0
24 ; PIC-NEXT: .p2align 2
27 ; PIC-NEXT: .long .Ldsolocal_func$local-(.LPC0_0+8)
28 ; CHECK-NEXT: .Lfunc_end0:
29 ; CHECK-NEXT: .size dsolocal_func, .Lfunc_end0-dsolocal_func
30 ; PIC-NEXT: .size .Ldsolocal_func$local, .Lfunc_end0-dsolocal_func
31 ; CHECK-NEXT: .cantunwind
33 ret ptr @dsolocal_func