1; REQUIRES: x86 2; RUN: llvm-as -o %t %s 3; RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t 4; RUN: llvm-objdump -d %t.exe | FileCheck %s 5 6target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32" 7target triple = "i686-pc-windows-msvc" 8 9@foo = thread_local global i8 0 10 11module asm "__tls_index = 1" 12module asm "__tls_array = 2" 13 14define i8* @main() { 15 ; CHECK: movl 1, %eax 16 ; CHECK: movl %fs:2, %ecx 17 ; CHECK: movl (%ecx,%eax,4), %eax 18 ; CHECK: leal (%eax), %eax 19 ret i8* @foo 20} 21