4f67f83f7e3fc54b065fbc56d0611f1eb5ddbd3b
[oota-llvm.git] / test / CodeGen / PowerPC / vec_perf_shuffle.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm
3
4 <4 x float> %test_uu72(<4 x float> *%P1, <4 x float> *%P2) {
5         %V1 = load <4 x float> *%P1
6         %V2 = load <4 x float> *%P2
7         ; vmrglw + vsldoi
8         %V3 = shufflevector <4 x float> %V1, <4 x float> %V2,
9                             <4 x uint> <uint undef, uint undef, uint 7, uint 2>
10         ret <4 x float> %V3
11 }
12
13 <4 x float> %test_30u5(<4 x float> *%P1, <4 x float> *%P2) {
14         %V1 = load <4 x float> *%P1
15         %V2 = load <4 x float> *%P2
16         %V3 = shufflevector <4 x float> %V1, <4 x float> %V2,
17                   <4 x uint> <uint 3, uint 0, uint undef, uint 5>
18         ret <4 x float> %V3
19 }
20
21 <4 x float> %test_3u73(<4 x float> *%P1, <4 x float> *%P2) {
22         %V1 = load <4 x float> *%P1
23         %V2 = load <4 x float> *%P2
24         %V3 = shufflevector <4 x float> %V1, <4 x float> %V2,
25                   <4 x uint> <uint 3, uint undef, uint 7, uint 3>
26         ret <4 x float> %V3
27 }
28
29 <4 x float> %test_3774(<4 x float> *%P1, <4 x float> *%P2) {
30         %V1 = load <4 x float> *%P1
31         %V2 = load <4 x float> *%P2
32         %V3 = shufflevector <4 x float> %V1, <4 x float> %V2,
33                   <4 x uint> <uint 3, uint 7, uint 7, uint 4>
34         ret <4 x float> %V3
35 }
36
37 <4 x float> %test_4450(<4 x float> *%P1, <4 x float> *%P2) {
38         %V1 = load <4 x float> *%P1
39         %V2 = load <4 x float> *%P2
40         %V3 = shufflevector <4 x float> %V1, <4 x float> %V2,
41                   <4 x uint> <uint 4, uint 4, uint 5, uint 0>
42         ret <4 x float> %V3
43 }