[ARM] Fixup the creation of VPT blocks
[llvm-core.git] / test / CodeGen / Thumb2 / tls2.ll
blob98ae8e6d90d9b1851b17a373bb56d1d06690be4e
1 ; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi | FileCheck %s -check-prefix=CHECK-NOT-PIC
2 ; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=CHECK-PIC
4 @i = external thread_local global i32           ; <i32*> [#uses=2]
6 define i32 @f() {
7 entry:
8 ; CHECK-NOT-PIC-LABEL: f:
9 ; CHECK-NOT-PIC: add r0, pc
10 ; CHECK-NOT-PIC: ldr r1, [r0]
11 ; CHECK-NOT-PIC: i(GOTTPOFF)
13 ; CHECK-PIC-LABEL: f:
14 ; CHECK-PIC: bl __tls_get_addr
15         %tmp1 = load i32, i32* @i               ; <i32> [#uses=1]
16         ret i32 %tmp1
19 define i32* @g() {
20 entry:
21 ; CHECK-NOT-PIC-LABEL: g:
22 ; CHECK-NOT-PIC: add r0, pc
23 ; CHECK-NOT-PIC: ldr r1, [r0]
24 ; CHECK-NOT-PIC: i(GOTTPOFF)
26 ; CHECK-PIC-LABEL: g:
27 ; CHECK-PIC: bl __tls_get_addr
28         ret i32* @i