1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
3 ; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P9LE
4 ; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
5 ; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P9BE
6 ; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
7 ; RUN: -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P8LE
8 ; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
9 ; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=P8BE
11 ; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
12 ; RUN: -mtriple=powerpc64-ibm-aix-xcoff< %s | FileCheck %s \
13 ; RUN: --check-prefixes=AIX,P9-AIX,P9-AIX-64
14 ; RUN: llc -mcpu=pwr9 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
15 ; RUN: -mtriple=powerpc-ibm-aix-xcoff < %s | FileCheck %s \
16 ; RUN: --check-prefixes=AIX,P9-AIX,P9-AIX-32
17 ; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
18 ; RUN: -mtriple=powerpc64-ibm-aix-xcoff < %s | FileCheck %s \
19 ; RUN: --check-prefixes=AIX,P8-AIX-64
20 ; RUN: llc -mcpu=pwr8 -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names \
21 ; RUN: -mtriple=powerpc-ibm-aix-xcoff < %s | FileCheck %s \
22 ; RUN: --check-prefixes=AIX,P8-AIX-32
24 ; Function Attrs: norecurse nounwind readonly
25 define <4 x i32> @s2v_test1(ptr nocapture readonly %int32, <4 x i32> %vec) {
26 ; P9LE-LABEL: s2v_test1:
27 ; P9LE: # %bb.0: # %entry
28 ; P9LE-NEXT: lwz r3, 0(r3)
29 ; P9LE-NEXT: mtfprwz f0, r3
30 ; P9LE-NEXT: xxinsertw v2, vs0, 12
33 ; P9BE-LABEL: s2v_test1:
34 ; P9BE: # %bb.0: # %entry
35 ; P9BE-NEXT: lwz r3, 0(r3)
36 ; P9BE-NEXT: mtfprwz f0, r3
37 ; P9BE-NEXT: xxinsertw v2, vs0, 0
40 ; P8LE-LABEL: s2v_test1:
41 ; P8LE: # %bb.0: # %entry
42 ; P8LE-NEXT: addis r4, r2, .LCPI0_0@toc@ha
43 ; P8LE-NEXT: lxsiwzx v4, 0, r3
44 ; P8LE-NEXT: addi r4, r4, .LCPI0_0@toc@l
45 ; P8LE-NEXT: lxvd2x vs0, 0, r4
46 ; P8LE-NEXT: xxswapd v3, vs0
47 ; P8LE-NEXT: vperm v2, v2, v4, v3
50 ; P8BE-LABEL: s2v_test1:
51 ; P8BE: # %bb.0: # %entry
52 ; P8BE-NEXT: addis r4, r2, .LCPI0_0@toc@ha
53 ; P8BE-NEXT: lxsiwzx v4, 0, r3
54 ; P8BE-NEXT: addi r4, r4, .LCPI0_0@toc@l
55 ; P8BE-NEXT: lxvw4x v3, 0, r4
56 ; P8BE-NEXT: vperm v2, v4, v2, v3
59 ; P9-AIX-LABEL: s2v_test1:
60 ; P9-AIX: # %bb.0: # %entry
61 ; P9-AIX-NEXT: lwz r3, 0(r3)
62 ; P9-AIX-NEXT: mtfprwz f0, r3
63 ; P9-AIX-NEXT: xxinsertw v2, vs0, 0
66 ; P8-AIX-64-LABEL: s2v_test1:
67 ; P8-AIX-64: # %bb.0: # %entry
68 ; P8-AIX-64-NEXT: ld r4, L..C0(r2) # %const.0
69 ; P8-AIX-64-NEXT: lxsiwzx v4, 0, r3
70 ; P8-AIX-64-NEXT: lxvw4x v3, 0, r4
71 ; P8-AIX-64-NEXT: vperm v2, v4, v2, v3
74 ; P8-AIX-32-LABEL: s2v_test1:
75 ; P8-AIX-32: # %bb.0: # %entry
76 ; P8-AIX-32-NEXT: lwz r3, 0(r3)
77 ; P8-AIX-32-NEXT: stw r3, -16(r1)
78 ; P8-AIX-32-NEXT: lwz r3, L..C0(r2) # %const.0
79 ; P8-AIX-32-NEXT: lxvw4x v3, 0, r3
80 ; P8-AIX-32-NEXT: addi r3, r1, -16
81 ; P8-AIX-32-NEXT: lxvw4x v4, 0, r3
82 ; P8-AIX-32-NEXT: vperm v2, v4, v2, v3
85 %0 = load i32, ptr %int32, align 4
86 %vecins = insertelement <4 x i32> %vec, i32 %0, i32 0
90 ; Function Attrs: norecurse nounwind readonly
91 define <4 x i32> @s2v_test2(ptr nocapture readonly %int32, <4 x i32> %vec) {
92 ; P9LE-LABEL: s2v_test2:
93 ; P9LE: # %bb.0: # %entry
94 ; P9LE-NEXT: lwz r3, 4(r3)
95 ; P9LE-NEXT: mtfprwz f0, r3
96 ; P9LE-NEXT: xxinsertw v2, vs0, 12
99 ; P9BE-LABEL: s2v_test2:
100 ; P9BE: # %bb.0: # %entry
101 ; P9BE-NEXT: lwz r3, 4(r3)
102 ; P9BE-NEXT: mtfprwz f0, r3
103 ; P9BE-NEXT: xxinsertw v2, vs0, 0
106 ; P8LE-LABEL: s2v_test2:
107 ; P8LE: # %bb.0: # %entry
108 ; P8LE-NEXT: addis r4, r2, .LCPI1_0@toc@ha
109 ; P8LE-NEXT: addi r3, r3, 4
110 ; P8LE-NEXT: addi r4, r4, .LCPI1_0@toc@l
111 ; P8LE-NEXT: lxsiwzx v4, 0, r3
112 ; P8LE-NEXT: lxvd2x vs0, 0, r4
113 ; P8LE-NEXT: xxswapd v3, vs0
114 ; P8LE-NEXT: vperm v2, v2, v4, v3
117 ; P8BE-LABEL: s2v_test2:
118 ; P8BE: # %bb.0: # %entry
119 ; P8BE-NEXT: addis r4, r2, .LCPI1_0@toc@ha
120 ; P8BE-NEXT: addi r3, r3, 4
121 ; P8BE-NEXT: addi r4, r4, .LCPI1_0@toc@l
122 ; P8BE-NEXT: lxsiwzx v4, 0, r3
123 ; P8BE-NEXT: lxvw4x v3, 0, r4
124 ; P8BE-NEXT: vperm v2, v4, v2, v3
127 ; P9-AIX-LABEL: s2v_test2:
128 ; P9-AIX: # %bb.0: # %entry
129 ; P9-AIX-NEXT: lwz r3, 4(r3)
130 ; P9-AIX-NEXT: mtfprwz f0, r3
131 ; P9-AIX-NEXT: xxinsertw v2, vs0, 0
134 ; P8-AIX-64-LABEL: s2v_test2:
135 ; P8-AIX-64: # %bb.0: # %entry
136 ; P8-AIX-64-NEXT: ld r4, L..C1(r2) # %const.0
137 ; P8-AIX-64-NEXT: addi r3, r3, 4
138 ; P8-AIX-64-NEXT: lxsiwzx v4, 0, r3
139 ; P8-AIX-64-NEXT: lxvw4x v3, 0, r4
140 ; P8-AIX-64-NEXT: vperm v2, v4, v2, v3
141 ; P8-AIX-64-NEXT: blr
143 ; P8-AIX-32-LABEL: s2v_test2:
144 ; P8-AIX-32: # %bb.0: # %entry
145 ; P8-AIX-32-NEXT: lwz r3, 4(r3)
146 ; P8-AIX-32-NEXT: stw r3, -16(r1)
147 ; P8-AIX-32-NEXT: lwz r3, L..C1(r2) # %const.0
148 ; P8-AIX-32-NEXT: lxvw4x v3, 0, r3
149 ; P8-AIX-32-NEXT: addi r3, r1, -16
150 ; P8-AIX-32-NEXT: lxvw4x v4, 0, r3
151 ; P8-AIX-32-NEXT: vperm v2, v4, v2, v3
152 ; P8-AIX-32-NEXT: blr
154 %arrayidx = getelementptr inbounds i32, ptr %int32, i64 1
155 %0 = load i32, ptr %arrayidx, align 4
156 %vecins = insertelement <4 x i32> %vec, i32 %0, i32 0
157 ret <4 x i32> %vecins
160 ; Function Attrs: norecurse nounwind readonly
161 define <4 x i32> @s2v_test3(ptr nocapture readonly %int32, <4 x i32> %vec, i32 signext %Idx) {
162 ; P9LE-LABEL: s2v_test3:
163 ; P9LE: # %bb.0: # %entry
164 ; P9LE-NEXT: sldi r4, r7, 2
165 ; P9LE-NEXT: lwzx r3, r3, r4
166 ; P9LE-NEXT: mtfprwz f0, r3
167 ; P9LE-NEXT: xxinsertw v2, vs0, 12
170 ; P9BE-LABEL: s2v_test3:
171 ; P9BE: # %bb.0: # %entry
172 ; P9BE-NEXT: sldi r4, r7, 2
173 ; P9BE-NEXT: lwzx r3, r3, r4
174 ; P9BE-NEXT: mtfprwz f0, r3
175 ; P9BE-NEXT: xxinsertw v2, vs0, 0
178 ; P8LE-LABEL: s2v_test3:
179 ; P8LE: # %bb.0: # %entry
180 ; P8LE-NEXT: addis r4, r2, .LCPI2_0@toc@ha
181 ; P8LE-NEXT: addi r4, r4, .LCPI2_0@toc@l
182 ; P8LE-NEXT: lxvd2x vs0, 0, r4
183 ; P8LE-NEXT: sldi r4, r7, 2
184 ; P8LE-NEXT: lxsiwzx v4, r3, r4
185 ; P8LE-NEXT: xxswapd v3, vs0
186 ; P8LE-NEXT: vperm v2, v2, v4, v3
189 ; P8BE-LABEL: s2v_test3:
190 ; P8BE: # %bb.0: # %entry
191 ; P8BE-NEXT: sldi r4, r7, 2
192 ; P8BE-NEXT: lxsiwzx v3, r3, r4
193 ; P8BE-NEXT: addis r3, r2, .LCPI2_0@toc@ha
194 ; P8BE-NEXT: addi r3, r3, .LCPI2_0@toc@l
195 ; P8BE-NEXT: lxvw4x v4, 0, r3
196 ; P8BE-NEXT: vperm v2, v3, v2, v4
199 ; P9-AIX-64-LABEL: s2v_test3:
200 ; P9-AIX-64: # %bb.0: # %entry
201 ; P9-AIX-64-NEXT: sldi r4, r4, 2
202 ; P9-AIX-64-NEXT: lwzx r3, r3, r4
203 ; P9-AIX-64-NEXT: mtfprwz f0, r3
204 ; P9-AIX-64-NEXT: xxinsertw v2, vs0, 0
205 ; P9-AIX-64-NEXT: blr
207 ; P9-AIX-32-LABEL: s2v_test3:
208 ; P9-AIX-32: # %bb.0: # %entry
209 ; P9-AIX-32-NEXT: slwi r4, r4, 2
210 ; P9-AIX-32-NEXT: lwzx r3, r3, r4
211 ; P9-AIX-32-NEXT: mtfprwz f0, r3
212 ; P9-AIX-32-NEXT: xxinsertw v2, vs0, 0
213 ; P9-AIX-32-NEXT: blr
215 ; P8-AIX-64-LABEL: s2v_test3:
216 ; P8-AIX-64: # %bb.0: # %entry
217 ; P8-AIX-64-NEXT: sldi r4, r4, 2
218 ; P8-AIX-64-NEXT: lxsiwzx v3, r3, r4
219 ; P8-AIX-64-NEXT: ld r3, L..C2(r2) # %const.0
220 ; P8-AIX-64-NEXT: lxvw4x v4, 0, r3
221 ; P8-AIX-64-NEXT: vperm v2, v3, v2, v4
222 ; P8-AIX-64-NEXT: blr
224 ; P8-AIX-32-LABEL: s2v_test3:
225 ; P8-AIX-32: # %bb.0: # %entry
226 ; P8-AIX-32-NEXT: slwi r4, r4, 2
227 ; P8-AIX-32-NEXT: lwzx r3, r3, r4
228 ; P8-AIX-32-NEXT: stw r3, -16(r1)
229 ; P8-AIX-32-NEXT: lwz r3, L..C2(r2) # %const.0
230 ; P8-AIX-32-NEXT: lxvw4x v3, 0, r3
231 ; P8-AIX-32-NEXT: addi r3, r1, -16
232 ; P8-AIX-32-NEXT: lxvw4x v4, 0, r3
233 ; P8-AIX-32-NEXT: vperm v2, v4, v2, v3
234 ; P8-AIX-32-NEXT: blr
236 %idxprom = sext i32 %Idx to i64
237 %arrayidx = getelementptr inbounds i32, ptr %int32, i64 %idxprom
238 %0 = load i32, ptr %arrayidx, align 4
239 %vecins = insertelement <4 x i32> %vec, i32 %0, i32 0
240 ret <4 x i32> %vecins
243 ; Function Attrs: norecurse nounwind readonly
244 define <4 x i32> @s2v_test4(ptr nocapture readonly %int32, <4 x i32> %vec) {
245 ; P9LE-LABEL: s2v_test4:
246 ; P9LE: # %bb.0: # %entry
247 ; P9LE-NEXT: lwz r3, 4(r3)
248 ; P9LE-NEXT: mtfprwz f0, r3
249 ; P9LE-NEXT: xxinsertw v2, vs0, 12
252 ; P9BE-LABEL: s2v_test4:
253 ; P9BE: # %bb.0: # %entry
254 ; P9BE-NEXT: lwz r3, 4(r3)
255 ; P9BE-NEXT: mtfprwz f0, r3
256 ; P9BE-NEXT: xxinsertw v2, vs0, 0
259 ; P8LE-LABEL: s2v_test4:
260 ; P8LE: # %bb.0: # %entry
261 ; P8LE-NEXT: addis r4, r2, .LCPI3_0@toc@ha
262 ; P8LE-NEXT: addi r3, r3, 4
263 ; P8LE-NEXT: addi r4, r4, .LCPI3_0@toc@l
264 ; P8LE-NEXT: lxsiwzx v4, 0, r3
265 ; P8LE-NEXT: lxvd2x vs0, 0, r4
266 ; P8LE-NEXT: xxswapd v3, vs0
267 ; P8LE-NEXT: vperm v2, v2, v4, v3
270 ; P8BE-LABEL: s2v_test4:
271 ; P8BE: # %bb.0: # %entry
272 ; P8BE-NEXT: addis r4, r2, .LCPI3_0@toc@ha
273 ; P8BE-NEXT: addi r3, r3, 4
274 ; P8BE-NEXT: addi r4, r4, .LCPI3_0@toc@l
275 ; P8BE-NEXT: lxsiwzx v4, 0, r3
276 ; P8BE-NEXT: lxvw4x v3, 0, r4
277 ; P8BE-NEXT: vperm v2, v4, v2, v3
280 ; P9-AIX-LABEL: s2v_test4:
281 ; P9-AIX: # %bb.0: # %entry
282 ; P9-AIX-NEXT: lwz r3, 4(r3)
283 ; P9-AIX-NEXT: mtfprwz f0, r3
284 ; P9-AIX-NEXT: xxinsertw v2, vs0, 0
287 ; P8-AIX-64-LABEL: s2v_test4:
288 ; P8-AIX-64: # %bb.0: # %entry
289 ; P8-AIX-64-NEXT: ld r4, L..C3(r2) # %const.0
290 ; P8-AIX-64-NEXT: addi r3, r3, 4
291 ; P8-AIX-64-NEXT: lxsiwzx v4, 0, r3
292 ; P8-AIX-64-NEXT: lxvw4x v3, 0, r4
293 ; P8-AIX-64-NEXT: vperm v2, v4, v2, v3
294 ; P8-AIX-64-NEXT: blr
296 ; P8-AIX-32-LABEL: s2v_test4:
297 ; P8-AIX-32: # %bb.0: # %entry
298 ; P8-AIX-32-NEXT: lwz r3, 4(r3)
299 ; P8-AIX-32-NEXT: stw r3, -16(r1)
300 ; P8-AIX-32-NEXT: lwz r3, L..C3(r2) # %const.0
301 ; P8-AIX-32-NEXT: lxvw4x v3, 0, r3
302 ; P8-AIX-32-NEXT: addi r3, r1, -16
303 ; P8-AIX-32-NEXT: lxvw4x v4, 0, r3
304 ; P8-AIX-32-NEXT: vperm v2, v4, v2, v3
305 ; P8-AIX-32-NEXT: blr
307 %arrayidx = getelementptr inbounds i32, ptr %int32, i64 1
308 %0 = load i32, ptr %arrayidx, align 4
309 %vecins = insertelement <4 x i32> %vec, i32 %0, i32 0
310 ret <4 x i32> %vecins
313 ; Function Attrs: norecurse nounwind readonly
314 define <4 x i32> @s2v_test5(<4 x i32> %vec, ptr nocapture readonly %ptr1) {
315 ; P9LE-LABEL: s2v_test5:
316 ; P9LE: # %bb.0: # %entry
317 ; P9LE-NEXT: lwz r3, 0(r5)
318 ; P9LE-NEXT: mtfprwz f0, r3
319 ; P9LE-NEXT: xxinsertw v2, vs0, 12
322 ; P9BE-LABEL: s2v_test5:
323 ; P9BE: # %bb.0: # %entry
324 ; P9BE-NEXT: lwz r3, 0(r5)
325 ; P9BE-NEXT: mtfprwz f0, r3
326 ; P9BE-NEXT: xxinsertw v2, vs0, 0
329 ; P8LE-LABEL: s2v_test5:
330 ; P8LE: # %bb.0: # %entry
331 ; P8LE-NEXT: addis r3, r2, .LCPI4_0@toc@ha
332 ; P8LE-NEXT: lxsiwzx v4, 0, r5
333 ; P8LE-NEXT: addi r3, r3, .LCPI4_0@toc@l
334 ; P8LE-NEXT: lxvd2x vs0, 0, r3
335 ; P8LE-NEXT: xxswapd v3, vs0
336 ; P8LE-NEXT: vperm v2, v2, v4, v3
339 ; P8BE-LABEL: s2v_test5:
340 ; P8BE: # %bb.0: # %entry
341 ; P8BE-NEXT: addis r3, r2, .LCPI4_0@toc@ha
342 ; P8BE-NEXT: lxsiwzx v4, 0, r5
343 ; P8BE-NEXT: addi r3, r3, .LCPI4_0@toc@l
344 ; P8BE-NEXT: lxvw4x v3, 0, r3
345 ; P8BE-NEXT: vperm v2, v4, v2, v3
348 ; P9-AIX-LABEL: s2v_test5:
349 ; P9-AIX: # %bb.0: # %entry
350 ; P9-AIX-NEXT: lwz r3, 0(r3)
351 ; P9-AIX-NEXT: mtfprwz f0, r3
352 ; P9-AIX-NEXT: xxinsertw v2, vs0, 0
355 ; P8-AIX-64-LABEL: s2v_test5:
356 ; P8-AIX-64: # %bb.0: # %entry
357 ; P8-AIX-64-NEXT: ld r4, L..C4(r2) # %const.0
358 ; P8-AIX-64-NEXT: lxsiwzx v4, 0, r3
359 ; P8-AIX-64-NEXT: lxvw4x v3, 0, r4
360 ; P8-AIX-64-NEXT: vperm v2, v4, v2, v3
361 ; P8-AIX-64-NEXT: blr
363 ; P8-AIX-32-LABEL: s2v_test5:
364 ; P8-AIX-32: # %bb.0: # %entry
365 ; P8-AIX-32-NEXT: lwz r3, 0(r3)
366 ; P8-AIX-32-NEXT: stw r3, -16(r1)
367 ; P8-AIX-32-NEXT: lwz r3, L..C4(r2) # %const.0
368 ; P8-AIX-32-NEXT: lxvw4x v3, 0, r3
369 ; P8-AIX-32-NEXT: addi r3, r1, -16
370 ; P8-AIX-32-NEXT: lxvw4x v4, 0, r3
371 ; P8-AIX-32-NEXT: vperm v2, v4, v2, v3
372 ; P8-AIX-32-NEXT: blr
374 %0 = load i32, ptr %ptr1, align 4
375 %vecins = insertelement <4 x i32> %vec, i32 %0, i32 0
376 ret <4 x i32> %vecins
379 ; Function Attrs: norecurse nounwind readonly
380 define <4 x float> @s2v_test_f1(ptr nocapture readonly %f64, <4 x float> %vec) {
381 ; P9LE-LABEL: s2v_test_f1:
382 ; P9LE: # %bb.0: # %entry
383 ; P9LE-NEXT: lwz r3, 0(r3)
384 ; P9LE-NEXT: mtfprwz f0, r3
385 ; P9LE-NEXT: xxinsertw v2, vs0, 12
388 ; P9BE-LABEL: s2v_test_f1:
389 ; P9BE: # %bb.0: # %entry
390 ; P9BE-NEXT: lwz r3, 0(r3)
391 ; P9BE-NEXT: mtfprwz f0, r3
392 ; P9BE-NEXT: xxinsertw v2, vs0, 0
395 ; P8LE-LABEL: s2v_test_f1:
396 ; P8LE: # %bb.0: # %entry
397 ; P8LE-NEXT: addis r4, r2, .LCPI5_0@toc@ha
398 ; P8LE-NEXT: lxsiwzx v4, 0, r3
399 ; P8LE-NEXT: addi r4, r4, .LCPI5_0@toc@l
400 ; P8LE-NEXT: lxvd2x vs0, 0, r4
401 ; P8LE-NEXT: xxswapd v3, vs0
402 ; P8LE-NEXT: vperm v2, v2, v4, v3
405 ; P8BE-LABEL: s2v_test_f1:
406 ; P8BE: # %bb.0: # %entry
407 ; P8BE-NEXT: addis r4, r2, .LCPI5_0@toc@ha
408 ; P8BE-NEXT: lxsiwzx v4, 0, r3
409 ; P8BE-NEXT: addi r4, r4, .LCPI5_0@toc@l
410 ; P8BE-NEXT: lxvw4x v3, 0, r4
411 ; P8BE-NEXT: vperm v2, v4, v2, v3
414 ; P9-AIX-LABEL: s2v_test_f1:
415 ; P9-AIX: # %bb.0: # %entry
416 ; P9-AIX-NEXT: lwz r3, 0(r3)
417 ; P9-AIX-NEXT: mtfprwz f0, r3
418 ; P9-AIX-NEXT: xxinsertw v2, vs0, 0
421 ; P8-AIX-64-LABEL: s2v_test_f1:
422 ; P8-AIX-64: # %bb.0: # %entry
423 ; P8-AIX-64-NEXT: ld r4, L..C5(r2) # %const.0
424 ; P8-AIX-64-NEXT: lxsiwzx v4, 0, r3
425 ; P8-AIX-64-NEXT: lxvw4x v3, 0, r4
426 ; P8-AIX-64-NEXT: vperm v2, v4, v2, v3
427 ; P8-AIX-64-NEXT: blr
429 ; P8-AIX-32-LABEL: s2v_test_f1:
430 ; P8-AIX-32: # %bb.0: # %entry
431 ; P8-AIX-32-NEXT: lwz r4, L..C5(r2) # %const.0
432 ; P8-AIX-32-NEXT: lxsiwzx v4, 0, r3
433 ; P8-AIX-32-NEXT: lxvw4x v3, 0, r4
434 ; P8-AIX-32-NEXT: vperm v2, v4, v2, v3
435 ; P8-AIX-32-NEXT: blr
437 %0 = load float, ptr %f64, align 4
438 %vecins = insertelement <4 x float> %vec, float %0, i32 0
439 ret <4 x float> %vecins
442 ; Function Attrs: norecurse nounwind readonly
443 define <2 x float> @s2v_test_f2(ptr nocapture readonly %f64, <2 x float> %vec) {
444 ; P9LE-LABEL: s2v_test_f2:
445 ; P9LE: # %bb.0: # %entry
446 ; P9LE-NEXT: addi r3, r3, 4
447 ; P9LE-NEXT: xxmrglw vs1, v2, v2
448 ; P9LE-NEXT: lfiwzx f0, 0, r3
449 ; P9LE-NEXT: xxmrghw v2, vs1, vs0
452 ; P9BE-LABEL: s2v_test_f2:
453 ; P9BE: # %bb.0: # %entry
454 ; P9BE-NEXT: addi r3, r3, 4
455 ; P9BE-NEXT: lxsiwzx v3, 0, r3
456 ; P9BE-NEXT: vmrgow v2, v3, v2
459 ; P8LE-LABEL: s2v_test_f2:
460 ; P8LE: # %bb.0: # %entry
461 ; P8LE-NEXT: addi r3, r3, 4
462 ; P8LE-NEXT: xxmrglw vs0, v2, v2
463 ; P8LE-NEXT: lfiwzx f1, 0, r3
464 ; P8LE-NEXT: xxmrghw v2, vs0, vs1
467 ; P8BE-LABEL: s2v_test_f2:
468 ; P8BE: # %bb.0: # %entry
469 ; P8BE-NEXT: addi r3, r3, 4
470 ; P8BE-NEXT: lxsiwzx v3, 0, r3
471 ; P8BE-NEXT: vmrgow v2, v3, v2
474 ; AIX-LABEL: s2v_test_f2:
475 ; AIX: # %bb.0: # %entry
476 ; AIX-NEXT: addi r3, r3, 4
477 ; AIX-NEXT: lxsiwzx v3, 0, r3
478 ; AIX-NEXT: vmrgow v2, v3, v2
481 %arrayidx = getelementptr inbounds float, ptr %f64, i64 1
482 %0 = load float, ptr %arrayidx, align 8
483 %vecins = insertelement <2 x float> %vec, float %0, i32 0
484 ret <2 x float> %vecins
487 ; Function Attrs: norecurse nounwind readonly
488 define <2 x float> @s2v_test_f3(ptr nocapture readonly %f64, <2 x float> %vec, i32 signext %Idx) {
489 ; P9LE-LABEL: s2v_test_f3:
490 ; P9LE: # %bb.0: # %entry
491 ; P9LE-NEXT: sldi r4, r7, 2
492 ; P9LE-NEXT: xxmrglw vs1, v2, v2
493 ; P9LE-NEXT: lfiwzx f0, r3, r4
494 ; P9LE-NEXT: xxmrghw v2, vs1, vs0
497 ; P9BE-LABEL: s2v_test_f3:
498 ; P9BE: # %bb.0: # %entry
499 ; P9BE-NEXT: sldi r4, r7, 2
500 ; P9BE-NEXT: lxsiwzx v3, r3, r4
501 ; P9BE-NEXT: vmrgow v2, v3, v2
504 ; P8LE-LABEL: s2v_test_f3:
505 ; P8LE: # %bb.0: # %entry
506 ; P8LE-NEXT: sldi r4, r7, 2
507 ; P8LE-NEXT: xxmrglw vs0, v2, v2
508 ; P8LE-NEXT: lfiwzx f1, r3, r4
509 ; P8LE-NEXT: xxmrghw v2, vs0, vs1
512 ; P8BE-LABEL: s2v_test_f3:
513 ; P8BE: # %bb.0: # %entry
514 ; P8BE-NEXT: sldi r4, r7, 2
515 ; P8BE-NEXT: lxsiwzx v3, r3, r4
516 ; P8BE-NEXT: vmrgow v2, v3, v2
519 ; P9-AIX-64-LABEL: s2v_test_f3:
520 ; P9-AIX-64: # %bb.0: # %entry
521 ; P9-AIX-64-NEXT: sldi r4, r4, 2
522 ; P9-AIX-64-NEXT: lxsiwzx v3, r3, r4
523 ; P9-AIX-64-NEXT: vmrgow v2, v3, v2
524 ; P9-AIX-64-NEXT: blr
526 ; P9-AIX-32-LABEL: s2v_test_f3:
527 ; P9-AIX-32: # %bb.0: # %entry
528 ; P9-AIX-32-NEXT: slwi r4, r4, 2
529 ; P9-AIX-32-NEXT: lxsiwzx v3, r3, r4
530 ; P9-AIX-32-NEXT: vmrgow v2, v3, v2
531 ; P9-AIX-32-NEXT: blr
533 ; P8-AIX-64-LABEL: s2v_test_f3:
534 ; P8-AIX-64: # %bb.0: # %entry
535 ; P8-AIX-64-NEXT: sldi r4, r4, 2
536 ; P8-AIX-64-NEXT: lxsiwzx v3, r3, r4
537 ; P8-AIX-64-NEXT: vmrgow v2, v3, v2
538 ; P8-AIX-64-NEXT: blr
540 ; P8-AIX-32-LABEL: s2v_test_f3:
541 ; P8-AIX-32: # %bb.0: # %entry
542 ; P8-AIX-32-NEXT: slwi r4, r4, 2
543 ; P8-AIX-32-NEXT: lxsiwzx v3, r3, r4
544 ; P8-AIX-32-NEXT: vmrgow v2, v3, v2
545 ; P8-AIX-32-NEXT: blr
547 %idxprom = sext i32 %Idx to i64
548 %arrayidx = getelementptr inbounds float, ptr %f64, i64 %idxprom
549 %0 = load float, ptr %arrayidx, align 8
550 %vecins = insertelement <2 x float> %vec, float %0, i32 0
551 ret <2 x float> %vecins
554 ; Function Attrs: norecurse nounwind readonly
555 define <2 x float> @s2v_test_f4(ptr nocapture readonly %f64, <2 x float> %vec) {
556 ; P9LE-LABEL: s2v_test_f4:
557 ; P9LE: # %bb.0: # %entry
558 ; P9LE-NEXT: addi r3, r3, 4
559 ; P9LE-NEXT: xxmrglw vs1, v2, v2
560 ; P9LE-NEXT: lfiwzx f0, 0, r3
561 ; P9LE-NEXT: xxmrghw v2, vs1, vs0
564 ; P9BE-LABEL: s2v_test_f4:
565 ; P9BE: # %bb.0: # %entry
566 ; P9BE-NEXT: addi r3, r3, 4
567 ; P9BE-NEXT: lxsiwzx v3, 0, r3
568 ; P9BE-NEXT: vmrgow v2, v3, v2
571 ; P8LE-LABEL: s2v_test_f4:
572 ; P8LE: # %bb.0: # %entry
573 ; P8LE-NEXT: addi r3, r3, 4
574 ; P8LE-NEXT: xxmrglw vs0, v2, v2
575 ; P8LE-NEXT: lfiwzx f1, 0, r3
576 ; P8LE-NEXT: xxmrghw v2, vs0, vs1
579 ; P8BE-LABEL: s2v_test_f4:
580 ; P8BE: # %bb.0: # %entry
581 ; P8BE-NEXT: addi r3, r3, 4
582 ; P8BE-NEXT: lxsiwzx v3, 0, r3
583 ; P8BE-NEXT: vmrgow v2, v3, v2
586 ; AIX-LABEL: s2v_test_f4:
587 ; AIX: # %bb.0: # %entry
588 ; AIX-NEXT: addi r3, r3, 4
589 ; AIX-NEXT: lxsiwzx v3, 0, r3
590 ; AIX-NEXT: vmrgow v2, v3, v2
593 %arrayidx = getelementptr inbounds float, ptr %f64, i64 1
594 %0 = load float, ptr %arrayidx, align 8
595 %vecins = insertelement <2 x float> %vec, float %0, i32 0
596 ret <2 x float> %vecins
599 ; Function Attrs: norecurse nounwind readonly
600 define <2 x float> @s2v_test_f5(<2 x float> %vec, ptr nocapture readonly %ptr1) {
601 ; P9LE-LABEL: s2v_test_f5:
602 ; P9LE: # %bb.0: # %entry
603 ; P9LE-NEXT: lfiwzx f0, 0, r5
604 ; P9LE-NEXT: xxmrglw vs1, v2, v2
605 ; P9LE-NEXT: xxmrghw v2, vs1, vs0
608 ; P9BE-LABEL: s2v_test_f5:
609 ; P9BE: # %bb.0: # %entry
610 ; P9BE-NEXT: lxsiwzx v3, 0, r5
611 ; P9BE-NEXT: vmrgow v2, v3, v2
614 ; P8LE-LABEL: s2v_test_f5:
615 ; P8LE: # %bb.0: # %entry
616 ; P8LE-NEXT: lfiwzx f1, 0, r5
617 ; P8LE-NEXT: xxmrglw vs0, v2, v2
618 ; P8LE-NEXT: xxmrghw v2, vs0, vs1
621 ; P8BE-LABEL: s2v_test_f5:
622 ; P8BE: # %bb.0: # %entry
623 ; P8BE-NEXT: lxsiwzx v3, 0, r5
624 ; P8BE-NEXT: vmrgow v2, v3, v2
627 ; AIX-LABEL: s2v_test_f5:
628 ; AIX: # %bb.0: # %entry
629 ; AIX-NEXT: lxsiwzx v3, 0, r3
630 ; AIX-NEXT: vmrgow v2, v3, v2
633 %0 = load float, ptr %ptr1, align 8
634 %vecins = insertelement <2 x float> %vec, float %0, i32 0
635 ret <2 x float> %vecins