From 9a58023c6ce1e77447a21d07a3de4c1ac98a3d24 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 27 Feb 2009 13:37:18 +0000 Subject: Refactor TLS code and add some tests. The tests and expected results are: pic | declaration | linkage | visibility | !pic | declaration | external | default | tls1.ll tls2.ll | local exec pic | declaration | external | default | tls1-pic.ll tls2-pic.ll | general dynamic !pic | !declaration | external | default | tls3.ll tls4.ll | initial exec pic | !declaration | external | default | tls3-pic.ll tls4-pic.ll | general dynamic !pic | declaration | external | hidden | tls7.ll tls8.ll | local exec pic | declaration | external | hidden | X | local dynamic !pic | !declaration | external | hidden | tls9.ll tls10.ll | local exec pic | !declaration | external | hidden | X | local dynamic !pic | declaration | internal | default | tls5.ll tls6.ll | local exec pic | declaration | internal | default | X | local dynamic The ones marked with an X have not been implemented since local dynamic is not implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65632 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/tls1.ll | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'test/CodeGen/X86/tls1.ll') diff --git a/test/CodeGen/X86/tls1.ll b/test/CodeGen/X86/tls1.ll index c402503..ccff718 100644 --- a/test/CodeGen/X86/tls1.ll +++ b/test/CodeGen/X86/tls1.ll @@ -1,19 +1,10 @@ -; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \ -; RUN: grep {movl %gs:i@NTPOFF, %eax} -; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \ -; RUN: grep {leal i@NTPOFF(%eax), %eax} -; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic | \ -; RUN: grep {leal i@TLSGD(,%ebx,1), %eax} +; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t +; RUN: grep {movl %gs:i@NTPOFF, %eax} %t -@i = thread_local global i32 15 ; [#uses=2] +@i = thread_local global i32 15 define i32 @f() { entry: - %tmp1 = load i32* @i ; [#uses=1] + %tmp1 = load i32* @i ret i32 %tmp1 } - -define i32* @g() { -entry: - ret i32* @i -} -- cgit v1.1