1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu -mattr=+altivec -mattr=-vsx -mcpu=pwr7 | FileCheck %s
4 define void @VPKUHUM_xy(<16 x i8>* %A, <16 x i8>* %B) {
5 ; CHECK-LABEL: VPKUHUM_xy:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: lvx 2, 0, 3
8 ; CHECK-NEXT: lvx 3, 0, 4
9 ; CHECK-NEXT: vpkuhum 2, 3, 2
10 ; CHECK-NEXT: stvx 2, 0, 3
13 %tmp = load <16 x i8>, <16 x i8>* %A
14 %tmp2 = load <16 x i8>, <16 x i8>* %B
15 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
16 store <16 x i8> %tmp3, <16 x i8>* %A
20 define void @VPKUHUM_xx(<16 x i8>* %A) {
21 ; CHECK-LABEL: VPKUHUM_xx:
22 ; CHECK: # %bb.0: # %entry
23 ; CHECK-NEXT: lvx 2, 0, 3
24 ; CHECK-NEXT: vpkuhum 2, 2, 2
25 ; CHECK-NEXT: stvx 2, 0, 3
28 %tmp = load <16 x i8>, <16 x i8>* %A
29 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
30 store <16 x i8> %tmp2, <16 x i8>* %A
34 define void @VPKUWUM_xy(<16 x i8>* %A, <16 x i8>* %B) {
35 ; CHECK-LABEL: VPKUWUM_xy:
36 ; CHECK: # %bb.0: # %entry
37 ; CHECK-NEXT: lvx 2, 0, 3
38 ; CHECK-NEXT: lvx 3, 0, 4
39 ; CHECK-NEXT: vpkuwum 2, 3, 2
40 ; CHECK-NEXT: stvx 2, 0, 3
43 %tmp = load <16 x i8>, <16 x i8>* %A
44 %tmp2 = load <16 x i8>, <16 x i8>* %B
45 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 0, i32 1, i32 4, i32 5, i32 8, i32 9, i32 12, i32 13, i32 16, i32 17, i32 20, i32 21, i32 24, i32 25, i32 28, i32 29>
46 store <16 x i8> %tmp3, <16 x i8>* %A
50 define void @VPKUWUM_xx(<16 x i8>* %A) {
51 ; CHECK-LABEL: VPKUWUM_xx:
52 ; CHECK: # %bb.0: # %entry
53 ; CHECK-NEXT: lvx 2, 0, 3
54 ; CHECK-NEXT: vpkuwum 2, 2, 2
55 ; CHECK-NEXT: stvx 2, 0, 3
58 %tmp = load <16 x i8>, <16 x i8>* %A
59 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 0, i32 1, i32 4, i32 5, i32 8, i32 9, i32 12, i32 13, i32 0, i32 1, i32 4, i32 5, i32 8, i32 9, i32 12, i32 13>
60 store <16 x i8> %tmp2, <16 x i8>* %A
64 define void @VMRGLB_xy(<16 x i8>* %A, <16 x i8>* %B) {
65 ; CHECK-LABEL: VMRGLB_xy:
66 ; CHECK: # %bb.0: # %entry
67 ; CHECK-NEXT: lvx 2, 0, 3
68 ; CHECK-NEXT: lvx 3, 0, 4
69 ; CHECK-NEXT: vmrglb 2, 3, 2
70 ; CHECK-NEXT: stvx 2, 0, 3
73 %tmp = load <16 x i8>, <16 x i8>* %A
74 %tmp2 = load <16 x i8>, <16 x i8>* %B
75 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23>
76 store <16 x i8> %tmp3, <16 x i8>* %A
80 define void @VMRGLB_xx(<16 x i8>* %A) {
81 ; CHECK-LABEL: VMRGLB_xx:
82 ; CHECK: # %bb.0: # %entry
83 ; CHECK-NEXT: lvx 2, 0, 3
84 ; CHECK-NEXT: vmrglb 2, 2, 2
85 ; CHECK-NEXT: stvx 2, 0, 3
88 %tmp = load <16 x i8>, <16 x i8>* %A
89 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3, i32 4, i32 4, i32 5, i32 5, i32 6, i32 6, i32 7, i32 7>
90 store <16 x i8> %tmp2, <16 x i8>* %A
94 define void @VMRGHB_xy(<16 x i8>* %A, <16 x i8>* %B) {
95 ; CHECK-LABEL: VMRGHB_xy:
96 ; CHECK: # %bb.0: # %entry
97 ; CHECK-NEXT: lvx 2, 0, 3
98 ; CHECK-NEXT: lvx 3, 0, 4
99 ; CHECK-NEXT: vmrghb 2, 3, 2
100 ; CHECK-NEXT: stvx 2, 0, 3
103 %tmp = load <16 x i8>, <16 x i8>* %A
104 %tmp2 = load <16 x i8>, <16 x i8>* %B
105 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
106 store <16 x i8> %tmp3, <16 x i8>* %A
110 define void @VMRGHB_xx(<16 x i8>* %A) {
111 ; CHECK-LABEL: VMRGHB_xx:
112 ; CHECK: # %bb.0: # %entry
113 ; CHECK-NEXT: lvx 2, 0, 3
114 ; CHECK-NEXT: vmrghb 2, 2, 2
115 ; CHECK-NEXT: stvx 2, 0, 3
118 %tmp = load <16 x i8>, <16 x i8>* %A
119 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 8, i32 8, i32 9, i32 9, i32 10, i32 10, i32 11, i32 11, i32 12, i32 12, i32 13, i32 13, i32 14, i32 14, i32 15, i32 15>
120 store <16 x i8> %tmp2, <16 x i8>* %A
124 define void @VMRGLH_xy(<16 x i8>* %A, <16 x i8>* %B) {
125 ; CHECK-LABEL: VMRGLH_xy:
126 ; CHECK: # %bb.0: # %entry
127 ; CHECK-NEXT: lvx 2, 0, 3
128 ; CHECK-NEXT: lvx 3, 0, 4
129 ; CHECK-NEXT: vmrglh 2, 3, 2
130 ; CHECK-NEXT: stvx 2, 0, 3
133 %tmp = load <16 x i8>, <16 x i8>* %A
134 %tmp2 = load <16 x i8>, <16 x i8>* %B
135 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 0, i32 1, i32 16, i32 17, i32 2, i32 3, i32 18, i32 19, i32 4, i32 5, i32 20, i32 21, i32 6, i32 7, i32 22, i32 23>
136 store <16 x i8> %tmp3, <16 x i8>* %A
140 define void @VMRGLH_xx(<16 x i8>* %A) {
141 ; CHECK-LABEL: VMRGLH_xx:
142 ; CHECK: # %bb.0: # %entry
143 ; CHECK-NEXT: lvx 2, 0, 3
144 ; CHECK-NEXT: vmrglh 2, 2, 2
145 ; CHECK-NEXT: stvx 2, 0, 3
148 %tmp = load <16 x i8>, <16 x i8>* %A
149 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 2, i32 3, i32 2, i32 3, i32 4, i32 5, i32 4, i32 5, i32 6, i32 7, i32 6, i32 7>
150 store <16 x i8> %tmp2, <16 x i8>* %A
154 define void @VMRGHH_xy(<16 x i8>* %A, <16 x i8>* %B) {
155 ; CHECK-LABEL: VMRGHH_xy:
156 ; CHECK: # %bb.0: # %entry
157 ; CHECK-NEXT: lvx 2, 0, 3
158 ; CHECK-NEXT: lvx 3, 0, 4
159 ; CHECK-NEXT: vmrghh 2, 3, 2
160 ; CHECK-NEXT: stvx 2, 0, 3
163 %tmp = load <16 x i8>, <16 x i8>* %A
164 %tmp2 = load <16 x i8>, <16 x i8>* %B
165 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 8, i32 9, i32 24, i32 25, i32 10, i32 11, i32 26, i32 27, i32 12, i32 13, i32 28, i32 29, i32 14, i32 15, i32 30, i32 31>
166 store <16 x i8> %tmp3, <16 x i8>* %A
170 define void @VMRGHH_xx(<16 x i8>* %A) {
171 ; CHECK-LABEL: VMRGHH_xx:
172 ; CHECK: # %bb.0: # %entry
173 ; CHECK-NEXT: lvx 2, 0, 3
174 ; CHECK-NEXT: vmrghh 2, 2, 2
175 ; CHECK-NEXT: stvx 2, 0, 3
178 %tmp = load <16 x i8>, <16 x i8>* %A
179 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 8, i32 9, i32 8, i32 9, i32 10, i32 11, i32 10, i32 11, i32 12, i32 13, i32 12, i32 13, i32 14, i32 15, i32 14, i32 15>
180 store <16 x i8> %tmp2, <16 x i8>* %A
184 define void @VMRGLW_xy(<16 x i8>* %A, <16 x i8>* %B) {
185 ; CHECK-LABEL: VMRGLW_xy:
186 ; CHECK: # %bb.0: # %entry
187 ; CHECK-NEXT: lvx 2, 0, 3
188 ; CHECK-NEXT: lvx 3, 0, 4
189 ; CHECK-NEXT: vmrglw 2, 3, 2
190 ; CHECK-NEXT: stvx 2, 0, 3
193 %tmp = load <16 x i8>, <16 x i8>* %A
194 %tmp2 = load <16 x i8>, <16 x i8>* %B
195 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 16, i32 17, i32 18, i32 19, i32 4, i32 5, i32 6, i32 7, i32 20, i32 21, i32 22, i32 23>
196 store <16 x i8> %tmp3, <16 x i8>* %A
200 define void @VMRGLW_xx(<16 x i8>* %A) {
201 ; CHECK-LABEL: VMRGLW_xx:
202 ; CHECK: # %bb.0: # %entry
203 ; CHECK-NEXT: lvx 2, 0, 3
204 ; CHECK-NEXT: vmrglw 2, 2, 2
205 ; CHECK-NEXT: stvx 2, 0, 3
208 %tmp = load <16 x i8>, <16 x i8>* %A
209 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 4, i32 5, i32 6, i32 7>
210 store <16 x i8> %tmp2, <16 x i8>* %A
214 define void @VMRGHW_xy(<16 x i8>* %A, <16 x i8>* %B) {
215 ; CHECK-LABEL: VMRGHW_xy:
216 ; CHECK: # %bb.0: # %entry
217 ; CHECK-NEXT: lvx 2, 0, 3
218 ; CHECK-NEXT: lvx 3, 0, 4
219 ; CHECK-NEXT: vmrghw 2, 3, 2
220 ; CHECK-NEXT: stvx 2, 0, 3
223 %tmp = load <16 x i8>, <16 x i8>* %A
224 %tmp2 = load <16 x i8>, <16 x i8>* %B
225 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 24, i32 25, i32 26, i32 27, i32 12, i32 13, i32 14, i32 15, i32 28, i32 29, i32 30, i32 31>
226 store <16 x i8> %tmp3, <16 x i8>* %A
230 define void @VMRGHW_xx(<16 x i8>* %A) {
231 ; CHECK-LABEL: VMRGHW_xx:
232 ; CHECK: # %bb.0: # %entry
233 ; CHECK-NEXT: lvx 2, 0, 3
234 ; CHECK-NEXT: vmrghw 2, 2, 2
235 ; CHECK-NEXT: stvx 2, 0, 3
238 %tmp = load <16 x i8>, <16 x i8>* %A
239 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 8, i32 9, i32 10, i32 11, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 12, i32 13, i32 14, i32 15>
240 store <16 x i8> %tmp2, <16 x i8>* %A
244 define void @VSLDOI_xy(<16 x i8>* %A, <16 x i8>* %B) {
245 ; CHECK-LABEL: VSLDOI_xy:
246 ; CHECK: # %bb.0: # %entry
247 ; CHECK-NEXT: lvx 2, 0, 3
248 ; CHECK-NEXT: lvx 3, 0, 4
249 ; CHECK-NEXT: vsldoi 2, 3, 2, 4
250 ; CHECK-NEXT: stvx 2, 0, 3
253 %tmp = load <16 x i8>, <16 x i8>* %A
254 %tmp2 = load <16 x i8>, <16 x i8>* %B
255 %tmp3 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp2, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>
256 store <16 x i8> %tmp3, <16 x i8>* %A
260 define void @VSLDOI_xx(<16 x i8>* %A) {
261 ; CHECK-LABEL: VSLDOI_xx:
262 ; CHECK: # %bb.0: # %entry
263 ; CHECK-NEXT: lvx 2, 0, 3
264 ; CHECK-NEXT: vsldoi 2, 2, 2, 4
265 ; CHECK-NEXT: stvx 2, 0, 3
268 %tmp = load <16 x i8>, <16 x i8>* %A
269 %tmp2 = shufflevector <16 x i8> %tmp, <16 x i8> %tmp, <16 x i32> <i32 12, i32 13, i32 14, i32 15, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11>
270 store <16 x i8> %tmp2, <16 x i8>* %A