1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
4 ; RUN: FileCheck %s --check-prefix=CHECK-P8
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
6 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
7 ; RUN: FileCheck %s --check-prefix=CHECK-P9
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
9 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
10 ; RUN: FileCheck %s --check-prefix=CHECK-BE
12 define i64 @test2elt(<2 x i64> %a) local_unnamed_addr #0 {
13 ; CHECK-P8-LABEL: test2elt:
14 ; CHECK-P8: # %bb.0: # %entry
15 ; CHECK-P8-NEXT: xxswapd vs0, v2
16 ; CHECK-P8-NEXT: xscvuxdsp f1, v2
17 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
18 ; CHECK-P8-NEXT: xscvdpspn v3, f1
19 ; CHECK-P8-NEXT: xscvdpspn v2, f0
20 ; CHECK-P8-NEXT: vmrghw v2, v3, v2
21 ; CHECK-P8-NEXT: xxswapd vs0, v2
22 ; CHECK-P8-NEXT: mffprd r3, f0
25 ; CHECK-P9-LABEL: test2elt:
26 ; CHECK-P9: # %bb.0: # %entry
27 ; CHECK-P9-NEXT: xxswapd vs0, v2
28 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
29 ; CHECK-P9-NEXT: xscvdpspn v3, f0
30 ; CHECK-P9-NEXT: xscvuxdsp f0, v2
31 ; CHECK-P9-NEXT: xscvdpspn v2, f0
32 ; CHECK-P9-NEXT: vmrghw v2, v2, v3
33 ; CHECK-P9-NEXT: mfvsrld r3, v2
36 ; CHECK-BE-LABEL: test2elt:
37 ; CHECK-BE: # %bb.0: # %entry
38 ; CHECK-BE-NEXT: xxswapd vs0, v2
39 ; CHECK-BE-NEXT: xscvuxdsp f1, v2
40 ; CHECK-BE-NEXT: xscvuxdsp f0, f0
41 ; CHECK-BE-NEXT: xscvdpspn v2, f1
42 ; CHECK-BE-NEXT: xscvdpspn v3, f0
43 ; CHECK-BE-NEXT: vmrgow v2, v2, v3
44 ; CHECK-BE-NEXT: mfvsrd r3, v2
47 %0 = uitofp <2 x i64> %a to <2 x float>
48 %1 = bitcast <2 x float> %0 to i64
52 define <4 x float> @test4elt(<4 x i64>* nocapture readonly) local_unnamed_addr #1 {
53 ; CHECK-P8-LABEL: test4elt:
54 ; CHECK-P8: # %bb.0: # %entry
55 ; CHECK-P8-NEXT: li r4, 16
56 ; CHECK-P8-NEXT: lxvd2x vs1, 0, r3
57 ; CHECK-P8-NEXT: lxvd2x vs0, r3, r4
58 ; CHECK-P8-NEXT: xxswapd v3, vs1
59 ; CHECK-P8-NEXT: xxswapd v2, vs0
60 ; CHECK-P8-NEXT: xvcvuxdsp vs1, v3
61 ; CHECK-P8-NEXT: xvcvuxdsp vs0, v2
62 ; CHECK-P8-NEXT: xxsldwi v3, vs1, vs1, 3
63 ; CHECK-P8-NEXT: xxsldwi v2, vs0, vs0, 3
64 ; CHECK-P8-NEXT: vpkudum v2, v2, v3
67 ; CHECK-P9-LABEL: test4elt:
68 ; CHECK-P9: # %bb.0: # %entry
69 ; CHECK-P9-NEXT: lxv v3, 0(r3)
70 ; CHECK-P9-NEXT: lxv v2, 16(r3)
71 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v3
72 ; CHECK-P9-NEXT: xxsldwi v3, vs0, vs0, 3
73 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v2
74 ; CHECK-P9-NEXT: xxsldwi v2, vs0, vs0, 3
75 ; CHECK-P9-NEXT: vpkudum v2, v2, v3
78 ; CHECK-BE-LABEL: test4elt:
79 ; CHECK-BE: # %bb.0: # %entry
80 ; CHECK-BE-NEXT: lxv v3, 16(r3)
81 ; CHECK-BE-NEXT: lxv v2, 0(r3)
82 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v3
83 ; CHECK-BE-NEXT: xxsldwi v3, vs0, vs0, 3
84 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v2
85 ; CHECK-BE-NEXT: xxsldwi v2, vs0, vs0, 3
86 ; CHECK-BE-NEXT: vpkudum v2, v2, v3
89 %a = load <4 x i64>, <4 x i64>* %0, align 32
90 %1 = uitofp <4 x i64> %a to <4 x float>
94 define void @test8elt(<8 x float>* noalias nocapture sret(<8 x float>) %agg.result, <8 x i64>* nocapture readonly) local_unnamed_addr #2 {
95 ; CHECK-P8-LABEL: test8elt:
96 ; CHECK-P8: # %bb.0: # %entry
97 ; CHECK-P8-NEXT: li r5, 32
98 ; CHECK-P8-NEXT: li r6, 48
99 ; CHECK-P8-NEXT: lxvd2x vs3, 0, r4
100 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
101 ; CHECK-P8-NEXT: li r5, 16
102 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
103 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r5
104 ; CHECK-P8-NEXT: xxswapd v5, vs3
105 ; CHECK-P8-NEXT: xxswapd v2, vs0
106 ; CHECK-P8-NEXT: xxswapd v3, vs1
107 ; CHECK-P8-NEXT: xxswapd v4, vs2
108 ; CHECK-P8-NEXT: xvcvuxdsp vs3, v5
109 ; CHECK-P8-NEXT: xvcvuxdsp vs0, v2
110 ; CHECK-P8-NEXT: xvcvuxdsp vs1, v3
111 ; CHECK-P8-NEXT: xvcvuxdsp vs2, v4
112 ; CHECK-P8-NEXT: xxsldwi v5, vs3, vs3, 3
113 ; CHECK-P8-NEXT: xxsldwi v2, vs0, vs0, 3
114 ; CHECK-P8-NEXT: xxsldwi v3, vs1, vs1, 3
115 ; CHECK-P8-NEXT: xxsldwi v4, vs2, vs2, 3
116 ; CHECK-P8-NEXT: vpkudum v2, v3, v2
117 ; CHECK-P8-NEXT: vpkudum v3, v4, v5
118 ; CHECK-P8-NEXT: stvx v2, r3, r5
119 ; CHECK-P8-NEXT: stvx v3, 0, r3
122 ; CHECK-P9-LABEL: test8elt:
123 ; CHECK-P9: # %bb.0: # %entry
124 ; CHECK-P9-NEXT: lxv v5, 0(r4)
125 ; CHECK-P9-NEXT: lxv v4, 16(r4)
126 ; CHECK-P9-NEXT: lxv v3, 32(r4)
127 ; CHECK-P9-NEXT: lxv v2, 48(r4)
128 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v5
129 ; CHECK-P9-NEXT: xxsldwi v5, vs0, vs0, 3
130 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v4
131 ; CHECK-P9-NEXT: xxsldwi v4, vs0, vs0, 3
132 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v3
133 ; CHECK-P9-NEXT: vpkudum v3, v4, v5
134 ; CHECK-P9-NEXT: stxv v3, 0(r3)
135 ; CHECK-P9-NEXT: xxsldwi v4, vs0, vs0, 3
136 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v2
137 ; CHECK-P9-NEXT: xxsldwi v2, vs0, vs0, 3
138 ; CHECK-P9-NEXT: vpkudum v2, v2, v4
139 ; CHECK-P9-NEXT: stxv v2, 16(r3)
142 ; CHECK-BE-LABEL: test8elt:
143 ; CHECK-BE: # %bb.0: # %entry
144 ; CHECK-BE-NEXT: lxv v5, 16(r4)
145 ; CHECK-BE-NEXT: lxv v4, 0(r4)
146 ; CHECK-BE-NEXT: lxv v3, 48(r4)
147 ; CHECK-BE-NEXT: lxv v2, 32(r4)
148 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v5
149 ; CHECK-BE-NEXT: xxsldwi v5, vs0, vs0, 3
150 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v4
151 ; CHECK-BE-NEXT: xxsldwi v4, vs0, vs0, 3
152 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v3
153 ; CHECK-BE-NEXT: vpkudum v3, v4, v5
154 ; CHECK-BE-NEXT: stxv v3, 0(r3)
155 ; CHECK-BE-NEXT: xxsldwi v4, vs0, vs0, 3
156 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v2
157 ; CHECK-BE-NEXT: xxsldwi v2, vs0, vs0, 3
158 ; CHECK-BE-NEXT: vpkudum v2, v2, v4
159 ; CHECK-BE-NEXT: stxv v2, 16(r3)
162 %a = load <8 x i64>, <8 x i64>* %0, align 64
163 %1 = uitofp <8 x i64> %a to <8 x float>
164 store <8 x float> %1, <8 x float>* %agg.result, align 32
168 define void @test16elt(<16 x float>* noalias nocapture sret(<16 x float>) %agg.result, <16 x i64>* nocapture readonly) local_unnamed_addr #2 {
169 ; CHECK-P8-LABEL: test16elt:
170 ; CHECK-P8: # %bb.0: # %entry
171 ; CHECK-P8-NEXT: li r5, 32
172 ; CHECK-P8-NEXT: li r6, 48
173 ; CHECK-P8-NEXT: li r7, 64
174 ; CHECK-P8-NEXT: lxvd2x vs4, 0, r4
175 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
176 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
177 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r7
178 ; CHECK-P8-NEXT: li r7, 80
179 ; CHECK-P8-NEXT: lxvd2x vs3, r4, r7
180 ; CHECK-P8-NEXT: li r7, 96
181 ; CHECK-P8-NEXT: xxswapd v2, vs0
182 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r7
183 ; CHECK-P8-NEXT: li r7, 112
184 ; CHECK-P8-NEXT: xxswapd v3, vs1
185 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r7
186 ; CHECK-P8-NEXT: li r7, 16
187 ; CHECK-P8-NEXT: xxswapd v4, vs2
188 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r7
189 ; CHECK-P8-NEXT: xxswapd v5, vs3
190 ; CHECK-P8-NEXT: xvcvuxdsp vs3, v2
191 ; CHECK-P8-NEXT: xxswapd v2, vs0
192 ; CHECK-P8-NEXT: xvcvuxdsp vs0, v3
193 ; CHECK-P8-NEXT: xxswapd v3, vs1
194 ; CHECK-P8-NEXT: xvcvuxdsp vs1, v4
195 ; CHECK-P8-NEXT: xxswapd v4, vs2
196 ; CHECK-P8-NEXT: xvcvuxdsp vs2, v5
197 ; CHECK-P8-NEXT: xxswapd v5, vs4
198 ; CHECK-P8-NEXT: xvcvuxdsp vs4, v2
199 ; CHECK-P8-NEXT: xvcvuxdsp vs5, v3
200 ; CHECK-P8-NEXT: xvcvuxdsp vs6, v4
201 ; CHECK-P8-NEXT: xxsldwi v2, vs3, vs3, 3
202 ; CHECK-P8-NEXT: xvcvuxdsp vs7, v5
203 ; CHECK-P8-NEXT: xxsldwi v3, vs0, vs0, 3
204 ; CHECK-P8-NEXT: xxsldwi v4, vs1, vs1, 3
205 ; CHECK-P8-NEXT: xxsldwi v5, vs2, vs2, 3
206 ; CHECK-P8-NEXT: xxsldwi v0, vs4, vs4, 3
207 ; CHECK-P8-NEXT: vpkudum v2, v3, v2
208 ; CHECK-P8-NEXT: xxsldwi v1, vs5, vs5, 3
209 ; CHECK-P8-NEXT: xxsldwi v6, vs6, vs6, 3
210 ; CHECK-P8-NEXT: vpkudum v3, v5, v4
211 ; CHECK-P8-NEXT: xxsldwi v7, vs7, vs7, 3
212 ; CHECK-P8-NEXT: vpkudum v4, v1, v0
213 ; CHECK-P8-NEXT: vpkudum v5, v6, v7
214 ; CHECK-P8-NEXT: stvx v2, r3, r7
215 ; CHECK-P8-NEXT: stvx v3, r3, r5
216 ; CHECK-P8-NEXT: stvx v4, r3, r6
217 ; CHECK-P8-NEXT: stvx v5, 0, r3
220 ; CHECK-P9-LABEL: test16elt:
221 ; CHECK-P9: # %bb.0: # %entry
222 ; CHECK-P9-NEXT: lxv v7, 0(r4)
223 ; CHECK-P9-NEXT: lxv v6, 16(r4)
224 ; CHECK-P9-NEXT: lxv v1, 32(r4)
225 ; CHECK-P9-NEXT: lxv v0, 48(r4)
226 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v7
227 ; CHECK-P9-NEXT: lxv v5, 64(r4)
228 ; CHECK-P9-NEXT: lxv v4, 80(r4)
229 ; CHECK-P9-NEXT: lxv v3, 96(r4)
230 ; CHECK-P9-NEXT: lxv v2, 112(r4)
231 ; CHECK-P9-NEXT: xxsldwi v7, vs0, vs0, 3
232 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v6
233 ; CHECK-P9-NEXT: xxsldwi v6, vs0, vs0, 3
234 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v1
235 ; CHECK-P9-NEXT: vpkudum v1, v6, v7
236 ; CHECK-P9-NEXT: stxv v1, 0(r3)
237 ; CHECK-P9-NEXT: xxsldwi v6, vs0, vs0, 3
238 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v0
239 ; CHECK-P9-NEXT: xxsldwi v0, vs0, vs0, 3
240 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v5
241 ; CHECK-P9-NEXT: vpkudum v0, v0, v6
242 ; CHECK-P9-NEXT: stxv v0, 16(r3)
243 ; CHECK-P9-NEXT: xxsldwi v5, vs0, vs0, 3
244 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v4
245 ; CHECK-P9-NEXT: xxsldwi v4, vs0, vs0, 3
246 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v3
247 ; CHECK-P9-NEXT: vpkudum v4, v4, v5
248 ; CHECK-P9-NEXT: stxv v4, 32(r3)
249 ; CHECK-P9-NEXT: xxsldwi v3, vs0, vs0, 3
250 ; CHECK-P9-NEXT: xvcvuxdsp vs0, v2
251 ; CHECK-P9-NEXT: xxsldwi v2, vs0, vs0, 3
252 ; CHECK-P9-NEXT: vpkudum v2, v2, v3
253 ; CHECK-P9-NEXT: stxv v2, 48(r3)
256 ; CHECK-BE-LABEL: test16elt:
257 ; CHECK-BE: # %bb.0: # %entry
258 ; CHECK-BE-NEXT: lxv v7, 16(r4)
259 ; CHECK-BE-NEXT: lxv v6, 0(r4)
260 ; CHECK-BE-NEXT: lxv v1, 48(r4)
261 ; CHECK-BE-NEXT: lxv v0, 32(r4)
262 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v7
263 ; CHECK-BE-NEXT: lxv v5, 80(r4)
264 ; CHECK-BE-NEXT: lxv v4, 64(r4)
265 ; CHECK-BE-NEXT: lxv v3, 112(r4)
266 ; CHECK-BE-NEXT: lxv v2, 96(r4)
267 ; CHECK-BE-NEXT: xxsldwi v7, vs0, vs0, 3
268 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v6
269 ; CHECK-BE-NEXT: xxsldwi v6, vs0, vs0, 3
270 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v1
271 ; CHECK-BE-NEXT: vpkudum v1, v6, v7
272 ; CHECK-BE-NEXT: stxv v1, 0(r3)
273 ; CHECK-BE-NEXT: xxsldwi v6, vs0, vs0, 3
274 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v0
275 ; CHECK-BE-NEXT: xxsldwi v0, vs0, vs0, 3
276 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v5
277 ; CHECK-BE-NEXT: vpkudum v0, v0, v6
278 ; CHECK-BE-NEXT: stxv v0, 16(r3)
279 ; CHECK-BE-NEXT: xxsldwi v5, vs0, vs0, 3
280 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v4
281 ; CHECK-BE-NEXT: xxsldwi v4, vs0, vs0, 3
282 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v3
283 ; CHECK-BE-NEXT: vpkudum v4, v4, v5
284 ; CHECK-BE-NEXT: stxv v4, 32(r3)
285 ; CHECK-BE-NEXT: xxsldwi v3, vs0, vs0, 3
286 ; CHECK-BE-NEXT: xvcvuxdsp vs0, v2
287 ; CHECK-BE-NEXT: xxsldwi v2, vs0, vs0, 3
288 ; CHECK-BE-NEXT: vpkudum v2, v2, v3
289 ; CHECK-BE-NEXT: stxv v2, 48(r3)
292 %a = load <16 x i64>, <16 x i64>* %0, align 128
293 %1 = uitofp <16 x i64> %a to <16 x float>
294 store <16 x float> %1, <16 x float>* %agg.result, align 64
298 define i64 @test2elt_signed(<2 x i64> %a) local_unnamed_addr #0 {
299 ; CHECK-P8-LABEL: test2elt_signed:
300 ; CHECK-P8: # %bb.0: # %entry
301 ; CHECK-P8-NEXT: xxswapd vs0, v2
302 ; CHECK-P8-NEXT: xscvsxdsp f1, v2
303 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
304 ; CHECK-P8-NEXT: xscvdpspn v3, f1
305 ; CHECK-P8-NEXT: xscvdpspn v2, f0
306 ; CHECK-P8-NEXT: vmrghw v2, v3, v2
307 ; CHECK-P8-NEXT: xxswapd vs0, v2
308 ; CHECK-P8-NEXT: mffprd r3, f0
311 ; CHECK-P9-LABEL: test2elt_signed:
312 ; CHECK-P9: # %bb.0: # %entry
313 ; CHECK-P9-NEXT: xxswapd vs0, v2
314 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
315 ; CHECK-P9-NEXT: xscvdpspn v3, f0
316 ; CHECK-P9-NEXT: xscvsxdsp f0, v2
317 ; CHECK-P9-NEXT: xscvdpspn v2, f0
318 ; CHECK-P9-NEXT: vmrghw v2, v2, v3
319 ; CHECK-P9-NEXT: mfvsrld r3, v2
322 ; CHECK-BE-LABEL: test2elt_signed:
323 ; CHECK-BE: # %bb.0: # %entry
324 ; CHECK-BE-NEXT: xxswapd vs0, v2
325 ; CHECK-BE-NEXT: xscvsxdsp f1, v2
326 ; CHECK-BE-NEXT: xscvsxdsp f0, f0
327 ; CHECK-BE-NEXT: xscvdpspn v2, f1
328 ; CHECK-BE-NEXT: xscvdpspn v3, f0
329 ; CHECK-BE-NEXT: vmrgow v2, v2, v3
330 ; CHECK-BE-NEXT: mfvsrd r3, v2
333 %0 = sitofp <2 x i64> %a to <2 x float>
334 %1 = bitcast <2 x float> %0 to i64
338 define <4 x float> @test4elt_signed(<4 x i64>* nocapture readonly) local_unnamed_addr #1 {
339 ; CHECK-P8-LABEL: test4elt_signed:
340 ; CHECK-P8: # %bb.0: # %entry
341 ; CHECK-P8-NEXT: li r4, 16
342 ; CHECK-P8-NEXT: lxvd2x vs1, 0, r3
343 ; CHECK-P8-NEXT: lxvd2x vs0, r3, r4
344 ; CHECK-P8-NEXT: xxswapd v3, vs1
345 ; CHECK-P8-NEXT: xxswapd v2, vs0
346 ; CHECK-P8-NEXT: xvcvsxdsp vs1, v3
347 ; CHECK-P8-NEXT: xvcvsxdsp vs0, v2
348 ; CHECK-P8-NEXT: xxsldwi v3, vs1, vs1, 3
349 ; CHECK-P8-NEXT: xxsldwi v2, vs0, vs0, 3
350 ; CHECK-P8-NEXT: vpkudum v2, v2, v3
353 ; CHECK-P9-LABEL: test4elt_signed:
354 ; CHECK-P9: # %bb.0: # %entry
355 ; CHECK-P9-NEXT: lxv v3, 0(r3)
356 ; CHECK-P9-NEXT: lxv v2, 16(r3)
357 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v3
358 ; CHECK-P9-NEXT: xxsldwi v3, vs0, vs0, 3
359 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v2
360 ; CHECK-P9-NEXT: xxsldwi v2, vs0, vs0, 3
361 ; CHECK-P9-NEXT: vpkudum v2, v2, v3
364 ; CHECK-BE-LABEL: test4elt_signed:
365 ; CHECK-BE: # %bb.0: # %entry
366 ; CHECK-BE-NEXT: lxv v3, 16(r3)
367 ; CHECK-BE-NEXT: lxv v2, 0(r3)
368 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v3
369 ; CHECK-BE-NEXT: xxsldwi v3, vs0, vs0, 3
370 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v2
371 ; CHECK-BE-NEXT: xxsldwi v2, vs0, vs0, 3
372 ; CHECK-BE-NEXT: vpkudum v2, v2, v3
375 %a = load <4 x i64>, <4 x i64>* %0, align 32
376 %1 = sitofp <4 x i64> %a to <4 x float>
380 define void @test8elt_signed(<8 x float>* noalias nocapture sret(<8 x float>) %agg.result, <8 x i64>* nocapture readonly) local_unnamed_addr #2 {
381 ; CHECK-P8-LABEL: test8elt_signed:
382 ; CHECK-P8: # %bb.0: # %entry
383 ; CHECK-P8-NEXT: li r5, 32
384 ; CHECK-P8-NEXT: li r6, 48
385 ; CHECK-P8-NEXT: lxvd2x vs3, 0, r4
386 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
387 ; CHECK-P8-NEXT: li r5, 16
388 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
389 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r5
390 ; CHECK-P8-NEXT: xxswapd v5, vs3
391 ; CHECK-P8-NEXT: xxswapd v2, vs0
392 ; CHECK-P8-NEXT: xxswapd v3, vs1
393 ; CHECK-P8-NEXT: xxswapd v4, vs2
394 ; CHECK-P8-NEXT: xvcvsxdsp vs3, v5
395 ; CHECK-P8-NEXT: xvcvsxdsp vs0, v2
396 ; CHECK-P8-NEXT: xvcvsxdsp vs1, v3
397 ; CHECK-P8-NEXT: xvcvsxdsp vs2, v4
398 ; CHECK-P8-NEXT: xxsldwi v5, vs3, vs3, 3
399 ; CHECK-P8-NEXT: xxsldwi v2, vs0, vs0, 3
400 ; CHECK-P8-NEXT: xxsldwi v3, vs1, vs1, 3
401 ; CHECK-P8-NEXT: xxsldwi v4, vs2, vs2, 3
402 ; CHECK-P8-NEXT: vpkudum v2, v3, v2
403 ; CHECK-P8-NEXT: vpkudum v3, v4, v5
404 ; CHECK-P8-NEXT: stvx v2, r3, r5
405 ; CHECK-P8-NEXT: stvx v3, 0, r3
408 ; CHECK-P9-LABEL: test8elt_signed:
409 ; CHECK-P9: # %bb.0: # %entry
410 ; CHECK-P9-NEXT: lxv v5, 0(r4)
411 ; CHECK-P9-NEXT: lxv v4, 16(r4)
412 ; CHECK-P9-NEXT: lxv v3, 32(r4)
413 ; CHECK-P9-NEXT: lxv v2, 48(r4)
414 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v5
415 ; CHECK-P9-NEXT: xxsldwi v5, vs0, vs0, 3
416 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v4
417 ; CHECK-P9-NEXT: xxsldwi v4, vs0, vs0, 3
418 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v3
419 ; CHECK-P9-NEXT: vpkudum v3, v4, v5
420 ; CHECK-P9-NEXT: stxv v3, 0(r3)
421 ; CHECK-P9-NEXT: xxsldwi v4, vs0, vs0, 3
422 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v2
423 ; CHECK-P9-NEXT: xxsldwi v2, vs0, vs0, 3
424 ; CHECK-P9-NEXT: vpkudum v2, v2, v4
425 ; CHECK-P9-NEXT: stxv v2, 16(r3)
428 ; CHECK-BE-LABEL: test8elt_signed:
429 ; CHECK-BE: # %bb.0: # %entry
430 ; CHECK-BE-NEXT: lxv v5, 16(r4)
431 ; CHECK-BE-NEXT: lxv v4, 0(r4)
432 ; CHECK-BE-NEXT: lxv v3, 48(r4)
433 ; CHECK-BE-NEXT: lxv v2, 32(r4)
434 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v5
435 ; CHECK-BE-NEXT: xxsldwi v5, vs0, vs0, 3
436 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v4
437 ; CHECK-BE-NEXT: xxsldwi v4, vs0, vs0, 3
438 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v3
439 ; CHECK-BE-NEXT: vpkudum v3, v4, v5
440 ; CHECK-BE-NEXT: stxv v3, 0(r3)
441 ; CHECK-BE-NEXT: xxsldwi v4, vs0, vs0, 3
442 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v2
443 ; CHECK-BE-NEXT: xxsldwi v2, vs0, vs0, 3
444 ; CHECK-BE-NEXT: vpkudum v2, v2, v4
445 ; CHECK-BE-NEXT: stxv v2, 16(r3)
448 %a = load <8 x i64>, <8 x i64>* %0, align 64
449 %1 = sitofp <8 x i64> %a to <8 x float>
450 store <8 x float> %1, <8 x float>* %agg.result, align 32
454 define void @test16elt_signed(<16 x float>* noalias nocapture sret(<16 x float>) %agg.result, <16 x i64>* nocapture readonly) local_unnamed_addr #2 {
455 ; CHECK-P8-LABEL: test16elt_signed:
456 ; CHECK-P8: # %bb.0: # %entry
457 ; CHECK-P8-NEXT: li r5, 32
458 ; CHECK-P8-NEXT: li r6, 48
459 ; CHECK-P8-NEXT: li r7, 64
460 ; CHECK-P8-NEXT: lxvd2x vs4, 0, r4
461 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
462 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
463 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r7
464 ; CHECK-P8-NEXT: li r7, 80
465 ; CHECK-P8-NEXT: lxvd2x vs3, r4, r7
466 ; CHECK-P8-NEXT: li r7, 96
467 ; CHECK-P8-NEXT: xxswapd v2, vs0
468 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r7
469 ; CHECK-P8-NEXT: li r7, 112
470 ; CHECK-P8-NEXT: xxswapd v3, vs1
471 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r7
472 ; CHECK-P8-NEXT: li r7, 16
473 ; CHECK-P8-NEXT: xxswapd v4, vs2
474 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r7
475 ; CHECK-P8-NEXT: xxswapd v5, vs3
476 ; CHECK-P8-NEXT: xvcvsxdsp vs3, v2
477 ; CHECK-P8-NEXT: xxswapd v2, vs0
478 ; CHECK-P8-NEXT: xvcvsxdsp vs0, v3
479 ; CHECK-P8-NEXT: xxswapd v3, vs1
480 ; CHECK-P8-NEXT: xvcvsxdsp vs1, v4
481 ; CHECK-P8-NEXT: xxswapd v4, vs2
482 ; CHECK-P8-NEXT: xvcvsxdsp vs2, v5
483 ; CHECK-P8-NEXT: xxswapd v5, vs4
484 ; CHECK-P8-NEXT: xvcvsxdsp vs4, v2
485 ; CHECK-P8-NEXT: xvcvsxdsp vs5, v3
486 ; CHECK-P8-NEXT: xvcvsxdsp vs6, v4
487 ; CHECK-P8-NEXT: xxsldwi v2, vs3, vs3, 3
488 ; CHECK-P8-NEXT: xvcvsxdsp vs7, v5
489 ; CHECK-P8-NEXT: xxsldwi v3, vs0, vs0, 3
490 ; CHECK-P8-NEXT: xxsldwi v4, vs1, vs1, 3
491 ; CHECK-P8-NEXT: xxsldwi v5, vs2, vs2, 3
492 ; CHECK-P8-NEXT: xxsldwi v0, vs4, vs4, 3
493 ; CHECK-P8-NEXT: vpkudum v2, v3, v2
494 ; CHECK-P8-NEXT: xxsldwi v1, vs5, vs5, 3
495 ; CHECK-P8-NEXT: xxsldwi v6, vs6, vs6, 3
496 ; CHECK-P8-NEXT: vpkudum v3, v5, v4
497 ; CHECK-P8-NEXT: xxsldwi v7, vs7, vs7, 3
498 ; CHECK-P8-NEXT: vpkudum v4, v1, v0
499 ; CHECK-P8-NEXT: vpkudum v5, v6, v7
500 ; CHECK-P8-NEXT: stvx v2, r3, r7
501 ; CHECK-P8-NEXT: stvx v3, r3, r5
502 ; CHECK-P8-NEXT: stvx v4, r3, r6
503 ; CHECK-P8-NEXT: stvx v5, 0, r3
506 ; CHECK-P9-LABEL: test16elt_signed:
507 ; CHECK-P9: # %bb.0: # %entry
508 ; CHECK-P9-NEXT: lxv v7, 0(r4)
509 ; CHECK-P9-NEXT: lxv v6, 16(r4)
510 ; CHECK-P9-NEXT: lxv v1, 32(r4)
511 ; CHECK-P9-NEXT: lxv v0, 48(r4)
512 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v7
513 ; CHECK-P9-NEXT: lxv v5, 64(r4)
514 ; CHECK-P9-NEXT: lxv v4, 80(r4)
515 ; CHECK-P9-NEXT: lxv v3, 96(r4)
516 ; CHECK-P9-NEXT: lxv v2, 112(r4)
517 ; CHECK-P9-NEXT: xxsldwi v7, vs0, vs0, 3
518 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v6
519 ; CHECK-P9-NEXT: xxsldwi v6, vs0, vs0, 3
520 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v1
521 ; CHECK-P9-NEXT: vpkudum v1, v6, v7
522 ; CHECK-P9-NEXT: stxv v1, 0(r3)
523 ; CHECK-P9-NEXT: xxsldwi v6, vs0, vs0, 3
524 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v0
525 ; CHECK-P9-NEXT: xxsldwi v0, vs0, vs0, 3
526 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v5
527 ; CHECK-P9-NEXT: vpkudum v0, v0, v6
528 ; CHECK-P9-NEXT: stxv v0, 16(r3)
529 ; CHECK-P9-NEXT: xxsldwi v5, vs0, vs0, 3
530 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v4
531 ; CHECK-P9-NEXT: xxsldwi v4, vs0, vs0, 3
532 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v3
533 ; CHECK-P9-NEXT: vpkudum v4, v4, v5
534 ; CHECK-P9-NEXT: stxv v4, 32(r3)
535 ; CHECK-P9-NEXT: xxsldwi v3, vs0, vs0, 3
536 ; CHECK-P9-NEXT: xvcvsxdsp vs0, v2
537 ; CHECK-P9-NEXT: xxsldwi v2, vs0, vs0, 3
538 ; CHECK-P9-NEXT: vpkudum v2, v2, v3
539 ; CHECK-P9-NEXT: stxv v2, 48(r3)
542 ; CHECK-BE-LABEL: test16elt_signed:
543 ; CHECK-BE: # %bb.0: # %entry
544 ; CHECK-BE-NEXT: lxv v7, 16(r4)
545 ; CHECK-BE-NEXT: lxv v6, 0(r4)
546 ; CHECK-BE-NEXT: lxv v1, 48(r4)
547 ; CHECK-BE-NEXT: lxv v0, 32(r4)
548 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v7
549 ; CHECK-BE-NEXT: lxv v5, 80(r4)
550 ; CHECK-BE-NEXT: lxv v4, 64(r4)
551 ; CHECK-BE-NEXT: lxv v3, 112(r4)
552 ; CHECK-BE-NEXT: lxv v2, 96(r4)
553 ; CHECK-BE-NEXT: xxsldwi v7, vs0, vs0, 3
554 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v6
555 ; CHECK-BE-NEXT: xxsldwi v6, vs0, vs0, 3
556 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v1
557 ; CHECK-BE-NEXT: vpkudum v1, v6, v7
558 ; CHECK-BE-NEXT: stxv v1, 0(r3)
559 ; CHECK-BE-NEXT: xxsldwi v6, vs0, vs0, 3
560 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v0
561 ; CHECK-BE-NEXT: xxsldwi v0, vs0, vs0, 3
562 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v5
563 ; CHECK-BE-NEXT: vpkudum v0, v0, v6
564 ; CHECK-BE-NEXT: stxv v0, 16(r3)
565 ; CHECK-BE-NEXT: xxsldwi v5, vs0, vs0, 3
566 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v4
567 ; CHECK-BE-NEXT: xxsldwi v4, vs0, vs0, 3
568 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v3
569 ; CHECK-BE-NEXT: vpkudum v4, v4, v5
570 ; CHECK-BE-NEXT: stxv v4, 32(r3)
571 ; CHECK-BE-NEXT: xxsldwi v3, vs0, vs0, 3
572 ; CHECK-BE-NEXT: xvcvsxdsp vs0, v2
573 ; CHECK-BE-NEXT: xxsldwi v2, vs0, vs0, 3
574 ; CHECK-BE-NEXT: vpkudum v2, v2, v3
575 ; CHECK-BE-NEXT: stxv v2, 48(r3)
578 %a = load <16 x i64>, <16 x i64>* %0, align 128
579 %1 = sitofp <16 x i64> %a to <16 x float>
580 store <16 x float> %1, <16 x float>* %agg.result, align 64