aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKalle Raiskila <kalle.raiskila@nokia.com>2010-08-04 13:59:48 +0000
committerKalle Raiskila <kalle.raiskila@nokia.com>2010-08-04 13:59:48 +0000
commitbc2697cca0fc58434b6177923d46612267781825 (patch)
treea264ef32142aae00f766fd37db278b4a7533598b /test
parentc575283675f7bd9f7cc40f06024ba6251c2d55a8 (diff)
downloadexternal_llvm-bc2697cca0fc58434b6177923d46612267781825.zip
external_llvm-bc2697cca0fc58434b6177923d46612267781825.tar.gz
external_llvm-bc2697cca0fc58434b6177923d46612267781825.tar.bz2
Make SPU backend handle insertelement and
store for "half vectors" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/CellSPU/v2f32.ll18
-rw-r--r--test/CodeGen/CellSPU/v2i32.ll7
2 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/CellSPU/v2f32.ll b/test/CodeGen/CellSPU/v2f32.ll
index 004463a..b32c23b 100644
--- a/test/CodeGen/CellSPU/v2f32.ll
+++ b/test/CodeGen/CellSPU/v2f32.ll
@@ -42,4 +42,22 @@ define %vec @test_splat(float %param ) {
ret %vec %rv
}
+define void @test_store(%vec %val, %vec* %ptr){
+
+;CHECK: stqd
+ store %vec undef, %vec* null
+
+;CHECK: stqd $3, 0($4)
+;CHECK: bi $lr
+ store %vec %val, %vec* %ptr
+ ret void
+}
+
+define %vec @test_insert(){
+;CHECK: cwd
+;CHECK: shufb $3
+ %rv = insertelement %vec undef, float 0.0e+00, i32 undef
+;CHECK: bi $lr
+ ret %vec %rv
+}
diff --git a/test/CodeGen/CellSPU/v2i32.ll b/test/CodeGen/CellSPU/v2i32.ll
index be3822a..ca8af6a 100644
--- a/test/CodeGen/CellSPU/v2i32.ll
+++ b/test/CodeGen/CellSPU/v2i32.ll
@@ -55,3 +55,10 @@ define i32 @test_extract() {
ret i32 %rv
}
+define void @test_store( %vec %val, %vec* %ptr)
+{
+;CHECK: stqd $3, 0($4)
+;CHECK: bi $lr
+ store %vec %val, %vec* %ptr
+ ret void
+}