blob: 18d32646e15d945bb37222b16aab142170f85614 [file] [log] [blame]
Matthias Braun7c913362017-08-01 22:20:49 +00001; RUN: llc < %s -emulated-tls -mtriple=arm-linux-androideabi \
Chih-Hung Hsieh1e859582015-07-28 16:24:05 +00002; RUN: | FileCheck %s
Matthias Braun7c913362017-08-01 22:20:49 +00003; RUN: llc < %s -emulated-tls -mtriple=arm-linux-androideabi \
Chih-Hung Hsieh1e859582015-07-28 16:24:05 +00004; RUN: -relocation-model=pic | FileCheck %s --check-prefix=PIC
5
6; Compared with tls1.ll, emulated mode should not use __aeabi_read_tp or __tls_get_addr.
7
8; CHECK-NOT: _aeabi_read_tp
9; CHECK-NOT: _tls_get_addr
10; CHECK: __emutls_get_addr
11; CHECK-NOT: __aeabi_read_tp
12; CHECK-NOT: _tls_get_addr
13
14; PIC-NOT: _aeabi_read_tp
15; PIC-NOT: _tls_get_addr
16; PIC: __emutls_get_addr
17; PIC-NOT: _aeabi_read_tp
18; PIC-NOT: _tls_get_addr
19
20@i = thread_local global i32 15 ; <i32*> [#uses=2]
21
22define i32 @f() {
23entry:
24 %tmp1 = load i32, i32* @i ; <i32> [#uses=1]
25 ret i32 %tmp1
26}
27
28define i32* @g() {
29entry:
30 ret i32* @i
31}