1; RUN: llc < %s -mtriple x86_64-apple-darwin -O0 | FileCheck %s 2 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 7 8define void @foo() nounwind ssp { 9entry: 10 store i32 1, i32* @a, align 4 11 ; CHECK: movq _a@TLVP(%rip), %rdi 12 ; CHECK: callq *(%rdi) 13 ; CHECK: movl $1, (%rax) 14 15 store i32 2, i32* @b, align 4 16 ; CHECK: movq _b@TLVP(%rip), %rdi 17 ; CHECK: callq *(%rdi) 18 ; CHECK: movl $2, (%rax) 19 20 store i32 3, i32* @c, align 4 21 ; CHECK: movq _c@TLVP(%rip), %rdi 22 ; CHECK: callq *(%rdi) 23 ; CHECK: movl $3, (%rax) 24 25 store i32 4, i32* @d, align 4 26 ; CHECK: movq _d@TLVP(%rip), %rdi 27 ; CHECK: callq *(%rdi) 28 ; CHECK: movl $4, (%rax) 29 ; CHECK: popq 30 31 ret void 32} 33