aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-07 23:56:42 +0000
committerChris Lattner <sabre@nondot.org>2009-08-07 23:56:42 +0000
commiteed46575942b5885e4cbb433ebba5c70c413ec44 (patch)
tree444b85ae781e4ae855a9d1a7563e284aebac9e2c
parent9e699cc72639f25b20e73f51ab06ab7a0884ea62 (diff)
downloadexternal_llvm-eed46575942b5885e4cbb433ebba5c70c413ec44.zip
external_llvm-eed46575942b5885e4cbb433ebba5c70c413ec44.tar.gz
external_llvm-eed46575942b5885e4cbb433ebba5c70c413ec44.tar.bz2
merge a bunch of tests together into one, convert to filecheck which
is more tolerant of whitespace differences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78439 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/2009-04-17-tls-fast.ll17
-rw-r--r--test/CodeGen/X86/tls1-pic.ll67
-rw-r--r--test/CodeGen/X86/tls2-pic.ll13
-rw-r--r--test/CodeGen/X86/tls3-pic.ll14
-rw-r--r--test/CodeGen/X86/tls4-pic.ll13
5 files changed, 60 insertions, 64 deletions
diff --git a/test/CodeGen/X86/2009-04-17-tls-fast.ll b/test/CodeGen/X86/2009-04-17-tls-fast.ll
deleted file mode 100644
index 6e9485c..0000000
--- a/test/CodeGen/X86/2009-04-17-tls-fast.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic -regalloc=local > %t
-; RUN: grep {leaq foo@TLSGD(%rip), %rdi} %t
-
-@foo = internal thread_local global i32 100
-
-define void @f(i32 %n) nounwind {
-entry:
- %n_addr = alloca i32
- %p = alloca i32*
- %"alloca point" = bitcast i32 0 to i32
- store i32 %n, i32* %n_addr
- store i32* @foo, i32** %p, align 8
- br label %return
-
-return:
- ret void
-}
diff --git a/test/CodeGen/X86/tls1-pic.ll b/test/CodeGen/X86/tls1-pic.ll
index 8f44357..aa3d808 100644
--- a/test/CodeGen/X86/tls1-pic.ll
+++ b/test/CodeGen/X86/tls1-pic.ll
@@ -1,14 +1,67 @@
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic > %t
-; RUN: grep {leal i@TLSGD(,%ebx), %eax} %t
-; RUN: grep {call ___tls_get_addr@PLT} %t
-; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic > %t2
-; RUN: grep {leaq i@TLSGD(%rip), %rdi} %t2
-; RUN: grep {call __tls_get_addr@PLT} %t2
+; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X32 %s
+; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck -check-prefix=X64 %s
@i = thread_local global i32 15
-define i32 @f() {
+define i32 @f1() {
entry:
%tmp1 = load i32* @i
ret i32 %tmp1
}
+
+; X32: f1:
+; X32: leal i@TLSGD(,%ebx), %eax
+; X32: call ___tls_get_addr@PLT
+
+; X64: f1:
+; X64: leaq i@TLSGD(%rip), %rdi
+; X64: call __tls_get_addr@PLT
+
+
+@i2 = external thread_local global i32
+
+define i32* @f2() {
+entry:
+ ret i32* @i
+}
+
+; X32: f2:
+; X32: leal i@TLSGD(,%ebx), %eax
+; X32: call ___tls_get_addr@PLT
+
+; X64: f2:
+; X64: leaq i@TLSGD(%rip), %rdi
+; X64: call __tls_get_addr@PLT
+
+
+
+define i32 @f3() {
+entry:
+ %tmp1 = load i32* @i ; <i32> [#uses=1]
+ ret i32 %tmp1
+}
+
+; X32: f3:
+; X32: leal i@TLSGD(,%ebx), %eax
+; X32: call ___tls_get_addr@PLT
+
+; X64: f3:
+; X64: leaq i@TLSGD(%rip), %rdi
+; X64: call __tls_get_addr@PLT
+
+
+define i32* @f4() nounwind {
+entry:
+ ret i32* @i
+}
+
+; X32: f4:
+; X32: leal i@TLSGD(,%ebx), %eax
+; X32: call ___tls_get_addr@PLT
+
+; X64: f4:
+; X64: leaq i@TLSGD(%rip), %rdi
+; X64: call __tls_get_addr@PLT
+
+
+
diff --git a/test/CodeGen/X86/tls2-pic.ll b/test/CodeGen/X86/tls2-pic.ll
deleted file mode 100644
index f1492f4..0000000
--- a/test/CodeGen/X86/tls2-pic.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic > %t
-; RUN: grep {leal i@TLSGD(,%ebx), %eax} %t
-; RUN: grep {call ___tls_get_addr@PLT} %t
-; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic > %t2
-; RUN: grep {leaq i@TLSGD(%rip), %rdi} %t2
-; RUN: grep {call __tls_get_addr@PLT} %t2
-
-@i = thread_local global i32 15
-
-define i32* @f() nounwind {
-entry:
- ret i32* @i
-}
diff --git a/test/CodeGen/X86/tls3-pic.ll b/test/CodeGen/X86/tls3-pic.ll
deleted file mode 100644
index 27c24da..0000000
--- a/test/CodeGen/X86/tls3-pic.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic > %t
-; RUN: grep {leal i@TLSGD(,%ebx), %eax} %t
-; RUN: grep {call ___tls_get_addr@PLT} %t
-; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic > %t2
-; RUN: grep {leaq i@TLSGD(%rip), %rdi} %t2
-; RUN: grep {call __tls_get_addr@PLT} %t2
-
-@i = external thread_local global i32 ; <i32*> [#uses=2]
-
-define i32 @f() {
-entry:
- %tmp1 = load i32* @i ; <i32> [#uses=1]
- ret i32 %tmp1
-}
diff --git a/test/CodeGen/X86/tls4-pic.ll b/test/CodeGen/X86/tls4-pic.ll
deleted file mode 100644
index 6501054..0000000
--- a/test/CodeGen/X86/tls4-pic.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic > %t
-; RUN: grep {leal i@TLSGD(,%ebx), %eax} %t
-; RUN: grep {call ___tls_get_addr@PLT} %t
-; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic > %t2
-; RUN: grep {leaq i@TLSGD(%rip), %rdi} %t2
-; RUN: grep {call __tls_get_addr@PLT} %t2
-
-@i = external thread_local global i32 ; <i32*> [#uses=2]
-
-define i32* @f() {
-entry:
- ret i32* @i
-}