summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/tls15.ll
blob: 62f3677629be3574011b4a888817a101f0a7e4b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
; RUN: grep {movl	%gs:0, %eax} %t | count 1
; RUN: grep {leal	i@NTPOFF(%eax), %ecx} %t
; RUN: grep {leal	j@NTPOFF(%eax), %eax} %t
; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu > %t2
; RUN: grep {movq	%fs:0, %rax} %t2 | count 1
; RUN: grep {leaq	i@TPOFF(%rax), %rcx} %t2
; RUN: grep {leaq	j@TPOFF(%rax), %rax} %t2

@i = thread_local global i32 0
@j = thread_local global i32 0

define void @f(i32** %a, i32** %b) {
entry:
	store i32* @i, i32** %a, align 8
	store i32* @j, i32** %b, align 8
	ret void
}
OpenPOWER on IntegriCloud