[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/vec_shuffle.ll
Evan Cheng
evan.cheng at apple.com
Tue Apr 4 18:45:10 PDT 2006
Changes in directory llvm/test/Regression/CodeGen/X86:
vec_shuffle.ll updated: 1.4 -> 1.5
---
Log message:
Add a new shuffle test case that requires pshuflw / pshufhw pair.
---
Diffs of the changes: (+27 -2)
vec_shuffle.ll | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
Index: llvm/test/Regression/CodeGen/X86/vec_shuffle.ll
diff -u llvm/test/Regression/CodeGen/X86/vec_shuffle.ll:1.4 llvm/test/Regression/CodeGen/X86/vec_shuffle.ll:1.5
--- llvm/test/Regression/CodeGen/X86/vec_shuffle.ll:1.4 Wed Mar 29 16:51:28 2006
+++ llvm/test/Regression/CodeGen/X86/vec_shuffle.ll Tue Apr 4 20:44:57 2006
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufp | wc -l | grep 1
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhpd
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhpd | wc -l | grep 1
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | wc -l | grep 2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshuflw | wc -l | grep 1
void %test_v4sf(<4 x float>* %P, float %X, float %Y) {
%tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0
@@ -41,3 +42,27 @@
store <2 x long> %tmp15, <2 x long>* %res
ret void
}
+
+void %test_v8i16_2(<2 x long>* %res, <2 x long>* %A) {
+ %tmp = load <2 x long>* %A
+ %tmp = cast <2 x long> %tmp to <8 x short>
+ %tmp0 = extractelement <8 x short> %tmp, uint 0
+ %tmp1 = extractelement <8 x short> %tmp, uint 1
+ %tmp2 = extractelement <8 x short> %tmp, uint 2
+ %tmp3 = extractelement <8 x short> %tmp, uint 3
+ %tmp4 = extractelement <8 x short> %tmp, uint 4
+ %tmp5 = extractelement <8 x short> %tmp, uint 5
+ %tmp6 = extractelement <8 x short> %tmp, uint 6
+ %tmp7 = extractelement <8 x short> %tmp, uint 7
+ %tmp8 = insertelement <8 x short> undef, short %tmp2, uint 0
+ %tmp9 = insertelement <8 x short> %tmp8, short %tmp1, uint 1
+ %tmp10 = insertelement <8 x short> %tmp9, short %tmp0, uint 2
+ %tmp11 = insertelement <8 x short> %tmp10, short %tmp3, uint 3
+ %tmp12 = insertelement <8 x short> %tmp11, short %tmp6, uint 4
+ %tmp13 = insertelement <8 x short> %tmp12, short %tmp5, uint 5
+ %tmp14 = insertelement <8 x short> %tmp13, short %tmp4, uint 6
+ %tmp15 = insertelement <8 x short> %tmp14, short %tmp7, uint 7
+ %tmp15 = cast <8 x short> %tmp15 to <2 x long>
+ store <2 x long> %tmp15, <2 x long>* %res
+ ret void
+}
More information about the llvm-commits
mailing list