For PR1553:
[oota-llvm.git] / test / CodeGen / X86 / vec_shuffle-9.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f
2 ; RUN: grep punpck %t | wc -l | grep 2
3 ; RUN: not grep pextrw %t
4
5 <4 x int> %test(sbyte** %ptr) {
6 entry:
7         %tmp = load sbyte** %ptr
8         %tmp = cast sbyte* %tmp to float*
9         %tmp = load float* %tmp
10         %tmp = insertelement <4 x float> undef, float %tmp, uint 0
11         %tmp9 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1
12         %tmp10 = insertelement <4 x float> %tmp9, float 0.000000e+00, uint 2
13         %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, uint 3
14         %tmp21 = cast <4 x float> %tmp11 to <16 x sbyte>
15         %tmp22 = shufflevector <16 x sbyte> %tmp21, <16 x sbyte> zeroinitializer, <16 x uint> < uint 0, uint 16, uint 1, uint 17, uint 2, uint 18, uint 3, uint 19, uint 4, uint 20, uint 5, uint 21, uint 6, uint 22, uint 7, uint 23 >
16         %tmp31 = cast <16 x sbyte> %tmp22 to <8 x short>
17         %tmp = shufflevector <8 x short> zeroinitializer, <8 x short> %tmp31, <8 x uint> < uint 0, uint 8, uint 1, uint 9, uint 2, uint 10, uint 3, uint 11 >
18         %tmp36 = cast <8 x short> %tmp to <4 x int>
19         ret <4 x int> %tmp36
20 }