Matthias Braun | 7c91336 | 2017-08-01 22:20:49 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -emulated-tls -mtriple=arm-linux-androideabi \ |
Chih-Hung Hsieh | 1e85958 | 2015-07-28 16:24:05 +0000 | [diff] [blame] | 2 | ; RUN: | FileCheck %s |
Matthias Braun | 7c91336 | 2017-08-01 22:20:49 +0000 | [diff] [blame] | 3 | ; RUN: llc < %s -emulated-tls -mtriple=arm-linux-androideabi \ |
Chih-Hung Hsieh | 1e85958 | 2015-07-28 16:24:05 +0000 | [diff] [blame] | 4 | ; 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 | |
| 22 | define i32 @f() { |
| 23 | entry: |
| 24 | %tmp1 = load i32, i32* @i ; <i32> [#uses=1] |
| 25 | ret i32 %tmp1 |
| 26 | } |
| 27 | |
| 28 | define i32* @g() { |
| 29 | entry: |
| 30 | ret i32* @i |
| 31 | } |