aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-04 17:20:45 +0000
committerChris Lattner <sabre@nondot.org>2006-04-04 17:20:45 +0000
commit2ffc00a1d5f4de3eb923fa2eb43876c773d19dd4 (patch)
treee639c6e07a6b61d2d0935931cf2ef5c6c072b506
parent1f239300d341c0d5d94516f8d0c41cdd31fae54b (diff)
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27397 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/PowerPC/vec_spat.ll19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/CodeGen/PowerPC/vec_spat.ll b/test/CodeGen/PowerPC/vec_spat.ll
index ee16cc04b2..c8c6e4a5e6 100644
--- a/test/CodeGen/PowerPC/vec_spat.ll
+++ b/test/CodeGen/PowerPC/vec_spat.ll
@@ -1,7 +1,8 @@
; 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
+; 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 &&
+; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsplth | wc -l | grep 1
%f4 = type <4 x float>
%i4 = type <4 x int>
@@ -44,3 +45,17 @@ void %splat_imm_i16(%i4* %P, %i4* %Q, int %X) {
ret void
}
+void %splat_h(short %tmp, <16 x ubyte>* %dst) {
+ %tmp = insertelement <8 x short> undef, short %tmp, uint 0
+ %tmp72 = insertelement <8 x short> %tmp, short %tmp, uint 1
+ %tmp73 = insertelement <8 x short> %tmp72, short %tmp, uint 2
+ %tmp74 = insertelement <8 x short> %tmp73, short %tmp, uint 3
+ %tmp75 = insertelement <8 x short> %tmp74, short %tmp, uint 4
+ %tmp76 = insertelement <8 x short> %tmp75, short %tmp, uint 5
+ %tmp77 = insertelement <8 x short> %tmp76, short %tmp, uint 6
+ %tmp78 = insertelement <8 x short> %tmp77, short %tmp, uint 7
+ %tmp78 = cast <8 x short> %tmp78 to <16 x ubyte>
+ store <16 x ubyte> %tmp78, <16 x ubyte>* %dst
+ ret void
+}
+