Add support for implicit TLS model used with MS VC runtime.
[oota-llvm.git] / test / CodeGen / X86 / tls1.ll
1 ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu | FileCheck -check-prefix=X32_LINUX %s
2 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu | FileCheck -check-prefix=X64_LINUX %s
3 ; RUN: llc < %s -march=x86 -mtriple=x86-pc-win32 | FileCheck -check-prefix=X32_WIN %s
4 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-pc-win32 | FileCheck -check-prefix=X64_WIN %s
5
6 @i = thread_local global i32 15
7
8 define i32 @f() nounwind {
9 entry:
10         %tmp1 = load i32* @i
11         ret i32 %tmp1
12 }
13 ; X32_LINUX: movl %gs:i@NTPOFF, %eax
14 ; X64_LINUX: movl %fs:i@TPOFF, %eax
15 ; X32_WIN: movl __tls_index, %eax
16 ; X32_WIN: movl %fs:__tls_array, %ecx
17 ; X32_WIN: movl _i@SECREL(%eax), %eax
18 ; X64_WIN: movl _tls_index(%rip), %eax
19 ; X64_WIN: movabsq $i@SECREL, %rcx
20