summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorScott Michel <scottm@aero.org>2009-01-05 01:35:22 +0000
committerScott Michel <scottm@aero.org>2009-01-05 01:35:22 +0000
commitf87d41d8b9f8cd8b1095dfe92c58ca4323720c0f (patch)
tree12b21f6b102011845a24b7c5d9b06064d344bd94 /llvm
parenta6642404761d1b73854d999a557a7d92a4767963 (diff)
downloadbcm5719-llvm-f87d41d8b9f8cd8b1095dfe92c58ca4323720c0f.tar.gz
bcm5719-llvm-f87d41d8b9f8cd8b1095dfe92c58ca4323720c0f.zip
CellSPU:
- Add an 8-bit operation test, which doesn't do much at this point. llvm-svn: 61665
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/CodeGen/CellSPU/i8ops.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/CellSPU/i8ops.ll b/llvm/test/CodeGen/CellSPU/i8ops.ll
new file mode 100644
index 00000000000..23a036e3744
--- /dev/null
+++ b/llvm/test/CodeGen/CellSPU/i8ops.ll
@@ -0,0 +1,25 @@
+; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
+
+; ModuleID = 'i8ops.bc'
+target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
+target triple = "spu"
+
+define i8 @add_i8(i8 %a, i8 %b) nounwind {
+ %1 = add i8 %a, %b
+ ret i8 %1
+}
+
+define i8 @add_i8_imm(i8 %a, i8 %b) nounwind {
+ %1 = add i8 %a, 15
+ ret i8 %1
+}
+
+define i8 @sub_i8(i8 %a, i8 %b) nounwind {
+ %1 = sub i8 %a, %b
+ ret i8 %1
+}
+
+define i8 @sub_i8_imm(i8 %a, i8 %b) nounwind {
+ %1 = sub i8 %a, 15
+ ret i8 %1
+}
OpenPOWER on IntegriCloud