Refactor TLS code and add some tests. The tests and expected results are:
[oota-llvm.git] / test / CodeGen / X86 / tls9.ll
1 ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
2 ; RUN: grep {movl       %gs:i@NTPOFF, %eax} %t
3
4 @i = external hidden thread_local global i32
5
6 define i32 @f() {
7 entry:
8         %tmp1 = load i32* @i
9         ret i32 %tmp1
10 }