1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64-ibm-aix-xcoff \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK-64
4 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc-ibm-aix-xcoff \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK-32
7 define <4 x float> @_Z7testInsILj0ELj0EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
8 ; CHECK-64-LABEL: _Z7testInsILj0ELj0EDv4_fET1_S1_S1_:
9 ; CHECK-64: # %bb.0: # %entry
10 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
11 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
14 ; CHECK-32-LABEL: _Z7testInsILj0ELj0EDv4_fET1_S1_S1_:
15 ; CHECK-32: # %bb.0: # %entry
16 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
17 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
20 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 4, i32 1, i32 2, i32 3>
21 ret <4 x float> %vecins
24 define <4 x float> @_Z7testInsILj0ELj1EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
25 ; CHECK-64-LABEL: _Z7testInsILj0ELj1EDv4_fET1_S1_S1_:
26 ; CHECK-64: # %bb.0: # %entry
27 ; CHECK-64-NEXT: xxinsertw 34, 35, 0
30 ; CHECK-32-LABEL: _Z7testInsILj0ELj1EDv4_fET1_S1_S1_:
31 ; CHECK-32: # %bb.0: # %entry
32 ; CHECK-32-NEXT: xxinsertw 34, 35, 0
35 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 5, i32 1, i32 2, i32 3>
36 ret <4 x float> %vecins
39 define <4 x float> @_Z7testInsILj0ELj2EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
40 ; CHECK-64-LABEL: _Z7testInsILj0ELj2EDv4_fET1_S1_S1_:
41 ; CHECK-64: # %bb.0: # %entry
42 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
43 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
46 ; CHECK-32-LABEL: _Z7testInsILj0ELj2EDv4_fET1_S1_S1_:
47 ; CHECK-32: # %bb.0: # %entry
48 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
49 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
52 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 6, i32 1, i32 2, i32 3>
53 ret <4 x float> %vecins
56 define <4 x float> @_Z7testInsILj0ELj3EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
57 ; CHECK-64-LABEL: _Z7testInsILj0ELj3EDv4_fET1_S1_S1_:
58 ; CHECK-64: # %bb.0: # %entry
59 ; CHECK-64-NEXT: xxswapd 0, 35
60 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
63 ; CHECK-32-LABEL: _Z7testInsILj0ELj3EDv4_fET1_S1_S1_:
64 ; CHECK-32: # %bb.0: # %entry
65 ; CHECK-32-NEXT: xxswapd 0, 35
66 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
69 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 7, i32 1, i32 2, i32 3>
70 ret <4 x float> %vecins
73 define <4 x float> @_Z7testInsILj1ELj0EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
74 ; CHECK-64-LABEL: _Z7testInsILj1ELj0EDv4_fET1_S1_S1_:
75 ; CHECK-64: # %bb.0: # %entry
76 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
77 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
80 ; CHECK-32-LABEL: _Z7testInsILj1ELj0EDv4_fET1_S1_S1_:
81 ; CHECK-32: # %bb.0: # %entry
82 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
83 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
86 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 3>
87 ret <4 x float> %vecins
90 define <4 x float> @_Z7testInsILj1ELj1EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
91 ; CHECK-64-LABEL: _Z7testInsILj1ELj1EDv4_fET1_S1_S1_:
92 ; CHECK-64: # %bb.0: # %entry
93 ; CHECK-64-NEXT: xxinsertw 34, 35, 4
96 ; CHECK-32-LABEL: _Z7testInsILj1ELj1EDv4_fET1_S1_S1_:
97 ; CHECK-32: # %bb.0: # %entry
98 ; CHECK-32-NEXT: xxinsertw 34, 35, 4
101 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 5, i32 2, i32 3>
102 ret <4 x float> %vecins
105 define <4 x float> @_Z7testInsILj1ELj2EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
106 ; CHECK-64-LABEL: _Z7testInsILj1ELj2EDv4_fET1_S1_S1_:
107 ; CHECK-64: # %bb.0: # %entry
108 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
109 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
112 ; CHECK-32-LABEL: _Z7testInsILj1ELj2EDv4_fET1_S1_S1_:
113 ; CHECK-32: # %bb.0: # %entry
114 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
115 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
118 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 6, i32 2, i32 3>
119 ret <4 x float> %vecins
122 define <4 x float> @_Z7testInsILj1ELj3EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
123 ; CHECK-64-LABEL: _Z7testInsILj1ELj3EDv4_fET1_S1_S1_:
124 ; CHECK-64: # %bb.0: # %entry
125 ; CHECK-64-NEXT: xxswapd 0, 35
126 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
129 ; CHECK-32-LABEL: _Z7testInsILj1ELj3EDv4_fET1_S1_S1_:
130 ; CHECK-32: # %bb.0: # %entry
131 ; CHECK-32-NEXT: xxswapd 0, 35
132 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
135 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 7, i32 2, i32 3>
136 ret <4 x float> %vecins
139 define <4 x float> @_Z7testInsILj2ELj0EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
140 ; CHECK-64-LABEL: _Z7testInsILj2ELj0EDv4_fET1_S1_S1_:
141 ; CHECK-64: # %bb.0: # %entry
142 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
143 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
146 ; CHECK-32-LABEL: _Z7testInsILj2ELj0EDv4_fET1_S1_S1_:
147 ; CHECK-32: # %bb.0: # %entry
148 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
149 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
152 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 4, i32 3>
153 ret <4 x float> %vecins
156 define <4 x float> @_Z7testInsILj2ELj1EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
157 ; CHECK-64-LABEL: _Z7testInsILj2ELj1EDv4_fET1_S1_S1_:
158 ; CHECK-64: # %bb.0: # %entry
159 ; CHECK-64-NEXT: xxinsertw 34, 35, 8
162 ; CHECK-32-LABEL: _Z7testInsILj2ELj1EDv4_fET1_S1_S1_:
163 ; CHECK-32: # %bb.0: # %entry
164 ; CHECK-32-NEXT: xxinsertw 34, 35, 8
167 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 5, i32 3>
168 ret <4 x float> %vecins
171 define <4 x float> @_Z7testInsILj2ELj2EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
172 ; CHECK-64-LABEL: _Z7testInsILj2ELj2EDv4_fET1_S1_S1_:
173 ; CHECK-64: # %bb.0: # %entry
174 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
175 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
178 ; CHECK-32-LABEL: _Z7testInsILj2ELj2EDv4_fET1_S1_S1_:
179 ; CHECK-32: # %bb.0: # %entry
180 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
181 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
184 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 6, i32 3>
185 ret <4 x float> %vecins
188 define <4 x float> @_Z7testInsILj2ELj3EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
189 ; CHECK-64-LABEL: _Z7testInsILj2ELj3EDv4_fET1_S1_S1_:
190 ; CHECK-64: # %bb.0: # %entry
191 ; CHECK-64-NEXT: xxswapd 0, 35
192 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
195 ; CHECK-32-LABEL: _Z7testInsILj2ELj3EDv4_fET1_S1_S1_:
196 ; CHECK-32: # %bb.0: # %entry
197 ; CHECK-32-NEXT: xxswapd 0, 35
198 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
201 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 7, i32 3>
202 ret <4 x float> %vecins
205 define <4 x float> @_Z7testInsILj3ELj0EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
206 ; CHECK-64-LABEL: _Z7testInsILj3ELj0EDv4_fET1_S1_S1_:
207 ; CHECK-64: # %bb.0: # %entry
208 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
209 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
212 ; CHECK-32-LABEL: _Z7testInsILj3ELj0EDv4_fET1_S1_S1_:
213 ; CHECK-32: # %bb.0: # %entry
214 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
215 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
218 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 4>
219 ret <4 x float> %vecins
222 define <4 x float> @_Z7testInsILj3ELj1EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
223 ; CHECK-64-LABEL: _Z7testInsILj3ELj1EDv4_fET1_S1_S1_:
224 ; CHECK-64: # %bb.0: # %entry
225 ; CHECK-64-NEXT: xxinsertw 34, 35, 12
228 ; CHECK-32-LABEL: _Z7testInsILj3ELj1EDv4_fET1_S1_S1_:
229 ; CHECK-32: # %bb.0: # %entry
230 ; CHECK-32-NEXT: xxinsertw 34, 35, 12
233 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 5>
234 ret <4 x float> %vecins
237 define <4 x float> @_Z7testInsILj3ELj2EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
238 ; CHECK-64-LABEL: _Z7testInsILj3ELj2EDv4_fET1_S1_S1_:
239 ; CHECK-64: # %bb.0: # %entry
240 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
241 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
244 ; CHECK-32-LABEL: _Z7testInsILj3ELj2EDv4_fET1_S1_S1_:
245 ; CHECK-32: # %bb.0: # %entry
246 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
247 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
250 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 6>
251 ret <4 x float> %vecins
254 define <4 x float> @_Z7testInsILj3ELj3EDv4_fET1_S1_S1_(<4 x float> %a, <4 x float> %b) {
255 ; CHECK-64-LABEL: _Z7testInsILj3ELj3EDv4_fET1_S1_S1_:
256 ; CHECK-64: # %bb.0: # %entry
257 ; CHECK-64-NEXT: xxswapd 0, 35
258 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
261 ; CHECK-32-LABEL: _Z7testInsILj3ELj3EDv4_fET1_S1_S1_:
262 ; CHECK-32: # %bb.0: # %entry
263 ; CHECK-32-NEXT: xxswapd 0, 35
264 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
267 %vecins = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
268 ret <4 x float> %vecins
271 define <4 x i32> @_Z7testInsILj0ELj0EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
272 ; CHECK-64-LABEL: _Z7testInsILj0ELj0EDv4_jET1_S1_S1_:
273 ; CHECK-64: # %bb.0: # %entry
274 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
275 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
278 ; CHECK-32-LABEL: _Z7testInsILj0ELj0EDv4_jET1_S1_S1_:
279 ; CHECK-32: # %bb.0: # %entry
280 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
281 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
284 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 1, i32 2, i32 3>
285 ret <4 x i32> %vecins
288 define <4 x i32> @_Z7testInsILj0ELj1EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
289 ; CHECK-64-LABEL: _Z7testInsILj0ELj1EDv4_jET1_S1_S1_:
290 ; CHECK-64: # %bb.0: # %entry
291 ; CHECK-64-NEXT: xxinsertw 34, 35, 0
294 ; CHECK-32-LABEL: _Z7testInsILj0ELj1EDv4_jET1_S1_S1_:
295 ; CHECK-32: # %bb.0: # %entry
296 ; CHECK-32-NEXT: xxinsertw 34, 35, 0
299 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 5, i32 1, i32 2, i32 3>
300 ret <4 x i32> %vecins
303 define <4 x i32> @_Z7testInsILj0ELj2EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
304 ; CHECK-64-LABEL: _Z7testInsILj0ELj2EDv4_jET1_S1_S1_:
305 ; CHECK-64: # %bb.0: # %entry
306 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
307 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
310 ; CHECK-32-LABEL: _Z7testInsILj0ELj2EDv4_jET1_S1_S1_:
311 ; CHECK-32: # %bb.0: # %entry
312 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
313 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
316 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 6, i32 1, i32 2, i32 3>
317 ret <4 x i32> %vecins
320 define <4 x i32> @_Z7testInsILj0ELj3EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
321 ; CHECK-64-LABEL: _Z7testInsILj0ELj3EDv4_jET1_S1_S1_:
322 ; CHECK-64: # %bb.0: # %entry
323 ; CHECK-64-NEXT: xxswapd 0, 35
324 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
327 ; CHECK-32-LABEL: _Z7testInsILj0ELj3EDv4_jET1_S1_S1_:
328 ; CHECK-32: # %bb.0: # %entry
329 ; CHECK-32-NEXT: xxswapd 0, 35
330 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
333 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 7, i32 1, i32 2, i32 3>
334 ret <4 x i32> %vecins
337 define <4 x i32> @_Z7testInsILj1ELj0EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
338 ; CHECK-64-LABEL: _Z7testInsILj1ELj0EDv4_jET1_S1_S1_:
339 ; CHECK-64: # %bb.0: # %entry
340 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
341 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
344 ; CHECK-32-LABEL: _Z7testInsILj1ELj0EDv4_jET1_S1_S1_:
345 ; CHECK-32: # %bb.0: # %entry
346 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
347 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
350 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 3>
351 ret <4 x i32> %vecins
354 define <4 x i32> @_Z7testInsILj1ELj1EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
355 ; CHECK-64-LABEL: _Z7testInsILj1ELj1EDv4_jET1_S1_S1_:
356 ; CHECK-64: # %bb.0: # %entry
357 ; CHECK-64-NEXT: xxinsertw 34, 35, 4
360 ; CHECK-32-LABEL: _Z7testInsILj1ELj1EDv4_jET1_S1_S1_:
361 ; CHECK-32: # %bb.0: # %entry
362 ; CHECK-32-NEXT: xxinsertw 34, 35, 4
365 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 5, i32 2, i32 3>
366 ret <4 x i32> %vecins
369 define <4 x i32> @_Z7testInsILj1ELj2EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
370 ; CHECK-64-LABEL: _Z7testInsILj1ELj2EDv4_jET1_S1_S1_:
371 ; CHECK-64: # %bb.0: # %entry
372 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
373 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
376 ; CHECK-32-LABEL: _Z7testInsILj1ELj2EDv4_jET1_S1_S1_:
377 ; CHECK-32: # %bb.0: # %entry
378 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
379 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
382 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 6, i32 2, i32 3>
383 ret <4 x i32> %vecins
386 define <4 x i32> @_Z7testInsILj1ELj3EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
387 ; CHECK-64-LABEL: _Z7testInsILj1ELj3EDv4_jET1_S1_S1_:
388 ; CHECK-64: # %bb.0: # %entry
389 ; CHECK-64-NEXT: xxswapd 0, 35
390 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
393 ; CHECK-32-LABEL: _Z7testInsILj1ELj3EDv4_jET1_S1_S1_:
394 ; CHECK-32: # %bb.0: # %entry
395 ; CHECK-32-NEXT: xxswapd 0, 35
396 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
399 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 7, i32 2, i32 3>
400 ret <4 x i32> %vecins
403 define <4 x i32> @_Z7testInsILj2ELj0EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
404 ; CHECK-64-LABEL: _Z7testInsILj2ELj0EDv4_jET1_S1_S1_:
405 ; CHECK-64: # %bb.0: # %entry
406 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
407 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
410 ; CHECK-32-LABEL: _Z7testInsILj2ELj0EDv4_jET1_S1_S1_:
411 ; CHECK-32: # %bb.0: # %entry
412 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
413 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
416 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 4, i32 3>
417 ret <4 x i32> %vecins
420 define <4 x i32> @_Z7testInsILj2ELj1EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
421 ; CHECK-64-LABEL: _Z7testInsILj2ELj1EDv4_jET1_S1_S1_:
422 ; CHECK-64: # %bb.0: # %entry
423 ; CHECK-64-NEXT: xxinsertw 34, 35, 8
426 ; CHECK-32-LABEL: _Z7testInsILj2ELj1EDv4_jET1_S1_S1_:
427 ; CHECK-32: # %bb.0: # %entry
428 ; CHECK-32-NEXT: xxinsertw 34, 35, 8
431 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 5, i32 3>
432 ret <4 x i32> %vecins
435 define <4 x i32> @_Z7testInsILj2ELj2EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
436 ; CHECK-64-LABEL: _Z7testInsILj2ELj2EDv4_jET1_S1_S1_:
437 ; CHECK-64: # %bb.0: # %entry
438 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
439 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
442 ; CHECK-32-LABEL: _Z7testInsILj2ELj2EDv4_jET1_S1_S1_:
443 ; CHECK-32: # %bb.0: # %entry
444 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
445 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
448 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 6, i32 3>
449 ret <4 x i32> %vecins
452 define <4 x i32> @_Z7testInsILj2ELj3EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
453 ; CHECK-64-LABEL: _Z7testInsILj2ELj3EDv4_jET1_S1_S1_:
454 ; CHECK-64: # %bb.0: # %entry
455 ; CHECK-64-NEXT: xxswapd 0, 35
456 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
459 ; CHECK-32-LABEL: _Z7testInsILj2ELj3EDv4_jET1_S1_S1_:
460 ; CHECK-32: # %bb.0: # %entry
461 ; CHECK-32-NEXT: xxswapd 0, 35
462 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
465 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 7, i32 3>
466 ret <4 x i32> %vecins
469 define <4 x i32> @_Z7testInsILj3ELj0EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
470 ; CHECK-64-LABEL: _Z7testInsILj3ELj0EDv4_jET1_S1_S1_:
471 ; CHECK-64: # %bb.0: # %entry
472 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
473 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
476 ; CHECK-32-LABEL: _Z7testInsILj3ELj0EDv4_jET1_S1_S1_:
477 ; CHECK-32: # %bb.0: # %entry
478 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
479 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
482 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 4>
483 ret <4 x i32> %vecins
486 define <4 x i32> @_Z7testInsILj3ELj1EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
487 ; CHECK-64-LABEL: _Z7testInsILj3ELj1EDv4_jET1_S1_S1_:
488 ; CHECK-64: # %bb.0: # %entry
489 ; CHECK-64-NEXT: xxinsertw 34, 35, 12
492 ; CHECK-32-LABEL: _Z7testInsILj3ELj1EDv4_jET1_S1_S1_:
493 ; CHECK-32: # %bb.0: # %entry
494 ; CHECK-32-NEXT: xxinsertw 34, 35, 12
497 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 5>
498 ret <4 x i32> %vecins
501 define <4 x i32> @_Z7testInsILj3ELj2EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
502 ; CHECK-64-LABEL: _Z7testInsILj3ELj2EDv4_jET1_S1_S1_:
503 ; CHECK-64: # %bb.0: # %entry
504 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
505 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
508 ; CHECK-32-LABEL: _Z7testInsILj3ELj2EDv4_jET1_S1_S1_:
509 ; CHECK-32: # %bb.0: # %entry
510 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
511 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
514 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 6>
515 ret <4 x i32> %vecins
518 define <4 x i32> @_Z7testInsILj3ELj3EDv4_jET1_S1_S1_(<4 x i32> %a, <4 x i32> %b) {
519 ; CHECK-64-LABEL: _Z7testInsILj3ELj3EDv4_jET1_S1_S1_:
520 ; CHECK-64: # %bb.0: # %entry
521 ; CHECK-64-NEXT: xxswapd 0, 35
522 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
525 ; CHECK-32-LABEL: _Z7testInsILj3ELj3EDv4_jET1_S1_S1_:
526 ; CHECK-32: # %bb.0: # %entry
527 ; CHECK-32-NEXT: xxswapd 0, 35
528 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
531 %vecins = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
532 ret <4 x i32> %vecins
535 define float @_Z13testUiToFpExtILj0EEfDv4_j(<4 x i32> %a) {
536 ; CHECK-64-LABEL: _Z13testUiToFpExtILj0EEfDv4_j:
537 ; CHECK-64: # %bb.0: # %entry
538 ; CHECK-64-NEXT: xxextractuw 0, 34, 0
539 ; CHECK-64-NEXT: xscvuxdsp 1, 0
542 ; CHECK-32-LABEL: _Z13testUiToFpExtILj0EEfDv4_j:
543 ; CHECK-32: # %bb.0: # %entry
544 ; CHECK-32-NEXT: stxv 34, -32(1)
545 ; CHECK-32-NEXT: lwz 3, -32(1)
546 ; CHECK-32-NEXT: stw 3, -4(1)
547 ; CHECK-32-NEXT: addi 3, 1, -4
548 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
549 ; CHECK-32-NEXT: xscvuxdsp 1, 0
552 %vecext = extractelement <4 x i32> %a, i32 0
553 %conv = uitofp i32 %vecext to float
557 define float @_Z13testUiToFpExtILj1EEfDv4_j(<4 x i32> %a) {
558 ; CHECK-64-LABEL: _Z13testUiToFpExtILj1EEfDv4_j:
559 ; CHECK-64: # %bb.0: # %entry
560 ; CHECK-64-NEXT: xxextractuw 0, 34, 4
561 ; CHECK-64-NEXT: xscvuxdsp 1, 0
564 ; CHECK-32-LABEL: _Z13testUiToFpExtILj1EEfDv4_j:
565 ; CHECK-32: # %bb.0: # %entry
566 ; CHECK-32-NEXT: stxv 34, -32(1)
567 ; CHECK-32-NEXT: lwz 3, -28(1)
568 ; CHECK-32-NEXT: stw 3, -4(1)
569 ; CHECK-32-NEXT: addi 3, 1, -4
570 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
571 ; CHECK-32-NEXT: xscvuxdsp 1, 0
574 %vecext = extractelement <4 x i32> %a, i32 1
575 %conv = uitofp i32 %vecext to float
579 define float @_Z13testUiToFpExtILj2EEfDv4_j(<4 x i32> %a) {
580 ; CHECK-64-LABEL: _Z13testUiToFpExtILj2EEfDv4_j:
581 ; CHECK-64: # %bb.0: # %entry
582 ; CHECK-64-NEXT: xxextractuw 0, 34, 8
583 ; CHECK-64-NEXT: xscvuxdsp 1, 0
586 ; CHECK-32-LABEL: _Z13testUiToFpExtILj2EEfDv4_j:
587 ; CHECK-32: # %bb.0: # %entry
588 ; CHECK-32-NEXT: stxv 34, -32(1)
589 ; CHECK-32-NEXT: lwz 3, -24(1)
590 ; CHECK-32-NEXT: stw 3, -4(1)
591 ; CHECK-32-NEXT: addi 3, 1, -4
592 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
593 ; CHECK-32-NEXT: xscvuxdsp 1, 0
596 %vecext = extractelement <4 x i32> %a, i32 2
597 %conv = uitofp i32 %vecext to float
601 define float @_Z13testUiToFpExtILj3EEfDv4_j(<4 x i32> %a) {
602 ; CHECK-64-LABEL: _Z13testUiToFpExtILj3EEfDv4_j:
603 ; CHECK-64: # %bb.0: # %entry
604 ; CHECK-64-NEXT: xxextractuw 0, 34, 12
605 ; CHECK-64-NEXT: xscvuxdsp 1, 0
608 ; CHECK-32-LABEL: _Z13testUiToFpExtILj3EEfDv4_j:
609 ; CHECK-32: # %bb.0: # %entry
610 ; CHECK-32-NEXT: stxv 34, -32(1)
611 ; CHECK-32-NEXT: lwz 3, -20(1)
612 ; CHECK-32-NEXT: stw 3, -4(1)
613 ; CHECK-32-NEXT: addi 3, 1, -4
614 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
615 ; CHECK-32-NEXT: xscvuxdsp 1, 0
618 %vecext = extractelement <4 x i32> %a, i32 3
619 %conv = uitofp i32 %vecext to float
623 ; Verify we generate optimal code for unsigned vector int elem extract followed
624 ; by conversion to double
626 define double @conv2dlbTestui0(<4 x i32> %a) {
627 ; CHECK-64-LABEL: conv2dlbTestui0:
628 ; CHECK-64: # %bb.0: # %entry
629 ; CHECK-64-NEXT: xxextractuw 0, 34, 0
630 ; CHECK-64-NEXT: xscvuxddp 1, 0
633 ; CHECK-32-LABEL: conv2dlbTestui0:
634 ; CHECK-32: # %bb.0: # %entry
635 ; CHECK-32-NEXT: stxv 34, -32(1)
636 ; CHECK-32-NEXT: lwz 3, -32(1)
637 ; CHECK-32-NEXT: stw 3, -4(1)
638 ; CHECK-32-NEXT: addi 3, 1, -4
639 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
640 ; CHECK-32-NEXT: xscvuxddp 1, 0
643 %0 = extractelement <4 x i32> %a, i32 0
644 %1 = uitofp i32 %0 to double
648 define double @conv2dlbTestui1(<4 x i32> %a) {
649 ; CHECK-64-LABEL: conv2dlbTestui1:
650 ; CHECK-64: # %bb.0: # %entry
651 ; CHECK-64-NEXT: xxextractuw 0, 34, 4
652 ; CHECK-64-NEXT: xscvuxddp 1, 0
655 ; CHECK-32-LABEL: conv2dlbTestui1:
656 ; CHECK-32: # %bb.0: # %entry
657 ; CHECK-32-NEXT: stxv 34, -32(1)
658 ; CHECK-32-NEXT: lwz 3, -28(1)
659 ; CHECK-32-NEXT: stw 3, -4(1)
660 ; CHECK-32-NEXT: addi 3, 1, -4
661 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
662 ; CHECK-32-NEXT: xscvuxddp 1, 0
665 %0 = extractelement <4 x i32> %a, i32 1
666 %1 = uitofp i32 %0 to double
670 define double @conv2dlbTestui2(<4 x i32> %a) {
671 ; CHECK-64-LABEL: conv2dlbTestui2:
672 ; CHECK-64: # %bb.0: # %entry
673 ; CHECK-64-NEXT: xxextractuw 0, 34, 8
674 ; CHECK-64-NEXT: xscvuxddp 1, 0
677 ; CHECK-32-LABEL: conv2dlbTestui2:
678 ; CHECK-32: # %bb.0: # %entry
679 ; CHECK-32-NEXT: stxv 34, -32(1)
680 ; CHECK-32-NEXT: lwz 3, -24(1)
681 ; CHECK-32-NEXT: stw 3, -4(1)
682 ; CHECK-32-NEXT: addi 3, 1, -4
683 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
684 ; CHECK-32-NEXT: xscvuxddp 1, 0
687 %0 = extractelement <4 x i32> %a, i32 2
688 %1 = uitofp i32 %0 to double
692 define double @conv2dlbTestui3(<4 x i32> %a) {
693 ; CHECK-64-LABEL: conv2dlbTestui3:
694 ; CHECK-64: # %bb.0: # %entry
695 ; CHECK-64-NEXT: xxextractuw 0, 34, 12
696 ; CHECK-64-NEXT: xscvuxddp 1, 0
699 ; CHECK-32-LABEL: conv2dlbTestui3:
700 ; CHECK-32: # %bb.0: # %entry
701 ; CHECK-32-NEXT: stxv 34, -32(1)
702 ; CHECK-32-NEXT: lwz 3, -20(1)
703 ; CHECK-32-NEXT: stw 3, -4(1)
704 ; CHECK-32-NEXT: addi 3, 1, -4
705 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
706 ; CHECK-32-NEXT: xscvuxddp 1, 0
709 %0 = extractelement <4 x i32> %a, i32 3
710 %1 = uitofp i32 %0 to double
714 ; verify we don't crash for variable elem extract
715 define double @conv2dlbTestuiVar(<4 x i32> %a, i32 zeroext %elem) {
716 ; CHECK-64-LABEL: conv2dlbTestuiVar:
717 ; CHECK-64: # %bb.0: # %entry
718 ; CHECK-64-NEXT: extsw 3, 3
719 ; CHECK-64-NEXT: rlwinm 3, 3, 2, 28, 29
720 ; CHECK-64-NEXT: vextuwlx 3, 3, 2
721 ; CHECK-64-NEXT: mtfprwz 0, 3
722 ; CHECK-64-NEXT: xscvuxddp 1, 0
725 ; CHECK-32-LABEL: conv2dlbTestuiVar:
726 ; CHECK-32: # %bb.0: # %entry
727 ; CHECK-32-NEXT: addi 4, 1, -32
728 ; CHECK-32-NEXT: rlwinm 3, 3, 2, 28, 29
729 ; CHECK-32-NEXT: stxv 34, -32(1)
730 ; CHECK-32-NEXT: lwzx 3, 4, 3
731 ; CHECK-32-NEXT: stw 3, -4(1)
732 ; CHECK-32-NEXT: addi 3, 1, -4
733 ; CHECK-32-NEXT: lfiwzx 0, 0, 3
734 ; CHECK-32-NEXT: xscvuxddp 1, 0
737 %vecext = extractelement <4 x i32> %a, i32 %elem
738 %conv = uitofp i32 %vecext to double
742 define <4 x float> @_Z10testInsEltILj0EDv4_ffET0_S1_T1_(<4 x float> %a, float %b) {
743 ; CHECK-64-LABEL: _Z10testInsEltILj0EDv4_ffET0_S1_T1_:
744 ; CHECK-64: # %bb.0: # %entry
745 ; CHECK-64-NEXT: xscvdpspn 0, 1
746 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
749 ; CHECK-32-LABEL: _Z10testInsEltILj0EDv4_ffET0_S1_T1_:
750 ; CHECK-32: # %bb.0: # %entry
751 ; CHECK-32-NEXT: xscvdpspn 0, 1
752 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
755 %vecins = insertelement <4 x float> %a, float %b, i32 0
756 ret <4 x float> %vecins
759 define <4 x float> @_Z10testInsEltILj1EDv4_ffET0_S1_T1_(<4 x float> %a, float %b) {
760 ; CHECK-64-LABEL: _Z10testInsEltILj1EDv4_ffET0_S1_T1_:
761 ; CHECK-64: # %bb.0: # %entry
762 ; CHECK-64-NEXT: xscvdpspn 0, 1
763 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
766 ; CHECK-32-LABEL: _Z10testInsEltILj1EDv4_ffET0_S1_T1_:
767 ; CHECK-32: # %bb.0: # %entry
768 ; CHECK-32-NEXT: xscvdpspn 0, 1
769 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
772 %vecins = insertelement <4 x float> %a, float %b, i32 1
773 ret <4 x float> %vecins
776 define <4 x float> @_Z10testInsEltILj2EDv4_ffET0_S1_T1_(<4 x float> %a, float %b) {
777 ; CHECK-64-LABEL: _Z10testInsEltILj2EDv4_ffET0_S1_T1_:
778 ; CHECK-64: # %bb.0: # %entry
779 ; CHECK-64-NEXT: xscvdpspn 0, 1
780 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
783 ; CHECK-32-LABEL: _Z10testInsEltILj2EDv4_ffET0_S1_T1_:
784 ; CHECK-32: # %bb.0: # %entry
785 ; CHECK-32-NEXT: xscvdpspn 0, 1
786 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
789 %vecins = insertelement <4 x float> %a, float %b, i32 2
790 ret <4 x float> %vecins
793 define <4 x float> @_Z10testInsEltILj3EDv4_ffET0_S1_T1_(<4 x float> %a, float %b) {
794 ; CHECK-64-LABEL: _Z10testInsEltILj3EDv4_ffET0_S1_T1_:
795 ; CHECK-64: # %bb.0: # %entry
796 ; CHECK-64-NEXT: xscvdpspn 0, 1
797 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
800 ; CHECK-32-LABEL: _Z10testInsEltILj3EDv4_ffET0_S1_T1_:
801 ; CHECK-32: # %bb.0: # %entry
802 ; CHECK-32-NEXT: xscvdpspn 0, 1
803 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
806 %vecins = insertelement <4 x float> %a, float %b, i32 3
807 ret <4 x float> %vecins
810 define <4 x i32> @_Z10testInsEltILj0EDv4_jjET0_S1_T1_(<4 x i32> %a, i32 zeroext %b) {
811 ; CHECK-64-LABEL: _Z10testInsEltILj0EDv4_jjET0_S1_T1_:
812 ; CHECK-64: # %bb.0: # %entry
813 ; CHECK-64-NEXT: mtfprwz 0, 3
814 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
817 ; CHECK-32-LABEL: _Z10testInsEltILj0EDv4_jjET0_S1_T1_:
818 ; CHECK-32: # %bb.0: # %entry
819 ; CHECK-32-NEXT: mtfprwz 0, 3
820 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
823 %vecins = insertelement <4 x i32> %a, i32 %b, i32 0
824 ret <4 x i32> %vecins
827 define <4 x i32> @_Z10testInsEltILj1EDv4_jjET0_S1_T1_(<4 x i32> %a, i32 zeroext %b) {
828 ; CHECK-64-LABEL: _Z10testInsEltILj1EDv4_jjET0_S1_T1_:
829 ; CHECK-64: # %bb.0: # %entry
830 ; CHECK-64-NEXT: mtfprwz 0, 3
831 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
834 ; CHECK-32-LABEL: _Z10testInsEltILj1EDv4_jjET0_S1_T1_:
835 ; CHECK-32: # %bb.0: # %entry
836 ; CHECK-32-NEXT: mtfprwz 0, 3
837 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
840 %vecins = insertelement <4 x i32> %a, i32 %b, i32 1
841 ret <4 x i32> %vecins
844 define <4 x i32> @_Z10testInsEltILj2EDv4_jjET0_S1_T1_(<4 x i32> %a, i32 zeroext %b) {
845 ; CHECK-64-LABEL: _Z10testInsEltILj2EDv4_jjET0_S1_T1_:
846 ; CHECK-64: # %bb.0: # %entry
847 ; CHECK-64-NEXT: mtfprwz 0, 3
848 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
851 ; CHECK-32-LABEL: _Z10testInsEltILj2EDv4_jjET0_S1_T1_:
852 ; CHECK-32: # %bb.0: # %entry
853 ; CHECK-32-NEXT: mtfprwz 0, 3
854 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
857 %vecins = insertelement <4 x i32> %a, i32 %b, i32 2
858 ret <4 x i32> %vecins
861 define <4 x i32> @_Z10testInsEltILj3EDv4_jjET0_S1_T1_(<4 x i32> %a, i32 zeroext %b) {
862 ; CHECK-64-LABEL: _Z10testInsEltILj3EDv4_jjET0_S1_T1_:
863 ; CHECK-64: # %bb.0: # %entry
864 ; CHECK-64-NEXT: mtfprwz 0, 3
865 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
868 ; CHECK-32-LABEL: _Z10testInsEltILj3EDv4_jjET0_S1_T1_:
869 ; CHECK-32: # %bb.0: # %entry
870 ; CHECK-32-NEXT: mtfprwz 0, 3
871 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
874 %vecins = insertelement <4 x i32> %a, i32 %b, i32 3
875 ret <4 x i32> %vecins
878 define <4 x float> @_Z7testInsILj0ELj0EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
879 ; CHECK-64-LABEL: _Z7testInsILj0ELj0EDv4_fET1_S1_S1_r:
880 ; CHECK-64: # %bb.0: # %entry
881 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
882 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
885 ; CHECK-32-LABEL: _Z7testInsILj0ELj0EDv4_fET1_S1_S1_r:
886 ; CHECK-32: # %bb.0: # %entry
887 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
888 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
891 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
892 ret <4 x float> %vecins
895 define <4 x float> @_Z7testInsILj0ELj1EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
896 ; CHECK-64-LABEL: _Z7testInsILj0ELj1EDv4_fET1_S1_S1_r:
897 ; CHECK-64: # %bb.0: # %entry
898 ; CHECK-64-NEXT: xxinsertw 34, 35, 0
901 ; CHECK-32-LABEL: _Z7testInsILj0ELj1EDv4_fET1_S1_S1_r:
902 ; CHECK-32: # %bb.0: # %entry
903 ; CHECK-32-NEXT: xxinsertw 34, 35, 0
906 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 1, i32 5, i32 6, i32 7>
907 ret <4 x float> %vecins
910 define <4 x float> @_Z7testInsILj0ELj2EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
911 ; CHECK-64-LABEL: _Z7testInsILj0ELj2EDv4_fET1_S1_S1_r:
912 ; CHECK-64: # %bb.0: # %entry
913 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
914 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
917 ; CHECK-32-LABEL: _Z7testInsILj0ELj2EDv4_fET1_S1_S1_r:
918 ; CHECK-32: # %bb.0: # %entry
919 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
920 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
923 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 2, i32 5, i32 6, i32 7>
924 ret <4 x float> %vecins
927 define <4 x float> @_Z7testInsILj0ELj3EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
928 ; CHECK-64-LABEL: _Z7testInsILj0ELj3EDv4_fET1_S1_S1_r:
929 ; CHECK-64: # %bb.0: # %entry
930 ; CHECK-64-NEXT: xxswapd 0, 35
931 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
934 ; CHECK-32-LABEL: _Z7testInsILj0ELj3EDv4_fET1_S1_S1_r:
935 ; CHECK-32: # %bb.0: # %entry
936 ; CHECK-32-NEXT: xxswapd 0, 35
937 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
940 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 3, i32 5, i32 6, i32 7>
941 ret <4 x float> %vecins
944 define <4 x float> @_Z7testInsILj1ELj0EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
945 ; CHECK-64-LABEL: _Z7testInsILj1ELj0EDv4_fET1_S1_S1_r:
946 ; CHECK-64: # %bb.0: # %entry
947 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
948 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
951 ; CHECK-32-LABEL: _Z7testInsILj1ELj0EDv4_fET1_S1_S1_r:
952 ; CHECK-32: # %bb.0: # %entry
953 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
954 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
957 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 0, i32 6, i32 7>
958 ret <4 x float> %vecins
961 define <4 x float> @_Z7testInsILj1ELj1EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
962 ; CHECK-64-LABEL: _Z7testInsILj1ELj1EDv4_fET1_S1_S1_r:
963 ; CHECK-64: # %bb.0: # %entry
964 ; CHECK-64-NEXT: xxinsertw 34, 35, 4
967 ; CHECK-32-LABEL: _Z7testInsILj1ELj1EDv4_fET1_S1_S1_r:
968 ; CHECK-32: # %bb.0: # %entry
969 ; CHECK-32-NEXT: xxinsertw 34, 35, 4
972 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 1, i32 6, i32 7>
973 ret <4 x float> %vecins
976 define <4 x float> @_Z7testInsILj1ELj2EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
977 ; CHECK-64-LABEL: _Z7testInsILj1ELj2EDv4_fET1_S1_S1_r:
978 ; CHECK-64: # %bb.0: # %entry
979 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
980 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
983 ; CHECK-32-LABEL: _Z7testInsILj1ELj2EDv4_fET1_S1_S1_r:
984 ; CHECK-32: # %bb.0: # %entry
985 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
986 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
989 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 2, i32 6, i32 7>
990 ret <4 x float> %vecins
993 define <4 x float> @_Z7testInsILj1ELj3EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
994 ; CHECK-64-LABEL: _Z7testInsILj1ELj3EDv4_fET1_S1_S1_r:
995 ; CHECK-64: # %bb.0: # %entry
996 ; CHECK-64-NEXT: xxswapd 0, 35
997 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
1000 ; CHECK-32-LABEL: _Z7testInsILj1ELj3EDv4_fET1_S1_S1_r:
1001 ; CHECK-32: # %bb.0: # %entry
1002 ; CHECK-32-NEXT: xxswapd 0, 35
1003 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
1004 ; CHECK-32-NEXT: blr
1006 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 3, i32 6, i32 7>
1007 ret <4 x float> %vecins
1010 define <4 x float> @_Z7testInsILj2ELj0EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1011 ; CHECK-64-LABEL: _Z7testInsILj2ELj0EDv4_fET1_S1_S1_r:
1012 ; CHECK-64: # %bb.0: # %entry
1013 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
1014 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
1015 ; CHECK-64-NEXT: blr
1017 ; CHECK-32-LABEL: _Z7testInsILj2ELj0EDv4_fET1_S1_S1_r:
1018 ; CHECK-32: # %bb.0: # %entry
1019 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
1020 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
1021 ; CHECK-32-NEXT: blr
1023 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 0, i32 7>
1024 ret <4 x float> %vecins
1027 define <4 x float> @_Z7testInsILj2ELj1EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1028 ; CHECK-64-LABEL: _Z7testInsILj2ELj1EDv4_fET1_S1_S1_r:
1029 ; CHECK-64: # %bb.0: # %entry
1030 ; CHECK-64-NEXT: xxinsertw 34, 35, 8
1031 ; CHECK-64-NEXT: blr
1033 ; CHECK-32-LABEL: _Z7testInsILj2ELj1EDv4_fET1_S1_S1_r:
1034 ; CHECK-32: # %bb.0: # %entry
1035 ; CHECK-32-NEXT: xxinsertw 34, 35, 8
1036 ; CHECK-32-NEXT: blr
1038 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 1, i32 7>
1039 ret <4 x float> %vecins
1042 define <4 x float> @_Z7testInsILj2ELj2EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1043 ; CHECK-64-LABEL: _Z7testInsILj2ELj2EDv4_fET1_S1_S1_r:
1044 ; CHECK-64: # %bb.0: # %entry
1045 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
1046 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
1047 ; CHECK-64-NEXT: blr
1049 ; CHECK-32-LABEL: _Z7testInsILj2ELj2EDv4_fET1_S1_S1_r:
1050 ; CHECK-32: # %bb.0: # %entry
1051 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
1052 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
1053 ; CHECK-32-NEXT: blr
1055 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 2, i32 7>
1056 ret <4 x float> %vecins
1059 define <4 x float> @_Z7testInsILj2ELj3EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1060 ; CHECK-64-LABEL: _Z7testInsILj2ELj3EDv4_fET1_S1_S1_r:
1061 ; CHECK-64: # %bb.0: # %entry
1062 ; CHECK-64-NEXT: xxswapd 0, 35
1063 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
1064 ; CHECK-64-NEXT: blr
1066 ; CHECK-32-LABEL: _Z7testInsILj2ELj3EDv4_fET1_S1_S1_r:
1067 ; CHECK-32: # %bb.0: # %entry
1068 ; CHECK-32-NEXT: xxswapd 0, 35
1069 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
1070 ; CHECK-32-NEXT: blr
1072 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 3, i32 7>
1073 ret <4 x float> %vecins
1076 define <4 x float> @_Z7testInsILj3ELj0EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1077 ; CHECK-64-LABEL: _Z7testInsILj3ELj0EDv4_fET1_S1_S1_r:
1078 ; CHECK-64: # %bb.0: # %entry
1079 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
1080 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
1081 ; CHECK-64-NEXT: blr
1083 ; CHECK-32-LABEL: _Z7testInsILj3ELj0EDv4_fET1_S1_S1_r:
1084 ; CHECK-32: # %bb.0: # %entry
1085 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
1086 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
1087 ; CHECK-32-NEXT: blr
1089 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 0>
1090 ret <4 x float> %vecins
1093 define <4 x float> @_Z7testInsILj3ELj1EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1094 ; CHECK-64-LABEL: _Z7testInsILj3ELj1EDv4_fET1_S1_S1_r:
1095 ; CHECK-64: # %bb.0: # %entry
1096 ; CHECK-64-NEXT: xxinsertw 34, 35, 12
1097 ; CHECK-64-NEXT: blr
1099 ; CHECK-32-LABEL: _Z7testInsILj3ELj1EDv4_fET1_S1_S1_r:
1100 ; CHECK-32: # %bb.0: # %entry
1101 ; CHECK-32-NEXT: xxinsertw 34, 35, 12
1102 ; CHECK-32-NEXT: blr
1104 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 1>
1105 ret <4 x float> %vecins
1108 define <4 x float> @_Z7testInsILj3ELj2EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1109 ; CHECK-64-LABEL: _Z7testInsILj3ELj2EDv4_fET1_S1_S1_r:
1110 ; CHECK-64: # %bb.0: # %entry
1111 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
1112 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
1113 ; CHECK-64-NEXT: blr
1115 ; CHECK-32-LABEL: _Z7testInsILj3ELj2EDv4_fET1_S1_S1_r:
1116 ; CHECK-32: # %bb.0: # %entry
1117 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
1118 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
1119 ; CHECK-32-NEXT: blr
1121 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 2>
1122 ret <4 x float> %vecins
1125 define <4 x float> @_Z7testInsILj3ELj3EDv4_fET1_S1_S1_r(<4 x float> %a, <4 x float> %b) {
1126 ; CHECK-64-LABEL: _Z7testInsILj3ELj3EDv4_fET1_S1_S1_r:
1127 ; CHECK-64: # %bb.0: # %entry
1128 ; CHECK-64-NEXT: xxswapd 0, 35
1129 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
1130 ; CHECK-64-NEXT: blr
1132 ; CHECK-32-LABEL: _Z7testInsILj3ELj3EDv4_fET1_S1_S1_r:
1133 ; CHECK-32: # %bb.0: # %entry
1134 ; CHECK-32-NEXT: xxswapd 0, 35
1135 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
1136 ; CHECK-32-NEXT: blr
1138 %vecins = shufflevector <4 x float> %b, <4 x float> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 3>
1139 ret <4 x float> %vecins
1142 define <4 x i32> @_Z7testInsILj0ELj0EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1143 ; CHECK-64-LABEL: _Z7testInsILj0ELj0EDv4_jET1_S1_S1_r:
1144 ; CHECK-64: # %bb.0: # %entry
1145 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
1146 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
1147 ; CHECK-64-NEXT: blr
1149 ; CHECK-32-LABEL: _Z7testInsILj0ELj0EDv4_jET1_S1_S1_r:
1150 ; CHECK-32: # %bb.0: # %entry
1151 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
1152 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
1153 ; CHECK-32-NEXT: blr
1155 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
1156 ret <4 x i32> %vecins
1159 define <4 x i32> @_Z7testInsILj0ELj1EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1160 ; CHECK-64-LABEL: _Z7testInsILj0ELj1EDv4_jET1_S1_S1_r:
1161 ; CHECK-64: # %bb.0: # %entry
1162 ; CHECK-64-NEXT: xxinsertw 34, 35, 0
1163 ; CHECK-64-NEXT: blr
1165 ; CHECK-32-LABEL: _Z7testInsILj0ELj1EDv4_jET1_S1_S1_r:
1166 ; CHECK-32: # %bb.0: # %entry
1167 ; CHECK-32-NEXT: xxinsertw 34, 35, 0
1168 ; CHECK-32-NEXT: blr
1170 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 1, i32 5, i32 6, i32 7>
1171 ret <4 x i32> %vecins
1174 define <4 x i32> @_Z7testInsILj0ELj2EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1175 ; CHECK-64-LABEL: _Z7testInsILj0ELj2EDv4_jET1_S1_S1_r:
1176 ; CHECK-64: # %bb.0: # %entry
1177 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
1178 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
1179 ; CHECK-64-NEXT: blr
1181 ; CHECK-32-LABEL: _Z7testInsILj0ELj2EDv4_jET1_S1_S1_r:
1182 ; CHECK-32: # %bb.0: # %entry
1183 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
1184 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
1185 ; CHECK-32-NEXT: blr
1187 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 2, i32 5, i32 6, i32 7>
1188 ret <4 x i32> %vecins
1191 define <4 x i32> @_Z7testInsILj0ELj3EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1192 ; CHECK-64-LABEL: _Z7testInsILj0ELj3EDv4_jET1_S1_S1_r:
1193 ; CHECK-64: # %bb.0: # %entry
1194 ; CHECK-64-NEXT: xxswapd 0, 35
1195 ; CHECK-64-NEXT: xxinsertw 34, 0, 0
1196 ; CHECK-64-NEXT: blr
1198 ; CHECK-32-LABEL: _Z7testInsILj0ELj3EDv4_jET1_S1_S1_r:
1199 ; CHECK-32: # %bb.0: # %entry
1200 ; CHECK-32-NEXT: xxswapd 0, 35
1201 ; CHECK-32-NEXT: xxinsertw 34, 0, 0
1202 ; CHECK-32-NEXT: blr
1204 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 3, i32 5, i32 6, i32 7>
1205 ret <4 x i32> %vecins
1208 define <4 x i32> @_Z7testInsILj1ELj0EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1209 ; CHECK-64-LABEL: _Z7testInsILj1ELj0EDv4_jET1_S1_S1_r:
1210 ; CHECK-64: # %bb.0: # %entry
1211 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
1212 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
1213 ; CHECK-64-NEXT: blr
1215 ; CHECK-32-LABEL: _Z7testInsILj1ELj0EDv4_jET1_S1_S1_r:
1216 ; CHECK-32: # %bb.0: # %entry
1217 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
1218 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
1219 ; CHECK-32-NEXT: blr
1221 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 0, i32 6, i32 7>
1222 ret <4 x i32> %vecins
1225 define <4 x i32> @_Z7testInsILj1ELj1EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1226 ; CHECK-64-LABEL: _Z7testInsILj1ELj1EDv4_jET1_S1_S1_r:
1227 ; CHECK-64: # %bb.0: # %entry
1228 ; CHECK-64-NEXT: xxinsertw 34, 35, 4
1229 ; CHECK-64-NEXT: blr
1231 ; CHECK-32-LABEL: _Z7testInsILj1ELj1EDv4_jET1_S1_S1_r:
1232 ; CHECK-32: # %bb.0: # %entry
1233 ; CHECK-32-NEXT: xxinsertw 34, 35, 4
1234 ; CHECK-32-NEXT: blr
1236 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 1, i32 6, i32 7>
1237 ret <4 x i32> %vecins
1240 define <4 x i32> @_Z7testInsILj1ELj2EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1241 ; CHECK-64-LABEL: _Z7testInsILj1ELj2EDv4_jET1_S1_S1_r:
1242 ; CHECK-64: # %bb.0: # %entry
1243 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
1244 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
1245 ; CHECK-64-NEXT: blr
1247 ; CHECK-32-LABEL: _Z7testInsILj1ELj2EDv4_jET1_S1_S1_r:
1248 ; CHECK-32: # %bb.0: # %entry
1249 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
1250 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
1251 ; CHECK-32-NEXT: blr
1253 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 2, i32 6, i32 7>
1254 ret <4 x i32> %vecins
1257 define <4 x i32> @_Z7testInsILj1ELj3EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1258 ; CHECK-64-LABEL: _Z7testInsILj1ELj3EDv4_jET1_S1_S1_r:
1259 ; CHECK-64: # %bb.0: # %entry
1260 ; CHECK-64-NEXT: xxswapd 0, 35
1261 ; CHECK-64-NEXT: xxinsertw 34, 0, 4
1262 ; CHECK-64-NEXT: blr
1264 ; CHECK-32-LABEL: _Z7testInsILj1ELj3EDv4_jET1_S1_S1_r:
1265 ; CHECK-32: # %bb.0: # %entry
1266 ; CHECK-32-NEXT: xxswapd 0, 35
1267 ; CHECK-32-NEXT: xxinsertw 34, 0, 4
1268 ; CHECK-32-NEXT: blr
1270 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 3, i32 6, i32 7>
1271 ret <4 x i32> %vecins
1274 define <4 x i32> @_Z7testInsILj2ELj0EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1275 ; CHECK-64-LABEL: _Z7testInsILj2ELj0EDv4_jET1_S1_S1_r:
1276 ; CHECK-64: # %bb.0: # %entry
1277 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
1278 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
1279 ; CHECK-64-NEXT: blr
1281 ; CHECK-32-LABEL: _Z7testInsILj2ELj0EDv4_jET1_S1_S1_r:
1282 ; CHECK-32: # %bb.0: # %entry
1283 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
1284 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
1285 ; CHECK-32-NEXT: blr
1287 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 0, i32 7>
1288 ret <4 x i32> %vecins
1291 define <4 x i32> @_Z7testInsILj2ELj1EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1292 ; CHECK-64-LABEL: _Z7testInsILj2ELj1EDv4_jET1_S1_S1_r:
1293 ; CHECK-64: # %bb.0: # %entry
1294 ; CHECK-64-NEXT: xxinsertw 34, 35, 8
1295 ; CHECK-64-NEXT: blr
1297 ; CHECK-32-LABEL: _Z7testInsILj2ELj1EDv4_jET1_S1_S1_r:
1298 ; CHECK-32: # %bb.0: # %entry
1299 ; CHECK-32-NEXT: xxinsertw 34, 35, 8
1300 ; CHECK-32-NEXT: blr
1302 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 1, i32 7>
1303 ret <4 x i32> %vecins
1306 define <4 x i32> @_Z7testInsILj2ELj2EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1307 ; CHECK-64-LABEL: _Z7testInsILj2ELj2EDv4_jET1_S1_S1_r:
1308 ; CHECK-64: # %bb.0: # %entry
1309 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
1310 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
1311 ; CHECK-64-NEXT: blr
1313 ; CHECK-32-LABEL: _Z7testInsILj2ELj2EDv4_jET1_S1_S1_r:
1314 ; CHECK-32: # %bb.0: # %entry
1315 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
1316 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
1317 ; CHECK-32-NEXT: blr
1319 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 2, i32 7>
1320 ret <4 x i32> %vecins
1323 define <4 x i32> @_Z7testInsILj2ELj3EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1324 ; CHECK-64-LABEL: _Z7testInsILj2ELj3EDv4_jET1_S1_S1_r:
1325 ; CHECK-64: # %bb.0: # %entry
1326 ; CHECK-64-NEXT: xxswapd 0, 35
1327 ; CHECK-64-NEXT: xxinsertw 34, 0, 8
1328 ; CHECK-64-NEXT: blr
1330 ; CHECK-32-LABEL: _Z7testInsILj2ELj3EDv4_jET1_S1_S1_r:
1331 ; CHECK-32: # %bb.0: # %entry
1332 ; CHECK-32-NEXT: xxswapd 0, 35
1333 ; CHECK-32-NEXT: xxinsertw 34, 0, 8
1334 ; CHECK-32-NEXT: blr
1336 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 3, i32 7>
1337 ret <4 x i32> %vecins
1340 define <4 x i32> @_Z7testInsILj3ELj0EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1341 ; CHECK-64-LABEL: _Z7testInsILj3ELj0EDv4_jET1_S1_S1_r:
1342 ; CHECK-64: # %bb.0: # %entry
1343 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 3
1344 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
1345 ; CHECK-64-NEXT: blr
1347 ; CHECK-32-LABEL: _Z7testInsILj3ELj0EDv4_jET1_S1_S1_r:
1348 ; CHECK-32: # %bb.0: # %entry
1349 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 3
1350 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
1351 ; CHECK-32-NEXT: blr
1353 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 0>
1354 ret <4 x i32> %vecins
1357 define <4 x i32> @_Z7testInsILj3ELj1EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1358 ; CHECK-64-LABEL: _Z7testInsILj3ELj1EDv4_jET1_S1_S1_r:
1359 ; CHECK-64: # %bb.0: # %entry
1360 ; CHECK-64-NEXT: xxinsertw 34, 35, 12
1361 ; CHECK-64-NEXT: blr
1363 ; CHECK-32-LABEL: _Z7testInsILj3ELj1EDv4_jET1_S1_S1_r:
1364 ; CHECK-32: # %bb.0: # %entry
1365 ; CHECK-32-NEXT: xxinsertw 34, 35, 12
1366 ; CHECK-32-NEXT: blr
1368 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 1>
1369 ret <4 x i32> %vecins
1372 define <4 x i32> @_Z7testInsILj3ELj2EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1373 ; CHECK-64-LABEL: _Z7testInsILj3ELj2EDv4_jET1_S1_S1_r:
1374 ; CHECK-64: # %bb.0: # %entry
1375 ; CHECK-64-NEXT: xxsldwi 0, 35, 35, 1
1376 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
1377 ; CHECK-64-NEXT: blr
1379 ; CHECK-32-LABEL: _Z7testInsILj3ELj2EDv4_jET1_S1_S1_r:
1380 ; CHECK-32: # %bb.0: # %entry
1381 ; CHECK-32-NEXT: xxsldwi 0, 35, 35, 1
1382 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
1383 ; CHECK-32-NEXT: blr
1385 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 2>
1386 ret <4 x i32> %vecins
1389 define <4 x i32> @_Z7testInsILj3ELj3EDv4_jET1_S1_S1_r(<4 x i32> %a, <4 x i32> %b) {
1390 ; CHECK-64-LABEL: _Z7testInsILj3ELj3EDv4_jET1_S1_S1_r:
1391 ; CHECK-64: # %bb.0: # %entry
1392 ; CHECK-64-NEXT: xxswapd 0, 35
1393 ; CHECK-64-NEXT: xxinsertw 34, 0, 12
1394 ; CHECK-64-NEXT: blr
1396 ; CHECK-32-LABEL: _Z7testInsILj3ELj3EDv4_jET1_S1_S1_r:
1397 ; CHECK-32: # %bb.0: # %entry
1398 ; CHECK-32-NEXT: xxswapd 0, 35
1399 ; CHECK-32-NEXT: xxinsertw 34, 0, 12
1400 ; CHECK-32-NEXT: blr
1402 %vecins = shufflevector <4 x i32> %b, <4 x i32> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 3>
1403 ret <4 x i32> %vecins
1405 define <4 x float> @testSameVecEl0BE(<4 x float> %a) {
1406 ; CHECK-64-LABEL: testSameVecEl0BE:
1407 ; CHECK-64: # %bb.0: # %entry
1408 ; CHECK-64-NEXT: xxinsertw 34, 34, 0
1409 ; CHECK-64-NEXT: blr
1411 ; CHECK-32-LABEL: testSameVecEl0BE:
1412 ; CHECK-32: # %bb.0: # %entry
1413 ; CHECK-32-NEXT: xxinsertw 34, 34, 0
1414 ; CHECK-32-NEXT: blr
1416 %vecins = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 5, i32 1, i32 2, i32 3>
1417 ret <4 x float> %vecins
1419 define <4 x float> @testSameVecEl2BE(<4 x float> %a) {
1420 ; CHECK-64-LABEL: testSameVecEl2BE:
1421 ; CHECK-64: # %bb.0: # %entry
1422 ; CHECK-64-NEXT: xxinsertw 34, 34, 8
1423 ; CHECK-64-NEXT: blr
1425 ; CHECK-32-LABEL: testSameVecEl2BE:
1426 ; CHECK-32: # %bb.0: # %entry
1427 ; CHECK-32-NEXT: xxinsertw 34, 34, 8
1428 ; CHECK-32-NEXT: blr
1430 %vecins = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 0, i32 1, i32 5, i32 3>
1431 ret <4 x float> %vecins
1433 define <4 x float> @testSameVecEl3BE(<4 x float> %a) {
1434 ; CHECK-64-LABEL: testSameVecEl3BE:
1435 ; CHECK-64: # %bb.0: # %entry
1436 ; CHECK-64-NEXT: xxinsertw 34, 34, 12
1437 ; CHECK-64-NEXT: blr
1439 ; CHECK-32-LABEL: testSameVecEl3BE:
1440 ; CHECK-32: # %bb.0: # %entry
1441 ; CHECK-32-NEXT: xxinsertw 34, 34, 12
1442 ; CHECK-32-NEXT: blr
1444 %vecins = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 5>
1445 ret <4 x float> %vecins
1447 define <4 x float> @testSameVecEl0LE(<4 x float> %a) {
1448 ; CHECK-64-LABEL: testSameVecEl0LE:
1449 ; CHECK-64: # %bb.0: # %entry
1450 ; CHECK-64-NEXT: xxspltw 0, 34, 2
1451 ; CHECK-64-NEXT: xxsldwi 0, 34, 0, 1
1452 ; CHECK-64-NEXT: xxsldwi 34, 0, 0, 3
1453 ; CHECK-64-NEXT: blr
1455 ; CHECK-32-LABEL: testSameVecEl0LE:
1456 ; CHECK-32: # %bb.0: # %entry
1457 ; CHECK-32-NEXT: xxspltw 0, 34, 2
1458 ; CHECK-32-NEXT: xxsldwi 0, 34, 0, 1
1459 ; CHECK-32-NEXT: xxsldwi 34, 0, 0, 3
1460 ; CHECK-32-NEXT: blr
1462 %vecins = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 6, i32 1, i32 2, i32 3>
1463 ret <4 x float> %vecins
1465 define <4 x float> @testSameVecEl1LE(<4 x float> %a) {
1466 ; CHECK-64-LABEL: testSameVecEl1LE:
1467 ; CHECK-64: # %bb.0: # %entry
1468 ; CHECK-64-NEXT: xxswapd 35, 34
1469 ; CHECK-64-NEXT: vmrghw 2, 2, 3
1470 ; CHECK-64-NEXT: vmrghw 2, 2, 3
1471 ; CHECK-64-NEXT: blr
1473 ; CHECK-32-LABEL: testSameVecEl1LE:
1474 ; CHECK-32: # %bb.0: # %entry
1475 ; CHECK-32-NEXT: xxswapd 35, 34
1476 ; CHECK-32-NEXT: vmrghw 2, 2, 3
1477 ; CHECK-32-NEXT: vmrghw 2, 2, 3
1478 ; CHECK-32-NEXT: blr
1480 %vecins = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 0, i32 6, i32 2, i32 3>
1481 ret <4 x float> %vecins
1483 define <4 x float> @testSameVecEl3LE(<4 x float> %a) {
1484 ; CHECK-64-LABEL: testSameVecEl3LE:
1485 ; CHECK-64: # %bb.0: # %entry
1486 ; CHECK-64-NEXT: xxspltw 0, 34, 2
1487 ; CHECK-64-NEXT: xxswapd 1, 34
1488 ; CHECK-64-NEXT: xxsldwi 34, 1, 0, 2
1489 ; CHECK-64-NEXT: blr
1491 ; CHECK-32-LABEL: testSameVecEl3LE:
1492 ; CHECK-32: # %bb.0: # %entry
1493 ; CHECK-32-NEXT: xxspltw 0, 34, 2
1494 ; CHECK-32-NEXT: xxswapd 1, 34
1495 ; CHECK-32-NEXT: xxsldwi 34, 1, 0, 2
1496 ; CHECK-32-NEXT: blr
1498 %vecins = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 6>
1499 ret <4 x float> %vecins
1501 define <4 x float> @insertVarF(<4 x float> %a, float %f, i32 %el) {
1502 ; CHECK-64-LABEL: insertVarF:
1503 ; CHECK-64: # %bb.0: # %entry
1504 ; CHECK-64-NEXT: rlwinm 3, 4, 2, 28, 29
1505 ; CHECK-64-NEXT: addi 4, 1, -16
1506 ; CHECK-64-NEXT: stxv 34, -16(1)
1507 ; CHECK-64-NEXT: stfsx 1, 4, 3
1508 ; CHECK-64-NEXT: lxv 34, -16(1)
1509 ; CHECK-64-NEXT: blr
1511 ; CHECK-32-LABEL: insertVarF:
1512 ; CHECK-32: # %bb.0: # %entry
1513 ; CHECK-32-NEXT: rlwinm 3, 4, 2, 28, 29
1514 ; CHECK-32-NEXT: addi 4, 1, -16
1515 ; CHECK-32-NEXT: stxv 34, -16(1)
1516 ; CHECK-32-NEXT: stfsx 1, 4, 3
1517 ; CHECK-32-NEXT: lxv 34, -16(1)
1518 ; CHECK-32-NEXT: blr
1520 %vecins = insertelement <4 x float> %a, float %f, i32 %el
1521 ret <4 x float> %vecins
1523 define <4 x i32> @insertVarI(<4 x i32> %a, i32 %i, i32 %el) {
1524 ; CHECK-64-LABEL: insertVarI:
1525 ; CHECK-64: # %bb.0: # %entry
1526 ; CHECK-64-NEXT: addi 5, 1, -16
1527 ; CHECK-64-NEXT: rlwinm 4, 4, 2, 28, 29
1528 ; CHECK-64-NEXT: stxv 34, -16(1)
1529 ; CHECK-64-NEXT: stwx 3, 5, 4
1530 ; CHECK-64-NEXT: lxv 34, -16(1)
1531 ; CHECK-64-NEXT: blr
1533 ; CHECK-32-LABEL: insertVarI:
1534 ; CHECK-32: # %bb.0: # %entry
1535 ; CHECK-32-NEXT: addi 5, 1, -16
1536 ; CHECK-32-NEXT: rlwinm 4, 4, 2, 28, 29
1537 ; CHECK-32-NEXT: stxv 34, -16(1)
1538 ; CHECK-32-NEXT: stwx 3, 5, 4
1539 ; CHECK-32-NEXT: lxv 34, -16(1)
1540 ; CHECK-32-NEXT: blr
1542 %vecins = insertelement <4 x i32> %a, i32 %i, i32 %el
1543 ret <4 x i32> %vecins
1545 define <4 x i32> @intrinsicInsertTest(<4 x i32> %a, <2 x i64> %b) {
1546 ; CHECK-64-LABEL: intrinsicInsertTest:
1547 ; CHECK-64: # %bb.0: # %entry
1548 ; CHECK-64-NEXT: xxinsertw 34, 35, 3
1549 ; CHECK-64-NEXT: blr
1551 ; CHECK-32-LABEL: intrinsicInsertTest:
1552 ; CHECK-32: # %bb.0: # %entry
1553 ; CHECK-32-NEXT: xxinsertw 34, 35, 3
1554 ; CHECK-32-NEXT: blr
1556 %ans = tail call <4 x i32> @llvm.ppc.vsx.xxinsertw(<4 x i32> %a, <2 x i64> %b, i32 3)
1559 declare <4 x i32> @llvm.ppc.vsx.xxinsertw(<4 x i32>, <2 x i64>, i32)
1560 define <2 x i64> @intrinsicExtractTest(<2 x i64> %a) {
1561 ; CHECK-64-LABEL: intrinsicExtractTest:
1562 ; CHECK-64: # %bb.0: # %entry
1563 ; CHECK-64-NEXT: xxextractuw 34, 34, 5
1564 ; CHECK-64-NEXT: blr
1566 ; CHECK-32-LABEL: intrinsicExtractTest:
1567 ; CHECK-32: # %bb.0: # %entry
1568 ; CHECK-32-NEXT: xxextractuw 34, 34, 5
1569 ; CHECK-32-NEXT: blr
1571 %ans = tail call <2 x i64> @llvm.ppc.vsx.xxextractuw(<2 x i64> %a, i32 5)
1574 declare <2 x i64> @llvm.ppc.vsx.xxextractuw(<2 x i64>, i32)