summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2009-03-11 22:40:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2009-03-11 22:40:04 +0000
commit294943c99bf2049cba23736e2cb7a0dc13192e3e (patch)
treee5c8e3cc5550bbebdb899d82920f94c78a3ee812 /llvm/test
parentaabe06d92aeec2fe6c8c90dd78c3c5bce2a052ff (diff)
downloadbcm5719-llvm-294943c99bf2049cba23736e2cb7a0dc13192e3e.tar.gz
bcm5719-llvm-294943c99bf2049cba23736e2cb7a0dc13192e3e.zip
optimize i8 and i16 tls values.
llvm-svn: 66725
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/tls11.ll10
-rw-r--r--llvm/test/CodeGen/X86/tls12.ll10
2 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/tls11.ll b/llvm/test/CodeGen/X86/tls11.ll
new file mode 100644
index 00000000000..32d0a1204ca
--- /dev/null
+++ b/llvm/test/CodeGen/X86/tls11.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
+; RUN: grep {movzwl %gs:i@NTPOFF, %eax} %t
+
+@i = thread_local global i16 15
+
+define i16 @f() {
+entry:
+ %tmp1 = load i16* @i
+ ret i16 %tmp1
+}
diff --git a/llvm/test/CodeGen/X86/tls12.ll b/llvm/test/CodeGen/X86/tls12.ll
new file mode 100644
index 00000000000..c6f766d4472
--- /dev/null
+++ b/llvm/test/CodeGen/X86/tls12.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
+; RUN: grep {movzbl %gs:i@NTPOFF, %eax} %t
+
+@i = thread_local global i8 15
+
+define i8 @f() {
+entry:
+ %tmp1 = load i8* @i
+ ret i8 %tmp1
+}
OpenPOWER on IntegriCloud