1 ; RUN: llc < %s -emulated-tls -mtriple=aarch64-linux-android -relocation-model=pic \
2 ; RUN: | FileCheck -check-prefix=ARM_64 %s
3 ; RUN: llc < %s -emulated-tls -mtriple=aarch64-linux-android -relocation-model=pic -O3 \
4 ; RUN: | FileCheck -check-prefix=ARM_64 %s
5 ; RUN: llc < %s -emulated-tls -mtriple=aarch64-linux-android -O3 \
6 ; RUN: | FileCheck -check-prefix=ARM_64 %s
8 ; Make sure that TLS symbols are emitted in expected order.
10 @external_x = external thread_local global i32, align 8
11 @external_y = thread_local global i8 7, align 2
12 @internal_y = internal thread_local global i64 9, align 16
14 define i32* @get_external_x() {
19 define i8* @get_external_y() {
24 define i64* @get_internal_y() {
29 ; ARM_64-LABEL: get_external_x:
30 ; ARM_64: __emutls_v.external_x
31 ; ARM_64: __emutls_get_address
32 ; ARM_64-LABEL: get_external_y:
33 ; ARM_64: __emutls_v.external_y
34 ; ARM_64: __emutls_get_address
35 ; ARM_64-LABEL: get_internal_y:
36 ; ARM_64: __emutls_v.internal_y
37 ; ARM_64: __emutls_get_address
38 ; ARM_64-NOT: __emutls_t.external_x
39 ; ARM_64-NOT: __emutls_v.external_x:
41 ; ARM_64-LABEL: __emutls_v.external_y:
42 ; ARM_64-NEXT: .xword 1
43 ; ARM_64-NEXT: .xword 2
44 ; ARM_64-NEXT: .xword 0
45 ; ARM_64-NEXT: .xword __emutls_t.external_y
46 ; ARM_64-NOT: __emutls_v.external_x:
47 ; ARM_64: .section .rodata,
48 ; ARM_64-LABEL: __emutls_t.external_y:
49 ; ARM_64-NEXT: .byte 7
50 ; ARM_64: .section .data.rel.local
52 ; ARM_64-LABEL: __emutls_v.internal_y:
53 ; ARM_64-NEXT: .xword 8
54 ; ARM_64-NEXT: .xword 16
55 ; ARM_64-NEXT: .xword 0
56 ; ARM_64-NEXT: .xword __emutls_t.internal_y
57 ; ARM_64: .section .rodata,
58 ; ARM_64-LABEL: __emutls_t.internal_y:
59 ; ARM_64-NEXT: .xword 9