aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-05 05:52:55 +0000
committerChris Lattner <sabre@nondot.org>2006-02-05 05:52:55 +0000
commit7ce1bbf05d1160231306e529773ef96a56d8e94e (patch)
treebbf45a0dc2252bd9a246bcca15317cce7f22120c /test/CodeGen/SPARC
parent7c90f73a1b06040d971a3dd95a491031ae6238d5 (diff)
move V8 testcases here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll12
-rw-r--r--test/CodeGen/SPARC/basictest.ll6
-rw-r--r--test/CodeGen/SPARC/ctpop.ll11
-rw-r--r--test/CodeGen/SPARC/dg.exp3
-rw-r--r--test/CodeGen/SPARC/xnor.ll14
5 files changed, 46 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll b/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll
new file mode 100644
index 0000000000..b7238ee23b
--- /dev/null
+++ b/test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=sparc
+
+void %execute_list() {
+ %tmp.33.i = div float 0.000000e+00, 0.000000e+00 ; <float> [#uses=1]
+ %tmp.37.i = mul float 0.000000e+00, %tmp.33.i ; <float> [#uses=1]
+ %tmp.42.i = add float %tmp.37.i, 0.000000e+00 ; <float> [#uses=1]
+ call void %gl_EvalCoord1f( float %tmp.42.i )
+ ret void
+}
+
+declare void %gl_EvalCoord1f( float)
+
diff --git a/test/CodeGen/SPARC/basictest.ll b/test/CodeGen/SPARC/basictest.ll
new file mode 100644
index 0000000000..274f2ce80b
--- /dev/null
+++ b/test/CodeGen/SPARC/basictest.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=sparc
+
+int %test(int %X) {
+ %tmp.1 = add int %X, 1 ; <int> [#uses=1]
+ ret int %tmp.1
+}
diff --git a/test/CodeGen/SPARC/ctpop.ll b/test/CodeGen/SPARC/ctpop.ll
new file mode 100644
index 0000000000..ffe00fcc40
--- /dev/null
+++ b/test/CodeGen/SPARC/ctpop.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | llc -march=sparc -mattr=-v9 &&
+; RUN: llvm-as < %s | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts &&
+; RUN: llvm-as < %s | llc -march=sparc -mattr=-v9 | not grep popc &&
+; RUN: llvm-as < %s | llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
+
+declare uint %llvm.ctpop.i32(uint)
+uint %test(uint %X) {
+ %Y = call uint %llvm.ctpop.i32(uint %X)
+ ret uint %Y
+}
+
diff --git a/test/CodeGen/SPARC/dg.exp b/test/CodeGen/SPARC/dg.exp
new file mode 100644
index 0000000000..e326ea721c
--- /dev/null
+++ b/test/CodeGen/SPARC/dg.exp
@@ -0,0 +1,3 @@
+load_lib llvm-dg.exp
+
+llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $objdir $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext
diff --git a/test/CodeGen/SPARC/xnor.ll b/test/CodeGen/SPARC/xnor.ll
new file mode 100644
index 0000000000..3a06a415c2
--- /dev/null
+++ b/test/CodeGen/SPARC/xnor.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=sparc &&
+; RUN: llvm-as < %s | llc -march=sparc | grep xnor | wc -l | grep 2
+
+int %test1(int %X, int %Y) {
+ %A = xor int %X, %Y
+ %B = xor int %A, -1
+ ret int %B
+}
+
+int %test2(int %X, int %Y) {
+ %A = xor int %X, -1
+ %B = xor int %A, %Y
+ ret int %B
+}