1 ; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X32 %s
2 ; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X64 %s
4 @i = thread_local global i32 15
13 ; X32: leal i@TLSGD(,%ebx), %eax
14 ; X32: call ___tls_get_addr@PLT
17 ; X64: leaq i@TLSGD(%rip), %rdi
18 ; X64: call __tls_get_addr@PLT
21 @i2 = external thread_local global i32
29 ; X32: leal i@TLSGD(,%ebx), %eax
30 ; X32: call ___tls_get_addr@PLT
33 ; X64: leaq i@TLSGD(%rip), %rdi
34 ; X64: call __tls_get_addr@PLT
40 %tmp1 = load i32* @i ; <i32> [#uses=1]
45 ; X32: leal i@TLSGD(,%ebx), %eax
46 ; X32: call ___tls_get_addr@PLT
49 ; X64: leaq i@TLSGD(%rip), %rdi
50 ; X64: call __tls_get_addr@PLT
53 define i32* @f4() nounwind {
59 ; X32: leal i@TLSGD(,%ebx), %eax
60 ; X32: call ___tls_get_addr@PLT
63 ; X64: leaq i@TLSGD(%rip), %rdi
64 ; X64: call __tls_get_addr@PLT