[llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll vec_spat.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Apr 8 00:13:59 PDT 2006



Changes in directory llvm/test/Regression/CodeGen/PowerPC:

vec_shuffle.ll updated: 1.5 -> 1.6
vec_spat.ll updated: 1.3 -> 1.4
---
Log message:

add new testcase


---
Diffs of the changes:  (+27 -1)

 vec_shuffle.ll |   16 ++++++++++++++++
 vec_spat.ll    |   12 +++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)


Index: llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll
diff -u llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll:1.5 llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll:1.6
--- llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll:1.5	Thu Apr  6 17:27:59 2006
+++ llvm/test/Regression/CodeGen/PowerPC/vec_shuffle.ll	Sat Apr  8 02:13:46 2006
@@ -253,6 +253,21 @@
 entry:
 	%tmp = load <4 x int>* %A		; <<4 x int>> [#uses=2]
 	%tmp2 = load <4 x int>* %B		; <<4 x int>> [#uses=2]
+	%tmp = extractelement <4 x int> %tmp2, uint 0		; <int> [#uses=1]
+	%tmp3 = extractelement <4 x int> %tmp, uint 0		; <int> [#uses=1]
+	%tmp4 = extractelement <4 x int> %tmp2, uint 1		; <int> [#uses=1]
+	%tmp5 = extractelement <4 x int> %tmp, uint 1		; <int> [#uses=1]
+	%tmp6 = insertelement <4 x int> undef, int %tmp, uint 0		; <<4 x int>> [#uses=1]
+	%tmp7 = insertelement <4 x int> %tmp6, int %tmp3, uint 1		; <<4 x int>> [#uses=1]
+	%tmp8 = insertelement <4 x int> %tmp7, int %tmp4, uint 2		; <<4 x int>> [#uses=1]
+	%tmp9 = insertelement <4 x int> %tmp8, int %tmp5, uint 3		; <<4 x int>> [#uses=1]
+	store <4 x int> %tmp9, <4 x int>* %A
+	ret void
+}
+
+void %tw_h_flop(<4 x int>* %A, <4 x int>* %B) {
+	%tmp = load <4 x int>* %A		; <<4 x int>> [#uses=2]
+	%tmp2 = load <4 x int>* %B		; <<4 x int>> [#uses=2]
 	%tmp = extractelement <4 x int> %tmp, uint 0		; <int> [#uses=1]
 	%tmp3 = extractelement <4 x int> %tmp2, uint 0		; <int> [#uses=1]
 	%tmp4 = extractelement <4 x int> %tmp, uint 1		; <int> [#uses=1]
@@ -265,6 +280,7 @@
 	ret void
 }
 
+
 void %VMRG_UNARY_tb_l(<16 x sbyte>* %A, <16 x sbyte>* %B) {
 entry:
 	%tmp = load <16 x sbyte>* %A		; <<16 x sbyte>> [#uses=16]


Index: llvm/test/Regression/CodeGen/PowerPC/vec_spat.ll
diff -u llvm/test/Regression/CodeGen/PowerPC/vec_spat.ll:1.3 llvm/test/Regression/CodeGen/PowerPC/vec_spat.ll:1.4
--- llvm/test/Regression/CodeGen/PowerPC/vec_spat.ll:1.3	Tue Apr  4 12:20:45 2006
+++ llvm/test/Regression/CodeGen/PowerPC/vec_spat.ll	Sat Apr  8 02:13:46 2006
@@ -1,7 +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 &&
+; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsplti | wc -l | grep 3 &&
 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsplth | wc -l | grep 1
 
 %f4 = type <4 x float>
@@ -59,3 +59,13 @@
 	ret void
 }
 
+void %spltish(<16 x ubyte>* %A, <16 x ubyte>* %B) {
+	; Gets converted to 16 x ubyte 
+        %tmp = load <16 x ubyte>* %B            
+        %tmp = cast <16 x ubyte> %tmp to <16 x sbyte>           
+        %tmp4 = sub <16 x sbyte> %tmp, cast (<8 x short> < short 15, short 15, short 15, short 15, short 15, short 15, short 15, short 15 > to <16 x sbyte>)            
+        %tmp4 = cast <16 x sbyte> %tmp4 to <16 x ubyte>         
+        store <16 x ubyte> %tmp4, <16 x ubyte>* %A
+        ret void
+}
+






More information about the llvm-commits mailing list