1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/test/CodeGen/X86/2009-04-17-tls-fast.ll
Rafael Espindola d74132e2c5 For general dynamic TLS access we must use
leaq	foo@TLSGD(%rip), %rdi

as part of the instruction sequence. Using a register other than %rdi and then
copying it to %rdi is not valid.

llvm-svn: 69350
2009-04-17 14:35:58 +00:00

18 lines
423 B
LLVM

; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic -regalloc=local > %t
; RUN: grep {leaq foo@TLSGD(%rip), %rdi} %t
@foo = internal thread_local global i32 100
define void @f(i32 %n) nounwind {
entry:
%n_addr = alloca i32
%p = alloca i32*
%"alloca point" = bitcast i32 0 to i32
store i32 %n, i32* %n_addr
store i32* @foo, i32** %p, align 8
br label %return
return:
ret void
}