summaryrefslogtreecommitdiff
path: root/test/CodeGen/CellSPU
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-10-20 21:10:27 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-10-20 21:10:27 +0000
commit30815c536baacc07e925f0aef23a5395883173dc (patch)
tree2cbcf22585e99f8a87d12d5ff94f392c0d266819 /test/CodeGen/CellSPU
parent411bd29eea3c360d5b48a18a17b5e87f5671af0e (diff)
Notes
Diffstat (limited to 'test/CodeGen/CellSPU')
-rw-r--r--test/CodeGen/CellSPU/jumptable.ll12
-rw-r--r--test/CodeGen/CellSPU/or_ops.ll13
2 files changed, 18 insertions, 7 deletions
diff --git a/test/CodeGen/CellSPU/jumptable.ll b/test/CodeGen/CellSPU/jumptable.ll
index 87376ef6ed53..66c2fdeb51fd 100644
--- a/test/CodeGen/CellSPU/jumptable.ll
+++ b/test/CodeGen/CellSPU/jumptable.ll
@@ -4,18 +4,18 @@ define i32 @test(i32 %param) {
entry:
;CHECK: ai {{\$.}}, $3, -1
;CHECK: clgti {{\$., \$.}}, 3
-;CHECK: brnz {{\$.}},.LBB0_2
- switch i32 %param, label %bb1 [
- i32 1, label %bb3
+;CHECK: brnz {{\$.}},.LBB0_
+ switch i32 %param, label %bb2 [
+ i32 1, label %bb1
i32 2, label %bb2
i32 3, label %bb3
- i32 4, label %bb1
+ i32 4, label %bb2
]
-
+;CHECK-NOT: # BB#2
bb1:
ret i32 1
bb2:
ret i32 2
bb3:
- ret i32 3
+ ret i32 %param
}
diff --git a/test/CodeGen/CellSPU/or_ops.ll b/test/CodeGen/CellSPU/or_ops.ll
index 46349b9f51d2..4f1febbad79c 100644
--- a/test/CodeGen/CellSPU/or_ops.ll
+++ b/test/CodeGen/CellSPU/or_ops.ll
@@ -1,9 +1,11 @@
; RUN: llc < %s -march=cellspu > %t1.s
; RUN: grep and %t1.s | count 2
; RUN: grep orc %t1.s | count 85
-; RUN: grep ori %t1.s | count 30
+; RUN: grep ori %t1.s | count 34
; RUN: grep orhi %t1.s | count 30
; RUN: grep orbi %t1.s | count 15
+; RUN: FileCheck %s < %t1.s
+
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"
@@ -210,6 +212,15 @@ define signext i32 @ori_i32(i32 signext %in) {
ret i32 %tmp38
}
+define i32 @ori_i32_600(i32 %in) {
+ ;600 does not fit into 'ori' immediate field
+ ;CHECK: ori_i32_600
+ ;CHECK: il
+ ;CHECK: ori
+ %tmp = or i32 %in, 600
+ ret i32 %tmp
+}
+
; ORHI instruction generation (i16 data type):
define <8 x i16> @orhi_v8i16_1(<8 x i16> %in) {
%tmp2 = or <8 x i16> %in, < i16 511, i16 511, i16 511, i16 511,