aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/vec_spat.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-25 06:11:56 +0000
committerChris Lattner <sabre@nondot.org>2006-03-25 06:11:56 +0000
commitb45854fff5a43135229e16f9ff5a9ce1246eb0dc (patch)
treefa01c4fd1b9da1d6890b8a0afe11cf97409f50e1 /test/CodeGen/PowerPC/vec_spat.ll
parent2c8bb1f531ad00e31fac23ed95269e30b5479ee0 (diff)
downloadexternal_llvm-b45854fff5a43135229e16f9ff5a9ce1246eb0dc.zip
external_llvm-b45854fff5a43135229e16f9ff5a9ce1246eb0dc.tar.gz
external_llvm-b45854fff5a43135229e16f9ff5a9ce1246eb0dc.tar.bz2
New tests for vsplti*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/vec_spat.ll')
-rw-r--r--test/CodeGen/PowerPC/vec_spat.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/vec_spat.ll b/test/CodeGen/PowerPC/vec_spat.ll
index a06b625..ee16cc0 100644
--- a/test/CodeGen/PowerPC/vec_spat.ll
+++ b/test/CodeGen/PowerPC/vec_spat.ll
@@ -1,6 +1,7 @@
; Test that vectors are scalarized/lowered correctly.
; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vspltw | wc -l | grep 2 &&
; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 | grep stfs | wc -l | grep 4
+; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsplti | wc -l | grep 2
%f4 = type <4 x float>
%i4 = type <4 x int>
@@ -29,3 +30,17 @@ void %splat_i4(%i4* %P, %i4* %Q, int %X) {
ret void
}
+void %splat_imm_i32(%i4* %P, %i4* %Q, int %X) {
+ %q = load %i4* %Q
+ %R = add %i4 %q, <int -1, int -1, int -1, int -1>
+ store %i4 %R, %i4* %P
+ ret void
+}
+
+void %splat_imm_i16(%i4* %P, %i4* %Q, int %X) {
+ %q = load %i4* %Q
+ %R = add %i4 %q, <int 65537, int 65537, int 65537, int 65537>
+ store %i4 %R, %i4* %P
+ ret void
+}
+