summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/tls14.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2009-03-13 18:37:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2009-03-13 18:37:06 +0000
commit71144973f3954ee03ffc2623539a60df227fc106 (patch)
tree00f6ad122098e911364b3c91133c3355725a9fa3 /llvm/test/CodeGen/X86/tls14.ll
parent258232fb805c9357a0fdf352e38bc7ab05ae3eaa (diff)
downloadbcm5719-llvm-71144973f3954ee03ffc2623539a60df227fc106.tar.gz
bcm5719-llvm-71144973f3954ee03ffc2623539a60df227fc106.zip
Improve sext and zext of TLS variables.
llvm-svn: 66922
Diffstat (limited to 'llvm/test/CodeGen/X86/tls14.ll')
-rw-r--r--llvm/test/CodeGen/X86/tls14.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/tls14.ll b/llvm/test/CodeGen/X86/tls14.ll
new file mode 100644
index 00000000000..d3401b65537
--- /dev/null
+++ b/llvm/test/CodeGen/X86/tls14.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu > %t
+; RUN: grep {movsbl %gs:i@NTPOFF, %eax} %t
+; RUN: grep {movzbl %gs:j@NTPOFF, %eax} %t
+
+@i = thread_local global i8 0
+@j = thread_local global i8 0
+
+define void @f() nounwind optsize {
+entry:
+ %0 = load i8* @i, align 2
+ %1 = sext i8 %0 to i32
+ tail call void @g(i32 %1) nounwind
+ %2 = load i8* @j, align 2
+ %3 = zext i8 %2 to i32
+ tail call void @h(i32 %3) nounwind
+ ret void
+}
+
+declare void @g(i32)
+
+declare void @h(i32)
OpenPOWER on IntegriCloud