[llvm-commits] CVS: llvm/test/CodeGen/X86/tls1.ll tls2.ll
Lauro Ramos Venancio
lauro.venancio at gmail.com
Sun Apr 22 18:29:53 PDT 2007
Changes in directory llvm/test/CodeGen/X86:
tls1.ll added (r1.1)
tls2.ll added (r1.1)
---
Log message:
Add TLS tests.
---
Diffs of the changes: (+38 -0)
tls1.ll | 19 +++++++++++++++++++
tls2.ll | 19 +++++++++++++++++++
2 files changed, 38 insertions(+)
Index: llvm/test/CodeGen/X86/tls1.ll
diff -c /dev/null llvm/test/CodeGen/X86/tls1.ll:1.1
*** /dev/null Sun Apr 22 20:29:45 2007
--- llvm/test/CodeGen/X86/tls1.ll Sun Apr 22 20:29:35 2007
***************
*** 0 ****
--- 1,19 ----
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {movl %gs:i at NTPOFF, %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {leal i at NTPOFF(%eax), %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic | \
+ ; RUN: grep {leal i at TLSGD(,%ebx,1), %eax}
+
+ @i = thread_local global i32 15 ; <i32*> [#uses=2]
+
+ define i32 @f() {
+ entry:
+ %tmp1 = load i32* @i ; <i32> [#uses=1]
+ ret i32 %tmp1
+ }
+
+ define i32* @g() {
+ entry:
+ ret i32* @i
+ }
Index: llvm/test/CodeGen/X86/tls2.ll
diff -c /dev/null llvm/test/CodeGen/X86/tls2.ll:1.1
*** /dev/null Sun Apr 22 20:29:53 2007
--- llvm/test/CodeGen/X86/tls2.ll Sun Apr 22 20:29:35 2007
***************
*** 0 ****
--- 1,19 ----
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {movl %gs:(%eax), %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {addl i at INDNTPOFF, %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic | \
+ ; RUN: grep {leal i at TLSGD(,%ebx,1), %eax}
+
+ @i = external thread_local global i32 ; <i32*> [#uses=2]
+
+ define i32 @f() {
+ entry:
+ %tmp1 = load i32* @i ; <i32> [#uses=1]
+ ret i32 %tmp1
+ }
+
+ define i32* @g() {
+ entry:
+ ret i32* @i
+ }
More information about the llvm-commits
mailing list