summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/tls7.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2009-02-27 13:37:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2009-02-27 13:37:18 +0000
commit000421eade9a685bf67c9e80c1744fab4e3b04ec (patch)
tree61b0c1cb7f20a2e367f4fe2407229b9f0fe1c43e /llvm/test/CodeGen/X86/tls7.ll
parentb4b608c617fce281ed0b871fb1ef4a2e5e8d7166 (diff)
downloadbcm5719-llvm-000421eade9a685bf67c9e80c1744fab4e3b04ec.tar.gz
bcm5719-llvm-000421eade9a685bf67c9e80c1744fab4e3b04ec.zip
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. llvm-svn: 65632
Diffstat (limited to 'llvm/test/CodeGen/X86/tls7.ll')
-rw-r--r--llvm/test/CodeGen/X86/tls7.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/tls7.ll b/llvm/test/CodeGen/X86/tls7.ll
new file mode 100644
index 00000000000..eafa5c2c246
--- /dev/null
+++ b/llvm/test/CodeGen/X86/tls7.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
+; RUN: grep {movl %gs:i@NTPOFF, %eax} %t
+
+@i = hidden thread_local global i32 15
+
+define i32 @f() {
+entry:
+ %tmp1 = load i32* @i
+ ret i32 %tmp1
+}
OpenPOWER on IntegriCloud