1 ; RUN: llc < %s -mtriple x86_64-apple-darwin -O0 | FileCheck %s
3 @b = thread_local global i32 5, align 4
4 @a = thread_local global i32 0, align 4
5 @c = internal thread_local global i32 0, align 4
6 @d = internal thread_local global i32 5, align 4
8 define void @foo() nounwind ssp {
10 store i32 1, ptr @a, align 4
11 ; CHECK: movq _a@TLVP(%rip), %rdi
12 ; CHECK: callq *(%rdi)
13 ; CHECK: movl $1, (%rax)
15 store i32 2, ptr @b, align 4
16 ; CHECK: movq _b@TLVP(%rip), %rdi
17 ; CHECK: callq *(%rdi)
18 ; CHECK: movl $2, (%rax)
20 store i32 3, ptr @c, align 4
21 ; CHECK: movq _c@TLVP(%rip), %rdi
22 ; CHECK: callq *(%rdi)
23 ; CHECK: movl $3, (%rax)
25 store i32 4, ptr @d, align 4
26 ; CHECK: movq _d@TLVP(%rip), %rdi
27 ; CHECK: callq *(%rdi)
28 ; CHECK: movl $4, (%rax)