summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-06 19:21:02 +0000
committerChris Lattner <sabre@nondot.org>2006-04-06 19:21:02 +0000
commit13f01c8a3da6ff3e9f58cfdc293c7226c2daa537 (patch)
tree2913aa3ba3d2b35e960d7fc37d7e9605a154d490 /llvm
parenta4c727f1ccfe92a6771fd15ed92f455f38ae66c5 (diff)
downloadbcm5719-llvm-13f01c8a3da6ff3e9f58cfdc293c7226c2daa537.tar.gz
bcm5719-llvm-13f01c8a3da6ff3e9f58cfdc293c7226c2daa537.zip
test vperm promotion
llvm-svn: 27454
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll b/llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll
index a39fa90ce97..50e89efdd25 100644
--- a/llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll
+++ b/llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll
@@ -1,4 +1,5 @@
; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsldoi | wc -l | grep 2
+; RUN: llvm-as < %s | opt -instcombine | llc -march=ppc32 -mcpu=g5 | not grep vperm
void %VSLDOI_xy(<8 x short>* %A, <8 x short>* %B) {
entry:
@@ -84,3 +85,18 @@ void %VSLDOI_xx(<8 x short>* %A, <8 x short>* %B) {
store <8 x short> %tmp33, <8 x short>* %A
ret void
}
+
+void %VPERM_promote(<8 x short>* %A, <8 x short>* %B) {
+entry:
+ %tmp = load <8 x short>* %A ; <<8 x short>> [#uses=1]
+ %tmp = cast <8 x short> %tmp to <4 x int> ; <<4 x int>> [#uses=1]
+ %tmp2 = load <8 x short>* %B ; <<8 x short>> [#uses=1]
+ %tmp2 = cast <8 x short> %tmp2 to <4 x int> ; <<4 x int>> [#uses=1]
+ %tmp3 = call <4 x int> %llvm.ppc.altivec.vperm( <4 x int> %tmp, <4 x int> %tmp2, <16 x sbyte> < sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14, sbyte 14 > ) ; <<4 x int>> [#uses=1]
+ %tmp3 = cast <4 x int> %tmp3 to <8 x short> ; <<8 x short>> [#uses=1]
+ store <8 x short> %tmp3, <8 x short>* %A
+ ret void
+}
+
+declare <4 x int> %llvm.ppc.altivec.vperm(<4 x int>, <4 x int>, <16 x sbyte>)
+
OpenPOWER on IntegriCloud