[llvm-commits] CVS: llvm/test/CodeGen/ARM/tls1.ll tls2.ll

Lauro Ramos Venancio lauro.venancio at gmail.com
Fri Apr 27 14:09:07 PDT 2007



Changes in directory llvm/test/CodeGen/ARM:

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/ARM/tls1.ll
diff -c /dev/null llvm/test/CodeGen/ARM/tls1.ll:1.1
*** /dev/null	Fri Apr 27 16:08:58 2007
--- llvm/test/CodeGen/ARM/tls1.ll	Fri Apr 27 16:08:48 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/ARM/tls2.ll
diff -c /dev/null llvm/test/CodeGen/ARM/tls2.ll:1.1
*** /dev/null	Fri Apr 27 16:09:07 2007
--- llvm/test/CodeGen/ARM/tls2.ll	Fri Apr 27 16:08:48 2007
***************
*** 0 ****
--- 1,19 ----
+ ; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi | \
+ ; RUN:     grep {i(gottpoff)}
+ ; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi | \
+ ; RUN:     grep {ldr r., \[pc, r.\]}
+ ; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi \
+ ; RUN:     -relocation-model=pic | grep {__tls_get_addr}
+ 
+ @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