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 double> %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: xscvdpuxws f1, v2
17 ; CHECK-P8-NEXT: xscvdpuxws f0, f0
18 ; CHECK-P8-NEXT: mffprwz r3, f1
19 ; CHECK-P8-NEXT: mtvsrwz v2, r3
20 ; CHECK-P8-NEXT: mffprwz r4, f0
21 ; CHECK-P8-NEXT: mtvsrwz v3, r4
22 ; CHECK-P8-NEXT: vmrghw v2, v2, v3
23 ; CHECK-P8-NEXT: xxswapd vs0, v2
24 ; CHECK-P8-NEXT: mffprd r3, f0
27 ; CHECK-P9-LABEL: test2elt:
28 ; CHECK-P9: # %bb.0: # %entry
29 ; CHECK-P9-NEXT: xscvdpuxws f0, v2
30 ; CHECK-P9-NEXT: mffprwz r3, f0
31 ; CHECK-P9-NEXT: xxswapd vs0, v2
32 ; CHECK-P9-NEXT: mtvsrwz v3, r3
33 ; CHECK-P9-NEXT: xscvdpuxws f0, f0
34 ; CHECK-P9-NEXT: mffprwz r3, f0
35 ; CHECK-P9-NEXT: mtvsrwz v2, r3
36 ; CHECK-P9-NEXT: vmrghw v2, v3, v2
37 ; CHECK-P9-NEXT: mfvsrld r3, v2
40 ; CHECK-BE-LABEL: test2elt:
41 ; CHECK-BE: # %bb.0: # %entry
42 ; CHECK-BE-NEXT: xscvdpuxws f0, v2
43 ; CHECK-BE-NEXT: mffprwz r3, f0
44 ; CHECK-BE-NEXT: xxswapd vs0, v2
45 ; CHECK-BE-NEXT: mtvsrwz v3, r3
46 ; CHECK-BE-NEXT: xscvdpuxws f0, f0
47 ; CHECK-BE-NEXT: mffprwz r3, f0
48 ; CHECK-BE-NEXT: mtvsrwz v2, r3
49 ; CHECK-BE-NEXT: vmrgow v2, v3, v2
50 ; CHECK-BE-NEXT: mfvsrd r3, v2
53 %0 = fptoui <2 x double> %a to <2 x i32>
54 %1 = bitcast <2 x i32> %0 to i64
58 define <4 x i32> @test4elt(<4 x double>* nocapture readonly) local_unnamed_addr #1 {
59 ; CHECK-P8-LABEL: test4elt:
60 ; CHECK-P8: # %bb.0: # %entry
61 ; CHECK-P8-NEXT: li r4, 16
62 ; CHECK-P8-NEXT: lxvd2x vs1, 0, r3
63 ; CHECK-P8-NEXT: lxvd2x vs0, r3, r4
64 ; CHECK-P8-NEXT: xxswapd vs1, vs1
65 ; CHECK-P8-NEXT: xxswapd vs0, vs0
66 ; CHECK-P8-NEXT: xxmrgld vs2, vs0, vs1
67 ; CHECK-P8-NEXT: xxmrghd vs0, vs0, vs1
68 ; CHECK-P8-NEXT: xvcvdpuxws v2, vs2
69 ; CHECK-P8-NEXT: xvcvdpuxws v3, vs0
70 ; CHECK-P8-NEXT: vmrgew v2, v3, v2
73 ; CHECK-P9-LABEL: test4elt:
74 ; CHECK-P9: # %bb.0: # %entry
75 ; CHECK-P9-NEXT: lxv vs0, 0(r3)
76 ; CHECK-P9-NEXT: lxv vs1, 16(r3)
77 ; CHECK-P9-NEXT: xxmrgld vs2, vs1, vs0
78 ; CHECK-P9-NEXT: xxmrghd vs0, vs1, vs0
79 ; CHECK-P9-NEXT: xvcvdpuxws v2, vs2
80 ; CHECK-P9-NEXT: xvcvdpuxws v3, vs0
81 ; CHECK-P9-NEXT: vmrgew v2, v3, v2
84 ; CHECK-BE-LABEL: test4elt:
85 ; CHECK-BE: # %bb.0: # %entry
86 ; CHECK-BE-NEXT: lxv vs0, 16(r3)
87 ; CHECK-BE-NEXT: lxv vs1, 0(r3)
88 ; CHECK-BE-NEXT: xxmrgld vs2, vs1, vs0
89 ; CHECK-BE-NEXT: xxmrghd vs0, vs1, vs0
90 ; CHECK-BE-NEXT: xvcvdpuxws v2, vs2
91 ; CHECK-BE-NEXT: xvcvdpuxws v3, vs0
92 ; CHECK-BE-NEXT: vmrgew v2, v3, v2
95 %a = load <4 x double>, <4 x double>* %0, align 32
96 %1 = fptoui <4 x double> %a to <4 x i32>
100 define void @test8elt(<8 x i32>* noalias nocapture sret(<8 x i32>) %agg.result, <8 x double>* nocapture readonly) local_unnamed_addr #2 {
101 ; CHECK-P8-LABEL: test8elt:
102 ; CHECK-P8: # %bb.0: # %entry
103 ; CHECK-P8-NEXT: li r5, 32
104 ; CHECK-P8-NEXT: li r6, 48
105 ; CHECK-P8-NEXT: lxvd2x vs3, 0, r4
106 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
107 ; CHECK-P8-NEXT: li r5, 16
108 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
109 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r5
110 ; CHECK-P8-NEXT: xxswapd vs3, vs3
111 ; CHECK-P8-NEXT: xxswapd vs0, vs0
112 ; CHECK-P8-NEXT: xxswapd vs1, vs1
113 ; CHECK-P8-NEXT: xxswapd vs2, vs2
114 ; CHECK-P8-NEXT: xxmrgld vs4, vs1, vs0
115 ; CHECK-P8-NEXT: xxmrghd vs0, vs1, vs0
116 ; CHECK-P8-NEXT: xxmrgld vs1, vs2, vs3
117 ; CHECK-P8-NEXT: xxmrghd vs2, vs2, vs3
118 ; CHECK-P8-NEXT: xvcvdpuxws v2, vs4
119 ; CHECK-P8-NEXT: xvcvdpuxws v3, vs0
120 ; CHECK-P8-NEXT: xvcvdpuxws v4, vs1
121 ; CHECK-P8-NEXT: xvcvdpuxws v5, vs2
122 ; CHECK-P8-NEXT: vmrgew v2, v3, v2
123 ; CHECK-P8-NEXT: vmrgew v3, v5, v4
124 ; CHECK-P8-NEXT: stvx v2, r3, r5
125 ; CHECK-P8-NEXT: stvx v3, 0, r3
128 ; CHECK-P9-LABEL: test8elt:
129 ; CHECK-P9: # %bb.0: # %entry
130 ; CHECK-P9-NEXT: lxv vs2, 0(r4)
131 ; CHECK-P9-NEXT: lxv vs3, 16(r4)
132 ; CHECK-P9-NEXT: lxv vs0, 32(r4)
133 ; CHECK-P9-NEXT: lxv vs1, 48(r4)
134 ; CHECK-P9-NEXT: xxmrgld vs4, vs3, vs2
135 ; CHECK-P9-NEXT: xxmrghd vs2, vs3, vs2
136 ; CHECK-P9-NEXT: xvcvdpuxws v2, vs4
137 ; CHECK-P9-NEXT: xvcvdpuxws v3, vs2
138 ; CHECK-P9-NEXT: xxmrgld vs2, vs1, vs0
139 ; CHECK-P9-NEXT: xxmrghd vs0, vs1, vs0
140 ; CHECK-P9-NEXT: xvcvdpuxws v4, vs0
141 ; CHECK-P9-NEXT: vmrgew v2, v3, v2
142 ; CHECK-P9-NEXT: xvcvdpuxws v3, vs2
143 ; CHECK-P9-NEXT: stxv v2, 0(r3)
144 ; CHECK-P9-NEXT: vmrgew v3, v4, v3
145 ; CHECK-P9-NEXT: stxv v3, 16(r3)
148 ; CHECK-BE-LABEL: test8elt:
149 ; CHECK-BE: # %bb.0: # %entry
150 ; CHECK-BE-NEXT: lxv vs2, 16(r4)
151 ; CHECK-BE-NEXT: lxv vs3, 0(r4)
152 ; CHECK-BE-NEXT: lxv vs0, 48(r4)
153 ; CHECK-BE-NEXT: lxv vs1, 32(r4)
154 ; CHECK-BE-NEXT: xxmrgld vs4, vs3, vs2
155 ; CHECK-BE-NEXT: xxmrghd vs2, vs3, vs2
156 ; CHECK-BE-NEXT: xvcvdpuxws v2, vs4
157 ; CHECK-BE-NEXT: xvcvdpuxws v3, vs2
158 ; CHECK-BE-NEXT: xxmrgld vs2, vs1, vs0
159 ; CHECK-BE-NEXT: xxmrghd vs0, vs1, vs0
160 ; CHECK-BE-NEXT: xvcvdpuxws v4, vs0
161 ; CHECK-BE-NEXT: vmrgew v2, v3, v2
162 ; CHECK-BE-NEXT: xvcvdpuxws v3, vs2
163 ; CHECK-BE-NEXT: stxv v2, 0(r3)
164 ; CHECK-BE-NEXT: vmrgew v3, v4, v3
165 ; CHECK-BE-NEXT: stxv v3, 16(r3)
168 %a = load <8 x double>, <8 x double>* %0, align 64
169 %1 = fptoui <8 x double> %a to <8 x i32>
170 store <8 x i32> %1, <8 x i32>* %agg.result, align 32
174 define void @test16elt(<16 x i32>* noalias nocapture sret(<16 x i32>) %agg.result, <16 x double>* nocapture readonly) local_unnamed_addr #2 {
175 ; CHECK-P8-LABEL: test16elt:
176 ; CHECK-P8: # %bb.0: # %entry
177 ; CHECK-P8-NEXT: li r5, 32
178 ; CHECK-P8-NEXT: li r6, 48
179 ; CHECK-P8-NEXT: li r8, 64
180 ; CHECK-P8-NEXT: li r7, 16
181 ; CHECK-P8-NEXT: li r9, 80
182 ; CHECK-P8-NEXT: lxvd2x vs7, 0, r4
183 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
184 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
185 ; CHECK-P8-NEXT: lxvd2x vs3, r4, r8
186 ; CHECK-P8-NEXT: li r8, 96
187 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r7
188 ; CHECK-P8-NEXT: lxvd2x vs5, r4, r8
189 ; CHECK-P8-NEXT: li r8, 112
190 ; CHECK-P8-NEXT: lxvd2x vs4, r4, r9
191 ; CHECK-P8-NEXT: xxswapd vs0, vs0
192 ; CHECK-P8-NEXT: xxswapd vs1, vs1
193 ; CHECK-P8-NEXT: lxvd2x vs6, r4, r8
194 ; CHECK-P8-NEXT: xxswapd vs2, vs2
195 ; CHECK-P8-NEXT: xxswapd vs3, vs3
196 ; CHECK-P8-NEXT: xxswapd vs4, vs4
197 ; CHECK-P8-NEXT: xxswapd vs5, vs5
198 ; CHECK-P8-NEXT: xxmrgld vs8, vs1, vs0
199 ; CHECK-P8-NEXT: xxswapd vs6, vs6
200 ; CHECK-P8-NEXT: xxmrghd vs0, vs1, vs0
201 ; CHECK-P8-NEXT: xxswapd vs1, vs7
202 ; CHECK-P8-NEXT: xxmrgld vs7, vs4, vs3
203 ; CHECK-P8-NEXT: xxmrghd vs3, vs4, vs3
204 ; CHECK-P8-NEXT: xxmrgld vs4, vs6, vs5
205 ; CHECK-P8-NEXT: xvcvdpuxws v2, vs8
206 ; CHECK-P8-NEXT: xvcvdpuxws v3, vs0
207 ; CHECK-P8-NEXT: xxmrghd vs0, vs6, vs5
208 ; CHECK-P8-NEXT: xxmrgld vs5, vs2, vs1
209 ; CHECK-P8-NEXT: xxmrghd vs1, vs2, vs1
210 ; CHECK-P8-NEXT: xvcvdpuxws v4, vs7
211 ; CHECK-P8-NEXT: xvcvdpuxws v5, vs3
212 ; CHECK-P8-NEXT: xvcvdpuxws v0, vs4
213 ; CHECK-P8-NEXT: xvcvdpuxws v1, vs0
214 ; CHECK-P8-NEXT: xvcvdpuxws v6, vs5
215 ; CHECK-P8-NEXT: xvcvdpuxws v7, vs1
216 ; CHECK-P8-NEXT: vmrgew v2, v3, v2
217 ; CHECK-P8-NEXT: vmrgew v3, v5, v4
218 ; CHECK-P8-NEXT: vmrgew v4, v1, v0
219 ; CHECK-P8-NEXT: vmrgew v5, v7, v6
220 ; CHECK-P8-NEXT: stvx v2, r3, r7
221 ; CHECK-P8-NEXT: stvx v3, r3, r5
222 ; CHECK-P8-NEXT: stvx v4, r3, r6
223 ; CHECK-P8-NEXT: stvx v5, 0, r3
226 ; CHECK-P9-LABEL: test16elt:
227 ; CHECK-P9: # %bb.0: # %entry
228 ; CHECK-P9-NEXT: lxv vs6, 0(r4)
229 ; CHECK-P9-NEXT: lxv vs7, 16(r4)
230 ; CHECK-P9-NEXT: lxv vs4, 32(r4)
231 ; CHECK-P9-NEXT: lxv vs5, 48(r4)
232 ; CHECK-P9-NEXT: xxmrgld vs8, vs7, vs6
233 ; CHECK-P9-NEXT: xxmrghd vs6, vs7, vs6
234 ; CHECK-P9-NEXT: xxmrgld vs7, vs5, vs4
235 ; CHECK-P9-NEXT: xxmrghd vs4, vs5, vs4
236 ; CHECK-P9-NEXT: lxv vs2, 64(r4)
237 ; CHECK-P9-NEXT: lxv vs3, 80(r4)
238 ; CHECK-P9-NEXT: lxv vs0, 96(r4)
239 ; CHECK-P9-NEXT: lxv vs1, 112(r4)
240 ; CHECK-P9-NEXT: xvcvdpuxws v2, vs8
241 ; CHECK-P9-NEXT: xvcvdpuxws v3, vs6
242 ; CHECK-P9-NEXT: xvcvdpuxws v4, vs7
243 ; CHECK-P9-NEXT: vmrgew v2, v3, v2
244 ; CHECK-P9-NEXT: xvcvdpuxws v3, vs4
245 ; CHECK-P9-NEXT: xxmrgld vs4, vs3, vs2
246 ; CHECK-P9-NEXT: xxmrghd vs2, vs3, vs2
247 ; CHECK-P9-NEXT: stxv v2, 0(r3)
248 ; CHECK-P9-NEXT: xvcvdpuxws v5, vs2
249 ; CHECK-P9-NEXT: xxmrgld vs2, vs1, vs0
250 ; CHECK-P9-NEXT: xxmrghd vs0, vs1, vs0
251 ; CHECK-P9-NEXT: xvcvdpuxws v0, vs0
252 ; CHECK-P9-NEXT: vmrgew v3, v3, v4
253 ; CHECK-P9-NEXT: xvcvdpuxws v4, vs4
254 ; CHECK-P9-NEXT: stxv v3, 16(r3)
255 ; CHECK-P9-NEXT: vmrgew v4, v5, v4
256 ; CHECK-P9-NEXT: stxv v4, 32(r3)
257 ; CHECK-P9-NEXT: xvcvdpuxws v5, vs2
258 ; CHECK-P9-NEXT: vmrgew v5, v0, v5
259 ; CHECK-P9-NEXT: stxv v5, 48(r3)
262 ; CHECK-BE-LABEL: test16elt:
263 ; CHECK-BE: # %bb.0: # %entry
264 ; CHECK-BE-NEXT: lxv vs6, 16(r4)
265 ; CHECK-BE-NEXT: lxv vs7, 0(r4)
266 ; CHECK-BE-NEXT: lxv vs4, 48(r4)
267 ; CHECK-BE-NEXT: lxv vs5, 32(r4)
268 ; CHECK-BE-NEXT: xxmrgld vs8, vs7, vs6
269 ; CHECK-BE-NEXT: xxmrghd vs6, vs7, vs6
270 ; CHECK-BE-NEXT: xxmrgld vs7, vs5, vs4
271 ; CHECK-BE-NEXT: xxmrghd vs4, vs5, vs4
272 ; CHECK-BE-NEXT: lxv vs2, 80(r4)
273 ; CHECK-BE-NEXT: lxv vs3, 64(r4)
274 ; CHECK-BE-NEXT: lxv vs0, 112(r4)
275 ; CHECK-BE-NEXT: lxv vs1, 96(r4)
276 ; CHECK-BE-NEXT: xvcvdpuxws v2, vs8
277 ; CHECK-BE-NEXT: xvcvdpuxws v3, vs6
278 ; CHECK-BE-NEXT: xvcvdpuxws v4, vs7
279 ; CHECK-BE-NEXT: vmrgew v2, v3, v2
280 ; CHECK-BE-NEXT: xvcvdpuxws v3, vs4
281 ; CHECK-BE-NEXT: xxmrgld vs4, vs3, vs2
282 ; CHECK-BE-NEXT: xxmrghd vs2, vs3, vs2
283 ; CHECK-BE-NEXT: stxv v2, 0(r3)
284 ; CHECK-BE-NEXT: xvcvdpuxws v5, vs2
285 ; CHECK-BE-NEXT: xxmrgld vs2, vs1, vs0
286 ; CHECK-BE-NEXT: xxmrghd vs0, vs1, vs0
287 ; CHECK-BE-NEXT: xvcvdpuxws v0, vs0
288 ; CHECK-BE-NEXT: vmrgew v3, v3, v4
289 ; CHECK-BE-NEXT: xvcvdpuxws v4, vs4
290 ; CHECK-BE-NEXT: stxv v3, 16(r3)
291 ; CHECK-BE-NEXT: vmrgew v4, v5, v4
292 ; CHECK-BE-NEXT: stxv v4, 32(r3)
293 ; CHECK-BE-NEXT: xvcvdpuxws v5, vs2
294 ; CHECK-BE-NEXT: vmrgew v5, v0, v5
295 ; CHECK-BE-NEXT: stxv v5, 48(r3)
298 %a = load <16 x double>, <16 x double>* %0, align 128
299 %1 = fptoui <16 x double> %a to <16 x i32>
300 store <16 x i32> %1, <16 x i32>* %agg.result, align 64
304 define i64 @test2elt_signed(<2 x double> %a) local_unnamed_addr #0 {
305 ; CHECK-P8-LABEL: test2elt_signed:
306 ; CHECK-P8: # %bb.0: # %entry
307 ; CHECK-P8-NEXT: xxswapd vs0, v2
308 ; CHECK-P8-NEXT: xscvdpsxws f1, v2
309 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
310 ; CHECK-P8-NEXT: mffprwz r3, f1
311 ; CHECK-P8-NEXT: mtvsrwz v2, r3
312 ; CHECK-P8-NEXT: mffprwz r4, f0
313 ; CHECK-P8-NEXT: mtvsrwz v3, r4
314 ; CHECK-P8-NEXT: vmrghw v2, v2, v3
315 ; CHECK-P8-NEXT: xxswapd vs0, v2
316 ; CHECK-P8-NEXT: mffprd r3, f0
319 ; CHECK-P9-LABEL: test2elt_signed:
320 ; CHECK-P9: # %bb.0: # %entry
321 ; CHECK-P9-NEXT: xscvdpsxws f0, v2
322 ; CHECK-P9-NEXT: mffprwz r3, f0
323 ; CHECK-P9-NEXT: xxswapd vs0, v2
324 ; CHECK-P9-NEXT: mtvsrwz v3, r3
325 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
326 ; CHECK-P9-NEXT: mffprwz r3, f0
327 ; CHECK-P9-NEXT: mtvsrwz v2, r3
328 ; CHECK-P9-NEXT: vmrghw v2, v3, v2
329 ; CHECK-P9-NEXT: mfvsrld r3, v2
332 ; CHECK-BE-LABEL: test2elt_signed:
333 ; CHECK-BE: # %bb.0: # %entry
334 ; CHECK-BE-NEXT: xscvdpsxws f0, v2
335 ; CHECK-BE-NEXT: mffprwz r3, f0
336 ; CHECK-BE-NEXT: xxswapd vs0, v2
337 ; CHECK-BE-NEXT: mtvsrwz v3, r3
338 ; CHECK-BE-NEXT: xscvdpsxws f0, f0
339 ; CHECK-BE-NEXT: mffprwz r3, f0
340 ; CHECK-BE-NEXT: mtvsrwz v2, r3
341 ; CHECK-BE-NEXT: vmrgow v2, v3, v2
342 ; CHECK-BE-NEXT: mfvsrd r3, v2
345 %0 = fptosi <2 x double> %a to <2 x i32>
346 %1 = bitcast <2 x i32> %0 to i64
350 define <4 x i32> @test4elt_signed(<4 x double>* nocapture readonly) local_unnamed_addr #1 {
351 ; CHECK-P8-LABEL: test4elt_signed:
352 ; CHECK-P8: # %bb.0: # %entry
353 ; CHECK-P8-NEXT: li r4, 16
354 ; CHECK-P8-NEXT: lxvd2x vs1, 0, r3
355 ; CHECK-P8-NEXT: lxvd2x vs0, r3, r4
356 ; CHECK-P8-NEXT: xxswapd vs1, vs1
357 ; CHECK-P8-NEXT: xxswapd vs0, vs0
358 ; CHECK-P8-NEXT: xxmrgld vs2, vs0, vs1
359 ; CHECK-P8-NEXT: xxmrghd vs0, vs0, vs1
360 ; CHECK-P8-NEXT: xvcvdpsxws v2, vs2
361 ; CHECK-P8-NEXT: xvcvdpsxws v3, vs0
362 ; CHECK-P8-NEXT: vmrgew v2, v3, v2
365 ; CHECK-P9-LABEL: test4elt_signed:
366 ; CHECK-P9: # %bb.0: # %entry
367 ; CHECK-P9-NEXT: lxv vs0, 0(r3)
368 ; CHECK-P9-NEXT: lxv vs1, 16(r3)
369 ; CHECK-P9-NEXT: xxmrgld vs2, vs1, vs0
370 ; CHECK-P9-NEXT: xxmrghd vs0, vs1, vs0
371 ; CHECK-P9-NEXT: xvcvdpsxws v2, vs2
372 ; CHECK-P9-NEXT: xvcvdpsxws v3, vs0
373 ; CHECK-P9-NEXT: vmrgew v2, v3, v2
376 ; CHECK-BE-LABEL: test4elt_signed:
377 ; CHECK-BE: # %bb.0: # %entry
378 ; CHECK-BE-NEXT: lxv vs0, 16(r3)
379 ; CHECK-BE-NEXT: lxv vs1, 0(r3)
380 ; CHECK-BE-NEXT: xxmrgld vs2, vs1, vs0
381 ; CHECK-BE-NEXT: xxmrghd vs0, vs1, vs0
382 ; CHECK-BE-NEXT: xvcvdpsxws v2, vs2
383 ; CHECK-BE-NEXT: xvcvdpsxws v3, vs0
384 ; CHECK-BE-NEXT: vmrgew v2, v3, v2
387 %a = load <4 x double>, <4 x double>* %0, align 32
388 %1 = fptosi <4 x double> %a to <4 x i32>
392 define void @test8elt_signed(<8 x i32>* noalias nocapture sret(<8 x i32>) %agg.result, <8 x double>* nocapture readonly) local_unnamed_addr #2 {
393 ; CHECK-P8-LABEL: test8elt_signed:
394 ; CHECK-P8: # %bb.0: # %entry
395 ; CHECK-P8-NEXT: li r5, 32
396 ; CHECK-P8-NEXT: li r6, 48
397 ; CHECK-P8-NEXT: lxvd2x vs3, 0, r4
398 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
399 ; CHECK-P8-NEXT: li r5, 16
400 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
401 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r5
402 ; CHECK-P8-NEXT: xxswapd vs3, vs3
403 ; CHECK-P8-NEXT: xxswapd vs0, vs0
404 ; CHECK-P8-NEXT: xxswapd vs1, vs1
405 ; CHECK-P8-NEXT: xxswapd vs2, vs2
406 ; CHECK-P8-NEXT: xxmrgld vs4, vs1, vs0
407 ; CHECK-P8-NEXT: xxmrghd vs0, vs1, vs0
408 ; CHECK-P8-NEXT: xxmrgld vs1, vs2, vs3
409 ; CHECK-P8-NEXT: xxmrghd vs2, vs2, vs3
410 ; CHECK-P8-NEXT: xvcvdpsxws v2, vs4
411 ; CHECK-P8-NEXT: xvcvdpsxws v3, vs0
412 ; CHECK-P8-NEXT: xvcvdpsxws v4, vs1
413 ; CHECK-P8-NEXT: xvcvdpsxws v5, vs2
414 ; CHECK-P8-NEXT: vmrgew v2, v3, v2
415 ; CHECK-P8-NEXT: vmrgew v3, v5, v4
416 ; CHECK-P8-NEXT: stvx v2, r3, r5
417 ; CHECK-P8-NEXT: stvx v3, 0, r3
420 ; CHECK-P9-LABEL: test8elt_signed:
421 ; CHECK-P9: # %bb.0: # %entry
422 ; CHECK-P9-NEXT: lxv vs2, 0(r4)
423 ; CHECK-P9-NEXT: lxv vs3, 16(r4)
424 ; CHECK-P9-NEXT: lxv vs0, 32(r4)
425 ; CHECK-P9-NEXT: lxv vs1, 48(r4)
426 ; CHECK-P9-NEXT: xxmrgld vs4, vs3, vs2
427 ; CHECK-P9-NEXT: xxmrghd vs2, vs3, vs2
428 ; CHECK-P9-NEXT: xvcvdpsxws v2, vs4
429 ; CHECK-P9-NEXT: xvcvdpsxws v3, vs2
430 ; CHECK-P9-NEXT: xxmrgld vs2, vs1, vs0
431 ; CHECK-P9-NEXT: xxmrghd vs0, vs1, vs0
432 ; CHECK-P9-NEXT: xvcvdpsxws v4, vs0
433 ; CHECK-P9-NEXT: vmrgew v2, v3, v2
434 ; CHECK-P9-NEXT: xvcvdpsxws v3, vs2
435 ; CHECK-P9-NEXT: stxv v2, 0(r3)
436 ; CHECK-P9-NEXT: vmrgew v3, v4, v3
437 ; CHECK-P9-NEXT: stxv v3, 16(r3)
440 ; CHECK-BE-LABEL: test8elt_signed:
441 ; CHECK-BE: # %bb.0: # %entry
442 ; CHECK-BE-NEXT: lxv vs2, 16(r4)
443 ; CHECK-BE-NEXT: lxv vs3, 0(r4)
444 ; CHECK-BE-NEXT: lxv vs0, 48(r4)
445 ; CHECK-BE-NEXT: lxv vs1, 32(r4)
446 ; CHECK-BE-NEXT: xxmrgld vs4, vs3, vs2
447 ; CHECK-BE-NEXT: xxmrghd vs2, vs3, vs2
448 ; CHECK-BE-NEXT: xvcvdpsxws v2, vs4
449 ; CHECK-BE-NEXT: xvcvdpsxws v3, vs2
450 ; CHECK-BE-NEXT: xxmrgld vs2, vs1, vs0
451 ; CHECK-BE-NEXT: xxmrghd vs0, vs1, vs0
452 ; CHECK-BE-NEXT: xvcvdpsxws v4, vs0
453 ; CHECK-BE-NEXT: vmrgew v2, v3, v2
454 ; CHECK-BE-NEXT: xvcvdpsxws v3, vs2
455 ; CHECK-BE-NEXT: stxv v2, 0(r3)
456 ; CHECK-BE-NEXT: vmrgew v3, v4, v3
457 ; CHECK-BE-NEXT: stxv v3, 16(r3)
460 %a = load <8 x double>, <8 x double>* %0, align 64
461 %1 = fptosi <8 x double> %a to <8 x i32>
462 store <8 x i32> %1, <8 x i32>* %agg.result, align 32
466 define void @test16elt_signed(<16 x i32>* noalias nocapture sret(<16 x i32>) %agg.result, <16 x double>* nocapture readonly) local_unnamed_addr #2 {
467 ; CHECK-P8-LABEL: test16elt_signed:
468 ; CHECK-P8: # %bb.0: # %entry
469 ; CHECK-P8-NEXT: li r5, 32
470 ; CHECK-P8-NEXT: li r6, 48
471 ; CHECK-P8-NEXT: li r8, 64
472 ; CHECK-P8-NEXT: li r7, 16
473 ; CHECK-P8-NEXT: li r9, 80
474 ; CHECK-P8-NEXT: lxvd2x vs7, 0, r4
475 ; CHECK-P8-NEXT: lxvd2x vs0, r4, r5
476 ; CHECK-P8-NEXT: lxvd2x vs1, r4, r6
477 ; CHECK-P8-NEXT: lxvd2x vs3, r4, r8
478 ; CHECK-P8-NEXT: li r8, 96
479 ; CHECK-P8-NEXT: lxvd2x vs2, r4, r7
480 ; CHECK-P8-NEXT: lxvd2x vs5, r4, r8
481 ; CHECK-P8-NEXT: li r8, 112
482 ; CHECK-P8-NEXT: lxvd2x vs4, r4, r9
483 ; CHECK-P8-NEXT: xxswapd vs0, vs0
484 ; CHECK-P8-NEXT: xxswapd vs1, vs1
485 ; CHECK-P8-NEXT: lxvd2x vs6, r4, r8
486 ; CHECK-P8-NEXT: xxswapd vs2, vs2
487 ; CHECK-P8-NEXT: xxswapd vs3, vs3
488 ; CHECK-P8-NEXT: xxswapd vs4, vs4
489 ; CHECK-P8-NEXT: xxswapd vs5, vs5
490 ; CHECK-P8-NEXT: xxmrgld vs8, vs1, vs0
491 ; CHECK-P8-NEXT: xxswapd vs6, vs6
492 ; CHECK-P8-NEXT: xxmrghd vs0, vs1, vs0
493 ; CHECK-P8-NEXT: xxswapd vs1, vs7
494 ; CHECK-P8-NEXT: xxmrgld vs7, vs4, vs3
495 ; CHECK-P8-NEXT: xxmrghd vs3, vs4, vs3
496 ; CHECK-P8-NEXT: xxmrgld vs4, vs6, vs5
497 ; CHECK-P8-NEXT: xvcvdpsxws v2, vs8
498 ; CHECK-P8-NEXT: xvcvdpsxws v3, vs0
499 ; CHECK-P8-NEXT: xxmrghd vs0, vs6, vs5
500 ; CHECK-P8-NEXT: xxmrgld vs5, vs2, vs1
501 ; CHECK-P8-NEXT: xxmrghd vs1, vs2, vs1
502 ; CHECK-P8-NEXT: xvcvdpsxws v4, vs7
503 ; CHECK-P8-NEXT: xvcvdpsxws v5, vs3
504 ; CHECK-P8-NEXT: xvcvdpsxws v0, vs4
505 ; CHECK-P8-NEXT: xvcvdpsxws v1, vs0
506 ; CHECK-P8-NEXT: xvcvdpsxws v6, vs5
507 ; CHECK-P8-NEXT: xvcvdpsxws v7, vs1
508 ; CHECK-P8-NEXT: vmrgew v2, v3, v2
509 ; CHECK-P8-NEXT: vmrgew v3, v5, v4
510 ; CHECK-P8-NEXT: vmrgew v4, v1, v0
511 ; CHECK-P8-NEXT: vmrgew v5, v7, v6
512 ; CHECK-P8-NEXT: stvx v2, r3, r7
513 ; CHECK-P8-NEXT: stvx v3, r3, r5
514 ; CHECK-P8-NEXT: stvx v4, r3, r6
515 ; CHECK-P8-NEXT: stvx v5, 0, r3
518 ; CHECK-P9-LABEL: test16elt_signed:
519 ; CHECK-P9: # %bb.0: # %entry
520 ; CHECK-P9-NEXT: lxv vs6, 0(r4)
521 ; CHECK-P9-NEXT: lxv vs7, 16(r4)
522 ; CHECK-P9-NEXT: lxv vs4, 32(r4)
523 ; CHECK-P9-NEXT: lxv vs5, 48(r4)
524 ; CHECK-P9-NEXT: xxmrgld vs8, vs7, vs6
525 ; CHECK-P9-NEXT: xxmrghd vs6, vs7, vs6
526 ; CHECK-P9-NEXT: xxmrgld vs7, vs5, vs4
527 ; CHECK-P9-NEXT: xxmrghd vs4, vs5, vs4
528 ; CHECK-P9-NEXT: lxv vs2, 64(r4)
529 ; CHECK-P9-NEXT: lxv vs3, 80(r4)
530 ; CHECK-P9-NEXT: lxv vs0, 96(r4)
531 ; CHECK-P9-NEXT: lxv vs1, 112(r4)
532 ; CHECK-P9-NEXT: xvcvdpsxws v2, vs8
533 ; CHECK-P9-NEXT: xvcvdpsxws v3, vs6
534 ; CHECK-P9-NEXT: xvcvdpsxws v4, vs7
535 ; CHECK-P9-NEXT: vmrgew v2, v3, v2
536 ; CHECK-P9-NEXT: xvcvdpsxws v3, vs4
537 ; CHECK-P9-NEXT: xxmrgld vs4, vs3, vs2
538 ; CHECK-P9-NEXT: xxmrghd vs2, vs3, vs2
539 ; CHECK-P9-NEXT: stxv v2, 0(r3)
540 ; CHECK-P9-NEXT: xvcvdpsxws v5, vs2
541 ; CHECK-P9-NEXT: xxmrgld vs2, vs1, vs0
542 ; CHECK-P9-NEXT: xxmrghd vs0, vs1, vs0
543 ; CHECK-P9-NEXT: xvcvdpsxws v0, vs0
544 ; CHECK-P9-NEXT: vmrgew v3, v3, v4
545 ; CHECK-P9-NEXT: xvcvdpsxws v4, vs4
546 ; CHECK-P9-NEXT: stxv v3, 16(r3)
547 ; CHECK-P9-NEXT: vmrgew v4, v5, v4
548 ; CHECK-P9-NEXT: stxv v4, 32(r3)
549 ; CHECK-P9-NEXT: xvcvdpsxws v5, vs2
550 ; CHECK-P9-NEXT: vmrgew v5, v0, v5
551 ; CHECK-P9-NEXT: stxv v5, 48(r3)
554 ; CHECK-BE-LABEL: test16elt_signed:
555 ; CHECK-BE: # %bb.0: # %entry
556 ; CHECK-BE-NEXT: lxv vs6, 16(r4)
557 ; CHECK-BE-NEXT: lxv vs7, 0(r4)
558 ; CHECK-BE-NEXT: lxv vs4, 48(r4)
559 ; CHECK-BE-NEXT: lxv vs5, 32(r4)
560 ; CHECK-BE-NEXT: xxmrgld vs8, vs7, vs6
561 ; CHECK-BE-NEXT: xxmrghd vs6, vs7, vs6
562 ; CHECK-BE-NEXT: xxmrgld vs7, vs5, vs4
563 ; CHECK-BE-NEXT: xxmrghd vs4, vs5, vs4
564 ; CHECK-BE-NEXT: lxv vs2, 80(r4)
565 ; CHECK-BE-NEXT: lxv vs3, 64(r4)
566 ; CHECK-BE-NEXT: lxv vs0, 112(r4)
567 ; CHECK-BE-NEXT: lxv vs1, 96(r4)
568 ; CHECK-BE-NEXT: xvcvdpsxws v2, vs8
569 ; CHECK-BE-NEXT: xvcvdpsxws v3, vs6
570 ; CHECK-BE-NEXT: xvcvdpsxws v4, vs7
571 ; CHECK-BE-NEXT: vmrgew v2, v3, v2
572 ; CHECK-BE-NEXT: xvcvdpsxws v3, vs4
573 ; CHECK-BE-NEXT: xxmrgld vs4, vs3, vs2
574 ; CHECK-BE-NEXT: xxmrghd vs2, vs3, vs2
575 ; CHECK-BE-NEXT: stxv v2, 0(r3)
576 ; CHECK-BE-NEXT: xvcvdpsxws v5, vs2
577 ; CHECK-BE-NEXT: xxmrgld vs2, vs1, vs0
578 ; CHECK-BE-NEXT: xxmrghd vs0, vs1, vs0
579 ; CHECK-BE-NEXT: xvcvdpsxws v0, vs0
580 ; CHECK-BE-NEXT: vmrgew v3, v3, v4
581 ; CHECK-BE-NEXT: xvcvdpsxws v4, vs4
582 ; CHECK-BE-NEXT: stxv v3, 16(r3)
583 ; CHECK-BE-NEXT: vmrgew v4, v5, v4
584 ; CHECK-BE-NEXT: stxv v4, 32(r3)
585 ; CHECK-BE-NEXT: xvcvdpsxws v5, vs2
586 ; CHECK-BE-NEXT: vmrgew v5, v0, v5
587 ; CHECK-BE-NEXT: stxv v5, 48(r3)
590 %a = load <16 x double>, <16 x double>* %0, align 128
591 %1 = fptosi <16 x double> %a to <16 x i32>
592 store <16 x i32> %1, <16 x i32>* %agg.result, align 64