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
6 @i = thread_local global i32 15
8 define i32 @f() nounwind {
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