1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=armv7a-none-eabihf -mattr=+neon | FileCheck %s --check-prefixes=CHECK,CHECK-NEON
3 ; RUN: llc < %s -mtriple=armv8a-none-eabihf -mattr=+neon,+fullfp16 | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
7 define <2 x i32> @stest_f64i32(<2 x double> %x) {
8 ; CHECK-LABEL: stest_f64i32:
9 ; CHECK: @ %bb.0: @ %entry
10 ; CHECK-NEXT: .save {r4, r5, r11, lr}
11 ; CHECK-NEXT: push {r4, r5, r11, lr}
12 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
13 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
14 ; CHECK-NEXT: vorr q4, q0, q0
15 ; CHECK-NEXT: vmov r0, r1, d8
16 ; CHECK-NEXT: bl __aeabi_d2lz
17 ; CHECK-NEXT: mov r4, r0
18 ; CHECK-NEXT: mov r5, r1
19 ; CHECK-NEXT: vmov r0, r1, d9
20 ; CHECK-NEXT: adr r2, .LCPI0_0
21 ; CHECK-NEXT: vld1.64 {d8, d9}, [r2:128]
22 ; CHECK-NEXT: vmov.32 d10[0], r4
23 ; CHECK-NEXT: bl __aeabi_d2lz
24 ; CHECK-NEXT: mvn r3, #-2147483648
25 ; CHECK-NEXT: subs r4, r4, r3
26 ; CHECK-NEXT: sbcs r4, r5, #0
27 ; CHECK-NEXT: vmov.32 d11[0], r0
28 ; CHECK-NEXT: mov r4, #0
29 ; CHECK-NEXT: mov r2, #0
30 ; CHECK-NEXT: movwlt r4, #1
31 ; CHECK-NEXT: subs r0, r0, r3
32 ; CHECK-NEXT: sbcs r0, r1, #0
33 ; CHECK-NEXT: vmov.32 d11[1], r1
34 ; CHECK-NEXT: mov r0, #0
35 ; CHECK-NEXT: vmov.i32 q10, #0x80000000
36 ; CHECK-NEXT: movwlt r0, #1
37 ; CHECK-NEXT: cmp r0, #0
38 ; CHECK-NEXT: mvnne r0, #0
39 ; CHECK-NEXT: cmp r4, #0
40 ; CHECK-NEXT: vmov.32 d10[1], r5
41 ; CHECK-NEXT: mvnne r4, #0
42 ; CHECK-NEXT: vdup.32 d17, r0
43 ; CHECK-NEXT: vdup.32 d16, r4
44 ; CHECK-NEXT: mvn r4, #0
45 ; CHECK-NEXT: vbsl q8, q5, q4
46 ; CHECK-NEXT: vmov r0, r1, d16
47 ; CHECK-NEXT: vmov r3, r5, d17
48 ; CHECK-NEXT: rsbs r0, r0, #-2147483648
49 ; CHECK-NEXT: sbcs r0, r4, r1
50 ; CHECK-NEXT: mov r0, #0
51 ; CHECK-NEXT: movwlt r0, #1
52 ; CHECK-NEXT: rsbs r1, r3, #-2147483648
53 ; CHECK-NEXT: sbcs r1, r4, r5
54 ; CHECK-NEXT: movwlt r2, #1
55 ; CHECK-NEXT: cmp r2, #0
56 ; CHECK-NEXT: mvnne r2, #0
57 ; CHECK-NEXT: cmp r0, #0
58 ; CHECK-NEXT: vdup.32 d19, r2
59 ; CHECK-NEXT: mvnne r0, #0
60 ; CHECK-NEXT: vdup.32 d18, r0
61 ; CHECK-NEXT: vbif q8, q10, q9
62 ; CHECK-NEXT: vmovn.i64 d0, q8
63 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
64 ; CHECK-NEXT: pop {r4, r5, r11, pc}
65 ; CHECK-NEXT: .p2align 4
66 ; CHECK-NEXT: @ %bb.1:
67 ; CHECK-NEXT: .LCPI0_0:
68 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
69 ; CHECK-NEXT: .long 0 @ 0x0
70 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
71 ; CHECK-NEXT: .long 0 @ 0x0
73 %conv = fptosi <2 x double> %x to <2 x i64>
74 %0 = icmp slt <2 x i64> %conv, <i64 2147483647, i64 2147483647>
75 %spec.store.select = select <2 x i1> %0, <2 x i64> %conv, <2 x i64> <i64 2147483647, i64 2147483647>
76 %1 = icmp sgt <2 x i64> %spec.store.select, <i64 -2147483648, i64 -2147483648>
77 %spec.store.select7 = select <2 x i1> %1, <2 x i64> %spec.store.select, <2 x i64> <i64 -2147483648, i64 -2147483648>
78 %conv6 = trunc <2 x i64> %spec.store.select7 to <2 x i32>
82 define <2 x i32> @utest_f64i32(<2 x double> %x) {
83 ; CHECK-LABEL: utest_f64i32:
84 ; CHECK: @ %bb.0: @ %entry
85 ; CHECK-NEXT: .save {r4, r5, r11, lr}
86 ; CHECK-NEXT: push {r4, r5, r11, lr}
87 ; CHECK-NEXT: .vsave {d8, d9}
88 ; CHECK-NEXT: vpush {d8, d9}
89 ; CHECK-NEXT: vorr q4, q0, q0
90 ; CHECK-NEXT: vmov r0, r1, d9
91 ; CHECK-NEXT: bl __aeabi_d2ulz
92 ; CHECK-NEXT: mov r4, r0
93 ; CHECK-NEXT: mov r5, r1
94 ; CHECK-NEXT: vmov r0, r1, d8
95 ; CHECK-NEXT: vmov.32 d9[0], r4
96 ; CHECK-NEXT: bl __aeabi_d2ulz
97 ; CHECK-NEXT: mvn r3, #0
98 ; CHECK-NEXT: vmov.32 d8[0], r0
99 ; CHECK-NEXT: subs r0, r0, r3
100 ; CHECK-NEXT: mov r2, #0
101 ; CHECK-NEXT: sbcs r0, r1, #0
102 ; CHECK-NEXT: mov r0, #0
103 ; CHECK-NEXT: movwlo r0, #1
104 ; CHECK-NEXT: subs r1, r4, r3
105 ; CHECK-NEXT: sbcs r1, r5, #0
106 ; CHECK-NEXT: movwlo r2, #1
107 ; CHECK-NEXT: cmp r2, #0
108 ; CHECK-NEXT: mvnne r2, #0
109 ; CHECK-NEXT: cmp r0, #0
110 ; CHECK-NEXT: vdup.32 d17, r2
111 ; CHECK-NEXT: mvnne r0, #0
112 ; CHECK-NEXT: vdup.32 d16, r0
113 ; CHECK-NEXT: vand q9, q4, q8
114 ; CHECK-NEXT: vorn q8, q9, q8
115 ; CHECK-NEXT: vmovn.i64 d0, q8
116 ; CHECK-NEXT: vpop {d8, d9}
117 ; CHECK-NEXT: pop {r4, r5, r11, pc}
119 %conv = fptoui <2 x double> %x to <2 x i64>
120 %0 = icmp ult <2 x i64> %conv, <i64 4294967295, i64 4294967295>
121 %spec.store.select = select <2 x i1> %0, <2 x i64> %conv, <2 x i64> <i64 4294967295, i64 4294967295>
122 %conv6 = trunc <2 x i64> %spec.store.select to <2 x i32>
126 define <2 x i32> @ustest_f64i32(<2 x double> %x) {
127 ; CHECK-LABEL: ustest_f64i32:
128 ; CHECK: @ %bb.0: @ %entry
129 ; CHECK-NEXT: .save {r4, r5, r11, lr}
130 ; CHECK-NEXT: push {r4, r5, r11, lr}
131 ; CHECK-NEXT: .vsave {d8, d9}
132 ; CHECK-NEXT: vpush {d8, d9}
133 ; CHECK-NEXT: vorr q4, q0, q0
134 ; CHECK-NEXT: vmov r0, r1, d8
135 ; CHECK-NEXT: bl __aeabi_d2lz
136 ; CHECK-NEXT: mov r4, r0
137 ; CHECK-NEXT: mov r5, r1
138 ; CHECK-NEXT: vmov r0, r1, d9
139 ; CHECK-NEXT: vmov.32 d8[0], r4
140 ; CHECK-NEXT: bl __aeabi_d2lz
141 ; CHECK-NEXT: mvn r3, #0
142 ; CHECK-NEXT: subs r4, r4, r3
143 ; CHECK-NEXT: sbcs r4, r5, #0
144 ; CHECK-NEXT: vmov.32 d9[0], r0
145 ; CHECK-NEXT: mov r4, #0
146 ; CHECK-NEXT: vmov.i64 q9, #0xffffffff
147 ; CHECK-NEXT: movwlt r4, #1
148 ; CHECK-NEXT: subs r0, r0, r3
149 ; CHECK-NEXT: sbcs r0, r1, #0
150 ; CHECK-NEXT: vmov.32 d9[1], r1
151 ; CHECK-NEXT: mov r0, #0
152 ; CHECK-NEXT: mov r2, #0
153 ; CHECK-NEXT: movwlt r0, #1
154 ; CHECK-NEXT: cmp r0, #0
155 ; CHECK-NEXT: mvnne r0, #0
156 ; CHECK-NEXT: cmp r4, #0
157 ; CHECK-NEXT: vmov.32 d8[1], r5
158 ; CHECK-NEXT: mvnne r4, #0
159 ; CHECK-NEXT: vdup.32 d17, r0
160 ; CHECK-NEXT: vdup.32 d16, r4
161 ; CHECK-NEXT: vbsl q8, q4, q9
162 ; CHECK-NEXT: vmov r0, r1, d16
163 ; CHECK-NEXT: vmov r3, r5, d17
164 ; CHECK-NEXT: rsbs r0, r0, #0
165 ; CHECK-NEXT: rscs r0, r1, #0
166 ; CHECK-NEXT: mov r0, #0
167 ; CHECK-NEXT: movwlt r0, #1
168 ; CHECK-NEXT: rsbs r1, r3, #0
169 ; CHECK-NEXT: rscs r1, r5, #0
170 ; CHECK-NEXT: movwlt r2, #1
171 ; CHECK-NEXT: cmp r2, #0
172 ; CHECK-NEXT: mvnne r2, #0
173 ; CHECK-NEXT: cmp r0, #0
174 ; CHECK-NEXT: vmov.32 d19[0], r2
175 ; CHECK-NEXT: mvnne r0, #0
176 ; CHECK-NEXT: vmov.32 d18[0], r0
177 ; CHECK-NEXT: vand q8, q8, q9
178 ; CHECK-NEXT: vmovn.i64 d0, q8
179 ; CHECK-NEXT: vpop {d8, d9}
180 ; CHECK-NEXT: pop {r4, r5, r11, pc}
182 %conv = fptosi <2 x double> %x to <2 x i64>
183 %0 = icmp slt <2 x i64> %conv, <i64 4294967295, i64 4294967295>
184 %spec.store.select = select <2 x i1> %0, <2 x i64> %conv, <2 x i64> <i64 4294967295, i64 4294967295>
185 %1 = icmp sgt <2 x i64> %spec.store.select, zeroinitializer
186 %spec.store.select7 = select <2 x i1> %1, <2 x i64> %spec.store.select, <2 x i64> zeroinitializer
187 %conv6 = trunc <2 x i64> %spec.store.select7 to <2 x i32>
191 define <4 x i32> @stest_f32i32(<4 x float> %x) {
192 ; CHECK-LABEL: stest_f32i32:
193 ; CHECK: @ %bb.0: @ %entry
194 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
195 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
196 ; CHECK-NEXT: .pad #4
197 ; CHECK-NEXT: sub sp, sp, #4
198 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
199 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
200 ; CHECK-NEXT: vorr q4, q0, q0
201 ; CHECK-NEXT: vmov r0, s16
202 ; CHECK-NEXT: bl __aeabi_f2lz
203 ; CHECK-NEXT: mov r7, r0
204 ; CHECK-NEXT: vmov r0, s18
205 ; CHECK-NEXT: mov r8, r1
206 ; CHECK-NEXT: vmov r6, s17
207 ; CHECK-NEXT: vmov r10, s19
208 ; CHECK-NEXT: vmov.32 d8[0], r7
209 ; CHECK-NEXT: bl __aeabi_f2lz
210 ; CHECK-NEXT: mov r5, r0
211 ; CHECK-NEXT: vmov.32 d10[0], r0
212 ; CHECK-NEXT: mov r0, r6
213 ; CHECK-NEXT: mov r4, r1
214 ; CHECK-NEXT: bl __aeabi_f2lz
215 ; CHECK-NEXT: mov r9, r0
216 ; CHECK-NEXT: vmov.32 d9[0], r0
217 ; CHECK-NEXT: mov r0, r10
218 ; CHECK-NEXT: mov r11, r1
219 ; CHECK-NEXT: bl __aeabi_f2lz
220 ; CHECK-NEXT: mvn r6, #-2147483648
221 ; CHECK-NEXT: subs r3, r7, r6
222 ; CHECK-NEXT: sbcs r3, r8, #0
223 ; CHECK-NEXT: vmov.32 d11[0], r0
224 ; CHECK-NEXT: mov r3, #0
225 ; CHECK-NEXT: adr r2, .LCPI3_0
226 ; CHECK-NEXT: movwlt r3, #1
227 ; CHECK-NEXT: subs r7, r5, r6
228 ; CHECK-NEXT: sbcs r7, r4, #0
229 ; CHECK-NEXT: vmov.32 d11[1], r1
230 ; CHECK-NEXT: mov r7, #0
231 ; CHECK-NEXT: movwlt r7, #1
232 ; CHECK-NEXT: cmp r7, #0
233 ; CHECK-NEXT: mvnne r7, #0
234 ; CHECK-NEXT: subs r0, r0, r6
235 ; CHECK-NEXT: sbcs r0, r1, #0
236 ; CHECK-NEXT: vld1.64 {d18, d19}, [r2:128]
237 ; CHECK-NEXT: mov r0, #0
238 ; CHECK-NEXT: mov r2, #0
239 ; CHECK-NEXT: movwlt r0, #1
240 ; CHECK-NEXT: cmp r0, #0
241 ; CHECK-NEXT: mvnne r0, #0
242 ; CHECK-NEXT: vmov.32 d10[1], r4
243 ; CHECK-NEXT: vdup.32 d17, r0
244 ; CHECK-NEXT: subs r0, r9, r6
245 ; CHECK-NEXT: sbcs r0, r11, #0
246 ; CHECK-NEXT: vdup.32 d16, r7
247 ; CHECK-NEXT: mov r0, #0
248 ; CHECK-NEXT: vbsl q8, q5, q9
249 ; CHECK-NEXT: movwlt r0, #1
250 ; CHECK-NEXT: cmp r0, #0
251 ; CHECK-NEXT: vmov.32 d9[1], r11
252 ; CHECK-NEXT: mvnne r0, #0
253 ; CHECK-NEXT: cmp r3, #0
254 ; CHECK-NEXT: mvn r6, #0
255 ; CHECK-NEXT: vdup.32 d21, r0
256 ; CHECK-NEXT: mvnne r3, #0
257 ; CHECK-NEXT: vmov.32 d8[1], r8
258 ; CHECK-NEXT: vmov r0, r1, d16
259 ; CHECK-NEXT: vdup.32 d20, r3
260 ; CHECK-NEXT: vbit q9, q4, q10
261 ; CHECK-NEXT: adr r5, .LCPI3_1
262 ; CHECK-NEXT: vld1.64 {d20, d21}, [r5:128]
263 ; CHECK-NEXT: vmov r5, r4, d17
264 ; CHECK-NEXT: vmov r3, r7, d18
265 ; CHECK-NEXT: rsbs r0, r0, #-2147483648
266 ; CHECK-NEXT: sbcs r0, r6, r1
267 ; CHECK-NEXT: mov r0, #0
268 ; CHECK-NEXT: movwlt r0, #1
269 ; CHECK-NEXT: cmp r0, #0
270 ; CHECK-NEXT: mvnne r0, #0
271 ; CHECK-NEXT: rsbs r1, r3, #-2147483648
272 ; CHECK-NEXT: vmov r1, r3, d19
273 ; CHECK-NEXT: sbcs r7, r6, r7
274 ; CHECK-NEXT: mov r7, #0
275 ; CHECK-NEXT: movwlt r7, #1
276 ; CHECK-NEXT: rsbs r5, r5, #-2147483648
277 ; CHECK-NEXT: sbcs r5, r6, r4
278 ; CHECK-NEXT: mov r5, #0
279 ; CHECK-NEXT: movwlt r5, #1
280 ; CHECK-NEXT: rsbs r1, r1, #-2147483648
281 ; CHECK-NEXT: sbcs r1, r6, r3
282 ; CHECK-NEXT: movwlt r2, #1
283 ; CHECK-NEXT: cmp r2, #0
284 ; CHECK-NEXT: mvnne r2, #0
285 ; CHECK-NEXT: cmp r5, #0
286 ; CHECK-NEXT: mvnne r5, #0
287 ; CHECK-NEXT: cmp r7, #0
288 ; CHECK-NEXT: vdup.32 d25, r5
289 ; CHECK-NEXT: mvnne r7, #0
290 ; CHECK-NEXT: vdup.32 d23, r2
291 ; CHECK-NEXT: vdup.32 d24, r0
292 ; CHECK-NEXT: vbif q8, q10, q12
293 ; CHECK-NEXT: vdup.32 d22, r7
294 ; CHECK-NEXT: vbif q9, q10, q11
295 ; CHECK-NEXT: vmovn.i64 d1, q8
296 ; CHECK-NEXT: vmovn.i64 d0, q9
297 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
298 ; CHECK-NEXT: add sp, sp, #4
299 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, r11, pc}
300 ; CHECK-NEXT: .p2align 4
301 ; CHECK-NEXT: @ %bb.1:
302 ; CHECK-NEXT: .LCPI3_0:
303 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
304 ; CHECK-NEXT: .long 0 @ 0x0
305 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
306 ; CHECK-NEXT: .long 0 @ 0x0
307 ; CHECK-NEXT: .LCPI3_1:
308 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
309 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
310 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
311 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
313 %conv = fptosi <4 x float> %x to <4 x i64>
314 %0 = icmp slt <4 x i64> %conv, <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>
315 %spec.store.select = select <4 x i1> %0, <4 x i64> %conv, <4 x i64> <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>
316 %1 = icmp sgt <4 x i64> %spec.store.select, <i64 -2147483648, i64 -2147483648, i64 -2147483648, i64 -2147483648>
317 %spec.store.select7 = select <4 x i1> %1, <4 x i64> %spec.store.select, <4 x i64> <i64 -2147483648, i64 -2147483648, i64 -2147483648, i64 -2147483648>
318 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
322 define <4 x i32> @utest_f32i32(<4 x float> %x) {
323 ; CHECK-LABEL: utest_f32i32:
324 ; CHECK: @ %bb.0: @ %entry
325 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
326 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
327 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
328 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
329 ; CHECK-NEXT: vorr q4, q0, q0
330 ; CHECK-NEXT: vmov r0, s17
331 ; CHECK-NEXT: bl __aeabi_f2ulz
332 ; CHECK-NEXT: mov r9, r0
333 ; CHECK-NEXT: vmov r0, s16
334 ; CHECK-NEXT: mov r8, r1
335 ; CHECK-NEXT: vmov r6, s19
336 ; CHECK-NEXT: vmov r7, s18
337 ; CHECK-NEXT: vmov.32 d9[0], r9
338 ; CHECK-NEXT: bl __aeabi_f2ulz
339 ; CHECK-NEXT: mov r5, r0
340 ; CHECK-NEXT: vmov.32 d8[0], r0
341 ; CHECK-NEXT: mov r0, r6
342 ; CHECK-NEXT: mov r4, r1
343 ; CHECK-NEXT: bl __aeabi_f2ulz
344 ; CHECK-NEXT: mov r6, r0
345 ; CHECK-NEXT: vmov.32 d11[0], r0
346 ; CHECK-NEXT: mov r0, r7
347 ; CHECK-NEXT: mov r10, r1
348 ; CHECK-NEXT: bl __aeabi_f2ulz
349 ; CHECK-NEXT: mvn r7, #0
350 ; CHECK-NEXT: subs r2, r5, r7
351 ; CHECK-NEXT: sbcs r2, r4, #0
352 ; CHECK-NEXT: vmov.32 d10[0], r0
353 ; CHECK-NEXT: mov r2, #0
354 ; CHECK-NEXT: mov r3, #0
355 ; CHECK-NEXT: movwlo r2, #1
356 ; CHECK-NEXT: subs r0, r0, r7
357 ; CHECK-NEXT: sbcs r0, r1, #0
358 ; CHECK-NEXT: mov r0, #0
359 ; CHECK-NEXT: movwlo r0, #1
360 ; CHECK-NEXT: cmp r0, #0
361 ; CHECK-NEXT: mvnne r0, #0
362 ; CHECK-NEXT: subs r1, r6, r7
363 ; CHECK-NEXT: sbcs r1, r10, #0
364 ; CHECK-NEXT: mov r1, #0
365 ; CHECK-NEXT: movwlo r1, #1
366 ; CHECK-NEXT: subs r7, r9, r7
367 ; CHECK-NEXT: sbcs r7, r8, #0
368 ; CHECK-NEXT: movwlo r3, #1
369 ; CHECK-NEXT: cmp r3, #0
370 ; CHECK-NEXT: mvnne r3, #0
371 ; CHECK-NEXT: cmp r1, #0
372 ; CHECK-NEXT: mvnne r1, #0
373 ; CHECK-NEXT: cmp r2, #0
374 ; CHECK-NEXT: vdup.32 d19, r1
375 ; CHECK-NEXT: mvnne r2, #0
376 ; CHECK-NEXT: vdup.32 d17, r3
377 ; CHECK-NEXT: vdup.32 d18, r0
378 ; CHECK-NEXT: vand q10, q5, q9
379 ; CHECK-NEXT: vdup.32 d16, r2
380 ; CHECK-NEXT: vand q11, q4, q8
381 ; CHECK-NEXT: vorn q9, q10, q9
382 ; CHECK-NEXT: vorn q8, q11, q8
383 ; CHECK-NEXT: vmovn.i64 d1, q9
384 ; CHECK-NEXT: vmovn.i64 d0, q8
385 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
386 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
388 %conv = fptoui <4 x float> %x to <4 x i64>
389 %0 = icmp ult <4 x i64> %conv, <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
390 %spec.store.select = select <4 x i1> %0, <4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
391 %conv6 = trunc <4 x i64> %spec.store.select to <4 x i32>
395 define <4 x i32> @ustest_f32i32(<4 x float> %x) {
396 ; CHECK-LABEL: ustest_f32i32:
397 ; CHECK: @ %bb.0: @ %entry
398 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
399 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
400 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
401 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13}
402 ; CHECK-NEXT: vorr q4, q0, q0
403 ; CHECK-NEXT: vmov r0, s17
404 ; CHECK-NEXT: bl __aeabi_f2lz
405 ; CHECK-NEXT: mov r5, r0
406 ; CHECK-NEXT: vmov r0, s16
407 ; CHECK-NEXT: mov r6, r1
408 ; CHECK-NEXT: bl __aeabi_f2lz
409 ; CHECK-NEXT: mov r2, r0
410 ; CHECK-NEXT: vmov r0, s18
411 ; CHECK-NEXT: vmov.32 d16[0], r2
412 ; CHECK-NEXT: mvn r4, #0
413 ; CHECK-NEXT: subs r2, r2, r4
414 ; CHECK-NEXT: vmov r8, s19
415 ; CHECK-NEXT: sbcs r2, r1, #0
416 ; CHECK-NEXT: vmov.32 d17[0], r5
417 ; CHECK-NEXT: mov r2, #0
418 ; CHECK-NEXT: vmov.i64 q5, #0xffffffff
419 ; CHECK-NEXT: movwlt r2, #1
420 ; CHECK-NEXT: subs r3, r5, r4
421 ; CHECK-NEXT: sbcs r3, r6, #0
422 ; CHECK-NEXT: vmov.32 d17[1], r6
423 ; CHECK-NEXT: mov r3, #0
424 ; CHECK-NEXT: mov r7, #0
425 ; CHECK-NEXT: movwlt r3, #1
426 ; CHECK-NEXT: cmp r3, #0
427 ; CHECK-NEXT: mvnne r3, #0
428 ; CHECK-NEXT: cmp r2, #0
429 ; CHECK-NEXT: vdup.32 d19, r3
430 ; CHECK-NEXT: mvnne r2, #0
431 ; CHECK-NEXT: vdup.32 d18, r2
432 ; CHECK-NEXT: vmov.32 d16[1], r1
433 ; CHECK-NEXT: vorr q4, q9, q9
434 ; CHECK-NEXT: vbsl q4, q8, q5
435 ; CHECK-NEXT: vmov r10, r9, d8
436 ; CHECK-NEXT: bl __aeabi_f2lz
437 ; CHECK-NEXT: mov r5, r0
438 ; CHECK-NEXT: vmov.32 d12[0], r0
439 ; CHECK-NEXT: mov r0, r8
440 ; CHECK-NEXT: mov r6, r1
441 ; CHECK-NEXT: bl __aeabi_f2lz
442 ; CHECK-NEXT: subs r2, r5, r4
443 ; CHECK-NEXT: vmov.32 d13[0], r0
444 ; CHECK-NEXT: sbcs r2, r6, #0
445 ; CHECK-NEXT: mov r2, #0
446 ; CHECK-NEXT: movwlt r2, #1
447 ; CHECK-NEXT: subs r0, r0, r4
448 ; CHECK-NEXT: sbcs r0, r1, #0
449 ; CHECK-NEXT: vmov.32 d13[1], r1
450 ; CHECK-NEXT: mov r0, #0
451 ; CHECK-NEXT: vmov r5, r4, d9
452 ; CHECK-NEXT: movwlt r0, #1
453 ; CHECK-NEXT: cmp r0, #0
454 ; CHECK-NEXT: mvnne r0, #0
455 ; CHECK-NEXT: cmp r2, #0
456 ; CHECK-NEXT: vmov.32 d12[1], r6
457 ; CHECK-NEXT: mvnne r2, #0
458 ; CHECK-NEXT: vdup.32 d17, r0
459 ; CHECK-NEXT: rsbs r0, r10, #0
460 ; CHECK-NEXT: vdup.32 d16, r2
461 ; CHECK-NEXT: rscs r0, r9, #0
462 ; CHECK-NEXT: vbsl q8, q6, q5
463 ; CHECK-NEXT: mov r0, #0
464 ; CHECK-NEXT: movwlt r0, #1
465 ; CHECK-NEXT: vmov r1, r2, d16
466 ; CHECK-NEXT: vmov r3, r6, d17
467 ; CHECK-NEXT: rsbs r1, r1, #0
468 ; CHECK-NEXT: rscs r1, r2, #0
469 ; CHECK-NEXT: mov r1, #0
470 ; CHECK-NEXT: movwlt r1, #1
471 ; CHECK-NEXT: rsbs r2, r3, #0
472 ; CHECK-NEXT: rscs r2, r6, #0
473 ; CHECK-NEXT: mov r2, #0
474 ; CHECK-NEXT: movwlt r2, #1
475 ; CHECK-NEXT: rsbs r3, r5, #0
476 ; CHECK-NEXT: rscs r3, r4, #0
477 ; CHECK-NEXT: movwlt r7, #1
478 ; CHECK-NEXT: cmp r7, #0
479 ; CHECK-NEXT: mvnne r7, #0
480 ; CHECK-NEXT: cmp r2, #0
481 ; CHECK-NEXT: mvnne r2, #0
482 ; CHECK-NEXT: cmp r1, #0
483 ; CHECK-NEXT: mvnne r1, #0
484 ; CHECK-NEXT: vmov.32 d21[0], r2
485 ; CHECK-NEXT: cmp r0, #0
486 ; CHECK-NEXT: vmov.32 d20[0], r1
487 ; CHECK-NEXT: mvnne r0, #0
488 ; CHECK-NEXT: vmov.32 d19[0], r7
489 ; CHECK-NEXT: vand q8, q8, q10
490 ; CHECK-NEXT: vmov.32 d18[0], r0
491 ; CHECK-NEXT: vmovn.i64 d1, q8
492 ; CHECK-NEXT: vand q9, q4, q9
493 ; CHECK-NEXT: vmovn.i64 d0, q9
494 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13}
495 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
497 %conv = fptosi <4 x float> %x to <4 x i64>
498 %0 = icmp slt <4 x i64> %conv, <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
499 %spec.store.select = select <4 x i1> %0, <4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
500 %1 = icmp sgt <4 x i64> %spec.store.select, zeroinitializer
501 %spec.store.select7 = select <4 x i1> %1, <4 x i64> %spec.store.select, <4 x i64> zeroinitializer
502 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
506 define <4 x i32> @stest_f16i32(<4 x half> %x) {
507 ; CHECK-NEON-LABEL: stest_f16i32:
508 ; CHECK-NEON: @ %bb.0: @ %entry
509 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
510 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
511 ; CHECK-NEON-NEXT: .pad #4
512 ; CHECK-NEON-NEXT: sub sp, sp, #4
513 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11}
514 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11}
515 ; CHECK-NEON-NEXT: vmov r0, s0
516 ; CHECK-NEON-NEXT: vmov.f32 s16, s3
517 ; CHECK-NEON-NEXT: vmov.f32 s18, s2
518 ; CHECK-NEON-NEXT: vmov.f32 s20, s1
519 ; CHECK-NEON-NEXT: bl __aeabi_h2f
520 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
521 ; CHECK-NEON-NEXT: mov r9, r0
522 ; CHECK-NEON-NEXT: vmov r0, s18
523 ; CHECK-NEON-NEXT: vmov r10, s16
524 ; CHECK-NEON-NEXT: mov r8, r1
525 ; CHECK-NEON-NEXT: vmov r6, s20
526 ; CHECK-NEON-NEXT: vmov.32 d8[0], r9
527 ; CHECK-NEON-NEXT: bl __aeabi_h2f
528 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
529 ; CHECK-NEON-NEXT: mov r5, r0
530 ; CHECK-NEON-NEXT: vmov.32 d10[0], r0
531 ; CHECK-NEON-NEXT: mov r0, r6
532 ; CHECK-NEON-NEXT: mov r4, r1
533 ; CHECK-NEON-NEXT: bl __aeabi_h2f
534 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
535 ; CHECK-NEON-NEXT: mov r11, r0
536 ; CHECK-NEON-NEXT: vmov.32 d9[0], r0
537 ; CHECK-NEON-NEXT: mov r0, r10
538 ; CHECK-NEON-NEXT: mov r7, r1
539 ; CHECK-NEON-NEXT: bl __aeabi_h2f
540 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
541 ; CHECK-NEON-NEXT: mvn r6, #-2147483648
542 ; CHECK-NEON-NEXT: subs r3, r9, r6
543 ; CHECK-NEON-NEXT: sbcs r3, r8, #0
544 ; CHECK-NEON-NEXT: vmov.32 d11[0], r0
545 ; CHECK-NEON-NEXT: mov r3, #0
546 ; CHECK-NEON-NEXT: adr r2, .LCPI6_0
547 ; CHECK-NEON-NEXT: movwlt r3, #1
548 ; CHECK-NEON-NEXT: subs r5, r5, r6
549 ; CHECK-NEON-NEXT: sbcs r5, r4, #0
550 ; CHECK-NEON-NEXT: vmov.32 d11[1], r1
551 ; CHECK-NEON-NEXT: mov r5, #0
552 ; CHECK-NEON-NEXT: movwlt r5, #1
553 ; CHECK-NEON-NEXT: cmp r5, #0
554 ; CHECK-NEON-NEXT: mvnne r5, #0
555 ; CHECK-NEON-NEXT: subs r0, r0, r6
556 ; CHECK-NEON-NEXT: sbcs r0, r1, #0
557 ; CHECK-NEON-NEXT: vld1.64 {d18, d19}, [r2:128]
558 ; CHECK-NEON-NEXT: mov r0, #0
559 ; CHECK-NEON-NEXT: mov r2, #0
560 ; CHECK-NEON-NEXT: movwlt r0, #1
561 ; CHECK-NEON-NEXT: cmp r0, #0
562 ; CHECK-NEON-NEXT: mvnne r0, #0
563 ; CHECK-NEON-NEXT: vmov.32 d10[1], r4
564 ; CHECK-NEON-NEXT: vdup.32 d17, r0
565 ; CHECK-NEON-NEXT: subs r0, r11, r6
566 ; CHECK-NEON-NEXT: sbcs r0, r7, #0
567 ; CHECK-NEON-NEXT: vdup.32 d16, r5
568 ; CHECK-NEON-NEXT: mov r0, #0
569 ; CHECK-NEON-NEXT: vbsl q8, q5, q9
570 ; CHECK-NEON-NEXT: movwlt r0, #1
571 ; CHECK-NEON-NEXT: cmp r0, #0
572 ; CHECK-NEON-NEXT: vmov.32 d9[1], r7
573 ; CHECK-NEON-NEXT: mvnne r0, #0
574 ; CHECK-NEON-NEXT: cmp r3, #0
575 ; CHECK-NEON-NEXT: mvn r6, #0
576 ; CHECK-NEON-NEXT: vdup.32 d21, r0
577 ; CHECK-NEON-NEXT: mvnne r3, #0
578 ; CHECK-NEON-NEXT: vmov.32 d8[1], r8
579 ; CHECK-NEON-NEXT: vmov r0, r1, d16
580 ; CHECK-NEON-NEXT: vdup.32 d20, r3
581 ; CHECK-NEON-NEXT: vbit q9, q4, q10
582 ; CHECK-NEON-NEXT: adr r5, .LCPI6_1
583 ; CHECK-NEON-NEXT: vld1.64 {d20, d21}, [r5:128]
584 ; CHECK-NEON-NEXT: vmov r5, r4, d17
585 ; CHECK-NEON-NEXT: vmov r3, r7, d18
586 ; CHECK-NEON-NEXT: rsbs r0, r0, #-2147483648
587 ; CHECK-NEON-NEXT: sbcs r0, r6, r1
588 ; CHECK-NEON-NEXT: mov r0, #0
589 ; CHECK-NEON-NEXT: movwlt r0, #1
590 ; CHECK-NEON-NEXT: cmp r0, #0
591 ; CHECK-NEON-NEXT: mvnne r0, #0
592 ; CHECK-NEON-NEXT: rsbs r1, r3, #-2147483648
593 ; CHECK-NEON-NEXT: vmov r1, r3, d19
594 ; CHECK-NEON-NEXT: sbcs r7, r6, r7
595 ; CHECK-NEON-NEXT: mov r7, #0
596 ; CHECK-NEON-NEXT: movwlt r7, #1
597 ; CHECK-NEON-NEXT: rsbs r5, r5, #-2147483648
598 ; CHECK-NEON-NEXT: sbcs r5, r6, r4
599 ; CHECK-NEON-NEXT: mov r5, #0
600 ; CHECK-NEON-NEXT: movwlt r5, #1
601 ; CHECK-NEON-NEXT: rsbs r1, r1, #-2147483648
602 ; CHECK-NEON-NEXT: sbcs r1, r6, r3
603 ; CHECK-NEON-NEXT: movwlt r2, #1
604 ; CHECK-NEON-NEXT: cmp r2, #0
605 ; CHECK-NEON-NEXT: mvnne r2, #0
606 ; CHECK-NEON-NEXT: cmp r5, #0
607 ; CHECK-NEON-NEXT: mvnne r5, #0
608 ; CHECK-NEON-NEXT: cmp r7, #0
609 ; CHECK-NEON-NEXT: vdup.32 d25, r5
610 ; CHECK-NEON-NEXT: mvnne r7, #0
611 ; CHECK-NEON-NEXT: vdup.32 d23, r2
612 ; CHECK-NEON-NEXT: vdup.32 d24, r0
613 ; CHECK-NEON-NEXT: vbif q8, q10, q12
614 ; CHECK-NEON-NEXT: vdup.32 d22, r7
615 ; CHECK-NEON-NEXT: vbif q9, q10, q11
616 ; CHECK-NEON-NEXT: vmovn.i64 d1, q8
617 ; CHECK-NEON-NEXT: vmovn.i64 d0, q9
618 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11}
619 ; CHECK-NEON-NEXT: add sp, sp, #4
620 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, r11, pc}
621 ; CHECK-NEON-NEXT: .p2align 4
622 ; CHECK-NEON-NEXT: @ %bb.1:
623 ; CHECK-NEON-NEXT: .LCPI6_0:
624 ; CHECK-NEON-NEXT: .long 2147483647 @ 0x7fffffff
625 ; CHECK-NEON-NEXT: .long 0 @ 0x0
626 ; CHECK-NEON-NEXT: .long 2147483647 @ 0x7fffffff
627 ; CHECK-NEON-NEXT: .long 0 @ 0x0
628 ; CHECK-NEON-NEXT: .LCPI6_1:
629 ; CHECK-NEON-NEXT: .long 2147483648 @ 0x80000000
630 ; CHECK-NEON-NEXT: .long 4294967295 @ 0xffffffff
631 ; CHECK-NEON-NEXT: .long 2147483648 @ 0x80000000
632 ; CHECK-NEON-NEXT: .long 4294967295 @ 0xffffffff
634 ; CHECK-FP16-LABEL: stest_f16i32:
635 ; CHECK-FP16: @ %bb.0: @ %entry
636 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
637 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
638 ; CHECK-FP16-NEXT: .vsave {d10, d11, d12, d13}
639 ; CHECK-FP16-NEXT: vpush {d10, d11, d12, d13}
640 ; CHECK-FP16-NEXT: .vsave {d8}
641 ; CHECK-FP16-NEXT: vpush {d8}
642 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[0]
643 ; CHECK-FP16-NEXT: vorr d8, d0, d0
644 ; CHECK-FP16-NEXT: vmov.u16 r6, d0[1]
645 ; CHECK-FP16-NEXT: vmov s0, r0
646 ; CHECK-FP16-NEXT: bl __fixhfdi
647 ; CHECK-FP16-NEXT: mov r4, r0
648 ; CHECK-FP16-NEXT: vmov.u16 r0, d8[2]
649 ; CHECK-FP16-NEXT: mov r8, r1
650 ; CHECK-FP16-NEXT: vmov.32 d10[0], r4
651 ; CHECK-FP16-NEXT: vmov s0, r0
652 ; CHECK-FP16-NEXT: bl __fixhfdi
653 ; CHECK-FP16-NEXT: vmov s0, r6
654 ; CHECK-FP16-NEXT: mov r5, r0
655 ; CHECK-FP16-NEXT: mov r7, r1
656 ; CHECK-FP16-NEXT: vmov.32 d12[0], r0
657 ; CHECK-FP16-NEXT: bl __fixhfdi
658 ; CHECK-FP16-NEXT: mov r9, r0
659 ; CHECK-FP16-NEXT: vmov.u16 r0, d8[3]
660 ; CHECK-FP16-NEXT: mov r10, r1
661 ; CHECK-FP16-NEXT: vmov.32 d11[0], r9
662 ; CHECK-FP16-NEXT: vmov s0, r0
663 ; CHECK-FP16-NEXT: bl __fixhfdi
664 ; CHECK-FP16-NEXT: mvn r6, #-2147483648
665 ; CHECK-FP16-NEXT: subs r3, r4, r6
666 ; CHECK-FP16-NEXT: sbcs r3, r8, #0
667 ; CHECK-FP16-NEXT: vmov.32 d13[0], r0
668 ; CHECK-FP16-NEXT: mov r3, #0
669 ; CHECK-FP16-NEXT: adr r2, .LCPI6_0
670 ; CHECK-FP16-NEXT: movwlt r3, #1
671 ; CHECK-FP16-NEXT: subs r5, r5, r6
672 ; CHECK-FP16-NEXT: sbcs r5, r7, #0
673 ; CHECK-FP16-NEXT: vmov.32 d13[1], r1
674 ; CHECK-FP16-NEXT: mov r5, #0
675 ; CHECK-FP16-NEXT: movwlt r5, #1
676 ; CHECK-FP16-NEXT: cmp r5, #0
677 ; CHECK-FP16-NEXT: mvnne r5, #0
678 ; CHECK-FP16-NEXT: subs r0, r0, r6
679 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
680 ; CHECK-FP16-NEXT: vld1.64 {d18, d19}, [r2:128]
681 ; CHECK-FP16-NEXT: mov r0, #0
682 ; CHECK-FP16-NEXT: mov r2, #0
683 ; CHECK-FP16-NEXT: movwlt r0, #1
684 ; CHECK-FP16-NEXT: cmp r0, #0
685 ; CHECK-FP16-NEXT: mvnne r0, #0
686 ; CHECK-FP16-NEXT: vmov.32 d12[1], r7
687 ; CHECK-FP16-NEXT: vdup.32 d17, r0
688 ; CHECK-FP16-NEXT: subs r0, r9, r6
689 ; CHECK-FP16-NEXT: sbcs r0, r10, #0
690 ; CHECK-FP16-NEXT: vdup.32 d16, r5
691 ; CHECK-FP16-NEXT: mov r0, #0
692 ; CHECK-FP16-NEXT: vbsl q8, q6, q9
693 ; CHECK-FP16-NEXT: movwlt r0, #1
694 ; CHECK-FP16-NEXT: cmp r0, #0
695 ; CHECK-FP16-NEXT: vmov.32 d11[1], r10
696 ; CHECK-FP16-NEXT: mvnne r0, #0
697 ; CHECK-FP16-NEXT: cmp r3, #0
698 ; CHECK-FP16-NEXT: mvn r6, #0
699 ; CHECK-FP16-NEXT: vdup.32 d21, r0
700 ; CHECK-FP16-NEXT: mvnne r3, #0
701 ; CHECK-FP16-NEXT: vmov.32 d10[1], r8
702 ; CHECK-FP16-NEXT: vmov r0, r1, d16
703 ; CHECK-FP16-NEXT: vdup.32 d20, r3
704 ; CHECK-FP16-NEXT: vbit q9, q5, q10
705 ; CHECK-FP16-NEXT: adr r5, .LCPI6_1
706 ; CHECK-FP16-NEXT: vld1.64 {d20, d21}, [r5:128]
707 ; CHECK-FP16-NEXT: vmov r5, r4, d17
708 ; CHECK-FP16-NEXT: vmov r3, r7, d18
709 ; CHECK-FP16-NEXT: rsbs r0, r0, #-2147483648
710 ; CHECK-FP16-NEXT: sbcs r0, r6, r1
711 ; CHECK-FP16-NEXT: mov r0, #0
712 ; CHECK-FP16-NEXT: movwlt r0, #1
713 ; CHECK-FP16-NEXT: cmp r0, #0
714 ; CHECK-FP16-NEXT: mvnne r0, #0
715 ; CHECK-FP16-NEXT: rsbs r1, r3, #-2147483648
716 ; CHECK-FP16-NEXT: vmov r1, r3, d19
717 ; CHECK-FP16-NEXT: sbcs r7, r6, r7
718 ; CHECK-FP16-NEXT: mov r7, #0
719 ; CHECK-FP16-NEXT: movwlt r7, #1
720 ; CHECK-FP16-NEXT: rsbs r5, r5, #-2147483648
721 ; CHECK-FP16-NEXT: sbcs r5, r6, r4
722 ; CHECK-FP16-NEXT: mov r5, #0
723 ; CHECK-FP16-NEXT: movwlt r5, #1
724 ; CHECK-FP16-NEXT: rsbs r1, r1, #-2147483648
725 ; CHECK-FP16-NEXT: sbcs r1, r6, r3
726 ; CHECK-FP16-NEXT: movwlt r2, #1
727 ; CHECK-FP16-NEXT: cmp r2, #0
728 ; CHECK-FP16-NEXT: mvnne r2, #0
729 ; CHECK-FP16-NEXT: cmp r5, #0
730 ; CHECK-FP16-NEXT: mvnne r5, #0
731 ; CHECK-FP16-NEXT: cmp r7, #0
732 ; CHECK-FP16-NEXT: vdup.32 d25, r5
733 ; CHECK-FP16-NEXT: mvnne r7, #0
734 ; CHECK-FP16-NEXT: vdup.32 d23, r2
735 ; CHECK-FP16-NEXT: vdup.32 d24, r0
736 ; CHECK-FP16-NEXT: vbif q8, q10, q12
737 ; CHECK-FP16-NEXT: vdup.32 d22, r7
738 ; CHECK-FP16-NEXT: vbif q9, q10, q11
739 ; CHECK-FP16-NEXT: vmovn.i64 d1, q8
740 ; CHECK-FP16-NEXT: vmovn.i64 d0, q9
741 ; CHECK-FP16-NEXT: vpop {d8}
742 ; CHECK-FP16-NEXT: vpop {d10, d11, d12, d13}
743 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
744 ; CHECK-FP16-NEXT: .p2align 4
745 ; CHECK-FP16-NEXT: @ %bb.1:
746 ; CHECK-FP16-NEXT: .LCPI6_0:
747 ; CHECK-FP16-NEXT: .long 2147483647 @ 0x7fffffff
748 ; CHECK-FP16-NEXT: .long 0 @ 0x0
749 ; CHECK-FP16-NEXT: .long 2147483647 @ 0x7fffffff
750 ; CHECK-FP16-NEXT: .long 0 @ 0x0
751 ; CHECK-FP16-NEXT: .LCPI6_1:
752 ; CHECK-FP16-NEXT: .long 2147483648 @ 0x80000000
753 ; CHECK-FP16-NEXT: .long 4294967295 @ 0xffffffff
754 ; CHECK-FP16-NEXT: .long 2147483648 @ 0x80000000
755 ; CHECK-FP16-NEXT: .long 4294967295 @ 0xffffffff
757 %conv = fptosi <4 x half> %x to <4 x i64>
758 %0 = icmp slt <4 x i64> %conv, <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>
759 %spec.store.select = select <4 x i1> %0, <4 x i64> %conv, <4 x i64> <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>
760 %1 = icmp sgt <4 x i64> %spec.store.select, <i64 -2147483648, i64 -2147483648, i64 -2147483648, i64 -2147483648>
761 %spec.store.select7 = select <4 x i1> %1, <4 x i64> %spec.store.select, <4 x i64> <i64 -2147483648, i64 -2147483648, i64 -2147483648, i64 -2147483648>
762 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
766 define <4 x i32> @utesth_f16i32(<4 x half> %x) {
767 ; CHECK-NEON-LABEL: utesth_f16i32:
768 ; CHECK-NEON: @ %bb.0: @ %entry
769 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
770 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
771 ; CHECK-NEON-NEXT: .vsave {d12, d13}
772 ; CHECK-NEON-NEXT: vpush {d12, d13}
773 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10}
774 ; CHECK-NEON-NEXT: vpush {d8, d9, d10}
775 ; CHECK-NEON-NEXT: vmov r0, s3
776 ; CHECK-NEON-NEXT: vmov.f32 s16, s2
777 ; CHECK-NEON-NEXT: vmov.f32 s18, s1
778 ; CHECK-NEON-NEXT: vmov.f32 s20, s0
779 ; CHECK-NEON-NEXT: bl __aeabi_h2f
780 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
781 ; CHECK-NEON-NEXT: mov r10, r0
782 ; CHECK-NEON-NEXT: vmov r0, s18
783 ; CHECK-NEON-NEXT: mov r8, r1
784 ; CHECK-NEON-NEXT: bl __aeabi_h2f
785 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
786 ; CHECK-NEON-NEXT: mov r6, r0
787 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
788 ; CHECK-NEON-NEXT: vmov r0, s20
789 ; CHECK-NEON-NEXT: mov r9, r1
790 ; CHECK-NEON-NEXT: bl __aeabi_h2f
791 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
792 ; CHECK-NEON-NEXT: mov r5, r0
793 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
794 ; CHECK-NEON-NEXT: vmov r0, s16
795 ; CHECK-NEON-NEXT: mov r7, r1
796 ; CHECK-NEON-NEXT: bl __aeabi_h2f
797 ; CHECK-NEON-NEXT: vmov.32 d9[0], r10
798 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
799 ; CHECK-NEON-NEXT: mvn r4, #0
800 ; CHECK-NEON-NEXT: subs r2, r5, r4
801 ; CHECK-NEON-NEXT: sbcs r2, r7, #0
802 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
803 ; CHECK-NEON-NEXT: mov r2, #0
804 ; CHECK-NEON-NEXT: mov r3, #0
805 ; CHECK-NEON-NEXT: movwlo r2, #1
806 ; CHECK-NEON-NEXT: subs r0, r0, r4
807 ; CHECK-NEON-NEXT: sbcs r0, r1, #0
808 ; CHECK-NEON-NEXT: mov r0, #0
809 ; CHECK-NEON-NEXT: movwlo r0, #1
810 ; CHECK-NEON-NEXT: cmp r0, #0
811 ; CHECK-NEON-NEXT: mvnne r0, #0
812 ; CHECK-NEON-NEXT: subs r1, r10, r4
813 ; CHECK-NEON-NEXT: sbcs r1, r8, #0
814 ; CHECK-NEON-NEXT: mov r1, #0
815 ; CHECK-NEON-NEXT: movwlo r1, #1
816 ; CHECK-NEON-NEXT: subs r7, r6, r4
817 ; CHECK-NEON-NEXT: sbcs r7, r9, #0
818 ; CHECK-NEON-NEXT: movwlo r3, #1
819 ; CHECK-NEON-NEXT: cmp r3, #0
820 ; CHECK-NEON-NEXT: mvnne r3, #0
821 ; CHECK-NEON-NEXT: cmp r1, #0
822 ; CHECK-NEON-NEXT: mvnne r1, #0
823 ; CHECK-NEON-NEXT: cmp r2, #0
824 ; CHECK-NEON-NEXT: vdup.32 d19, r1
825 ; CHECK-NEON-NEXT: mvnne r2, #0
826 ; CHECK-NEON-NEXT: vdup.32 d17, r3
827 ; CHECK-NEON-NEXT: vdup.32 d18, r0
828 ; CHECK-NEON-NEXT: vand q10, q4, q9
829 ; CHECK-NEON-NEXT: vdup.32 d16, r2
830 ; CHECK-NEON-NEXT: vand q11, q6, q8
831 ; CHECK-NEON-NEXT: vorn q9, q10, q9
832 ; CHECK-NEON-NEXT: vorn q8, q11, q8
833 ; CHECK-NEON-NEXT: vmovn.i64 d1, q9
834 ; CHECK-NEON-NEXT: vmovn.i64 d0, q8
835 ; CHECK-NEON-NEXT: vpop {d8, d9, d10}
836 ; CHECK-NEON-NEXT: vpop {d12, d13}
837 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
839 ; CHECK-FP16-LABEL: utesth_f16i32:
840 ; CHECK-FP16: @ %bb.0: @ %entry
841 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
842 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
843 ; CHECK-FP16-NEXT: .vsave {d8, d9, d10, d11}
844 ; CHECK-FP16-NEXT: vpush {d8, d9, d10, d11}
845 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
846 ; CHECK-FP16-NEXT: vorr d8, d0, d0
847 ; CHECK-FP16-NEXT: vmov.u16 r5, d0[3]
848 ; CHECK-FP16-NEXT: vmov s0, r0
849 ; CHECK-FP16-NEXT: bl __fixunshfdi
850 ; CHECK-FP16-NEXT: mov r10, r0
851 ; CHECK-FP16-NEXT: vmov.u16 r0, d8[0]
852 ; CHECK-FP16-NEXT: mov r8, r1
853 ; CHECK-FP16-NEXT: vmov.32 d11[0], r10
854 ; CHECK-FP16-NEXT: vmov s0, r0
855 ; CHECK-FP16-NEXT: bl __fixunshfdi
856 ; CHECK-FP16-NEXT: vmov s0, r5
857 ; CHECK-FP16-NEXT: mov r6, r0
858 ; CHECK-FP16-NEXT: mov r7, r1
859 ; CHECK-FP16-NEXT: vmov.32 d10[0], r0
860 ; CHECK-FP16-NEXT: bl __fixunshfdi
861 ; CHECK-FP16-NEXT: mov r5, r0
862 ; CHECK-FP16-NEXT: vmov.u16 r0, d8[2]
863 ; CHECK-FP16-NEXT: mov r9, r1
864 ; CHECK-FP16-NEXT: vmov.32 d9[0], r5
865 ; CHECK-FP16-NEXT: vmov s0, r0
866 ; CHECK-FP16-NEXT: bl __fixunshfdi
867 ; CHECK-FP16-NEXT: mvn r4, #0
868 ; CHECK-FP16-NEXT: subs r2, r6, r4
869 ; CHECK-FP16-NEXT: sbcs r2, r7, #0
870 ; CHECK-FP16-NEXT: vmov.32 d8[0], r0
871 ; CHECK-FP16-NEXT: mov r2, #0
872 ; CHECK-FP16-NEXT: mov r3, #0
873 ; CHECK-FP16-NEXT: movwlo r2, #1
874 ; CHECK-FP16-NEXT: subs r0, r0, r4
875 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
876 ; CHECK-FP16-NEXT: mov r0, #0
877 ; CHECK-FP16-NEXT: movwlo r0, #1
878 ; CHECK-FP16-NEXT: cmp r0, #0
879 ; CHECK-FP16-NEXT: mvnne r0, #0
880 ; CHECK-FP16-NEXT: subs r1, r5, r4
881 ; CHECK-FP16-NEXT: sbcs r1, r9, #0
882 ; CHECK-FP16-NEXT: mov r1, #0
883 ; CHECK-FP16-NEXT: movwlo r1, #1
884 ; CHECK-FP16-NEXT: subs r7, r10, r4
885 ; CHECK-FP16-NEXT: sbcs r7, r8, #0
886 ; CHECK-FP16-NEXT: movwlo r3, #1
887 ; CHECK-FP16-NEXT: cmp r3, #0
888 ; CHECK-FP16-NEXT: mvnne r3, #0
889 ; CHECK-FP16-NEXT: cmp r1, #0
890 ; CHECK-FP16-NEXT: mvnne r1, #0
891 ; CHECK-FP16-NEXT: cmp r2, #0
892 ; CHECK-FP16-NEXT: vdup.32 d19, r1
893 ; CHECK-FP16-NEXT: mvnne r2, #0
894 ; CHECK-FP16-NEXT: vdup.32 d17, r3
895 ; CHECK-FP16-NEXT: vdup.32 d18, r0
896 ; CHECK-FP16-NEXT: vand q10, q4, q9
897 ; CHECK-FP16-NEXT: vdup.32 d16, r2
898 ; CHECK-FP16-NEXT: vand q11, q5, q8
899 ; CHECK-FP16-NEXT: vorn q9, q10, q9
900 ; CHECK-FP16-NEXT: vorn q8, q11, q8
901 ; CHECK-FP16-NEXT: vmovn.i64 d1, q9
902 ; CHECK-FP16-NEXT: vmovn.i64 d0, q8
903 ; CHECK-FP16-NEXT: vpop {d8, d9, d10, d11}
904 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
906 %conv = fptoui <4 x half> %x to <4 x i64>
907 %0 = icmp ult <4 x i64> %conv, <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
908 %spec.store.select = select <4 x i1> %0, <4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
909 %conv6 = trunc <4 x i64> %spec.store.select to <4 x i32>
913 define <4 x i32> @ustest_f16i32(<4 x half> %x) {
914 ; CHECK-NEON-LABEL: ustest_f16i32:
915 ; CHECK-NEON: @ %bb.0: @ %entry
916 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
917 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
918 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
919 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13}
920 ; CHECK-NEON-NEXT: vmov r0, s1
921 ; CHECK-NEON-NEXT: vmov.f32 s16, s3
922 ; CHECK-NEON-NEXT: vmov.f32 s18, s2
923 ; CHECK-NEON-NEXT: vmov.f32 s20, s0
924 ; CHECK-NEON-NEXT: bl __aeabi_h2f
925 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
926 ; CHECK-NEON-NEXT: mov r6, r0
927 ; CHECK-NEON-NEXT: vmov r0, s20
928 ; CHECK-NEON-NEXT: mov r7, r1
929 ; CHECK-NEON-NEXT: vmov r5, s18
930 ; CHECK-NEON-NEXT: vmov r8, s16
931 ; CHECK-NEON-NEXT: vmov.32 d9[0], r6
932 ; CHECK-NEON-NEXT: bl __aeabi_h2f
933 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
934 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
935 ; CHECK-NEON-NEXT: mvn r9, #0
936 ; CHECK-NEON-NEXT: subs r0, r0, r9
937 ; CHECK-NEON-NEXT: mov r4, #0
938 ; CHECK-NEON-NEXT: sbcs r0, r1, #0
939 ; CHECK-NEON-NEXT: vmov.32 d9[1], r7
940 ; CHECK-NEON-NEXT: mov r0, #0
941 ; CHECK-NEON-NEXT: movwlt r0, #1
942 ; CHECK-NEON-NEXT: cmp r0, #0
943 ; CHECK-NEON-NEXT: vmov.32 d8[1], r1
944 ; CHECK-NEON-NEXT: mvnne r0, #0
945 ; CHECK-NEON-NEXT: subs r1, r6, r9
946 ; CHECK-NEON-NEXT: sbcs r1, r7, #0
947 ; CHECK-NEON-NEXT: mov r1, #0
948 ; CHECK-NEON-NEXT: movwlt r1, #1
949 ; CHECK-NEON-NEXT: cmp r1, #0
950 ; CHECK-NEON-NEXT: mvnne r1, #0
951 ; CHECK-NEON-NEXT: vdup.32 d13, r1
952 ; CHECK-NEON-NEXT: vdup.32 d12, r0
953 ; CHECK-NEON-NEXT: mov r0, r5
954 ; CHECK-NEON-NEXT: bl __aeabi_h2f
955 ; CHECK-NEON-NEXT: vmov.i64 q5, #0xffffffff
956 ; CHECK-NEON-NEXT: vbif q4, q5, q6
957 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
958 ; CHECK-NEON-NEXT: mov r5, r0
959 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
960 ; CHECK-NEON-NEXT: mov r0, r8
961 ; CHECK-NEON-NEXT: mov r6, r1
962 ; CHECK-NEON-NEXT: vmov r7, r10, d8
963 ; CHECK-NEON-NEXT: bl __aeabi_h2f
964 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
965 ; CHECK-NEON-NEXT: subs r2, r5, r9
966 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
967 ; CHECK-NEON-NEXT: sbcs r2, r6, #0
968 ; CHECK-NEON-NEXT: mov r2, #0
969 ; CHECK-NEON-NEXT: movwlt r2, #1
970 ; CHECK-NEON-NEXT: subs r0, r0, r9
971 ; CHECK-NEON-NEXT: sbcs r0, r1, #0
972 ; CHECK-NEON-NEXT: vmov.32 d13[1], r1
973 ; CHECK-NEON-NEXT: mov r0, #0
974 ; CHECK-NEON-NEXT: movwlt r0, #1
975 ; CHECK-NEON-NEXT: cmp r0, #0
976 ; CHECK-NEON-NEXT: mvnne r0, #0
977 ; CHECK-NEON-NEXT: cmp r2, #0
978 ; CHECK-NEON-NEXT: vmov.32 d12[1], r6
979 ; CHECK-NEON-NEXT: mvnne r2, #0
980 ; CHECK-NEON-NEXT: vdup.32 d17, r0
981 ; CHECK-NEON-NEXT: rsbs r0, r7, #0
982 ; CHECK-NEON-NEXT: vdup.32 d16, r2
983 ; CHECK-NEON-NEXT: vmov r7, r5, d9
984 ; CHECK-NEON-NEXT: vbsl q8, q6, q5
985 ; CHECK-NEON-NEXT: rscs r0, r10, #0
986 ; CHECK-NEON-NEXT: mov r0, #0
987 ; CHECK-NEON-NEXT: movwlt r0, #1
988 ; CHECK-NEON-NEXT: vmov r1, r2, d16
989 ; CHECK-NEON-NEXT: vmov r3, r6, d17
990 ; CHECK-NEON-NEXT: rsbs r1, r1, #0
991 ; CHECK-NEON-NEXT: rscs r1, r2, #0
992 ; CHECK-NEON-NEXT: mov r1, #0
993 ; CHECK-NEON-NEXT: movwlt r1, #1
994 ; CHECK-NEON-NEXT: rsbs r2, r3, #0
995 ; CHECK-NEON-NEXT: rscs r2, r6, #0
996 ; CHECK-NEON-NEXT: mov r2, #0
997 ; CHECK-NEON-NEXT: movwlt r2, #1
998 ; CHECK-NEON-NEXT: rsbs r3, r7, #0
999 ; CHECK-NEON-NEXT: rscs r3, r5, #0
1000 ; CHECK-NEON-NEXT: movwlt r4, #1
1001 ; CHECK-NEON-NEXT: cmp r4, #0
1002 ; CHECK-NEON-NEXT: mvnne r4, #0
1003 ; CHECK-NEON-NEXT: cmp r2, #0
1004 ; CHECK-NEON-NEXT: mvnne r2, #0
1005 ; CHECK-NEON-NEXT: cmp r1, #0
1006 ; CHECK-NEON-NEXT: mvnne r1, #0
1007 ; CHECK-NEON-NEXT: vmov.32 d21[0], r2
1008 ; CHECK-NEON-NEXT: cmp r0, #0
1009 ; CHECK-NEON-NEXT: vmov.32 d20[0], r1
1010 ; CHECK-NEON-NEXT: mvnne r0, #0
1011 ; CHECK-NEON-NEXT: vmov.32 d19[0], r4
1012 ; CHECK-NEON-NEXT: vand q8, q8, q10
1013 ; CHECK-NEON-NEXT: vmov.32 d18[0], r0
1014 ; CHECK-NEON-NEXT: vmovn.i64 d1, q8
1015 ; CHECK-NEON-NEXT: vand q9, q4, q9
1016 ; CHECK-NEON-NEXT: vmovn.i64 d0, q9
1017 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13}
1018 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
1020 ; CHECK-FP16-LABEL: ustest_f16i32:
1021 ; CHECK-FP16: @ %bb.0: @ %entry
1022 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r11, lr}
1023 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r11, lr}
1024 ; CHECK-FP16-NEXT: .vsave {d10, d11, d12, d13, d14, d15}
1025 ; CHECK-FP16-NEXT: vpush {d10, d11, d12, d13, d14, d15}
1026 ; CHECK-FP16-NEXT: .vsave {d8}
1027 ; CHECK-FP16-NEXT: vpush {d8}
1028 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
1029 ; CHECK-FP16-NEXT: vorr d8, d0, d0
1030 ; CHECK-FP16-NEXT: vmov.u16 r8, d0[2]
1031 ; CHECK-FP16-NEXT: vmov.u16 r9, d0[3]
1032 ; CHECK-FP16-NEXT: vmov s0, r0
1033 ; CHECK-FP16-NEXT: bl __fixhfdi
1034 ; CHECK-FP16-NEXT: mov r4, r0
1035 ; CHECK-FP16-NEXT: vmov.u16 r0, d8[0]
1036 ; CHECK-FP16-NEXT: mov r5, r1
1037 ; CHECK-FP16-NEXT: vmov.32 d11[0], r4
1038 ; CHECK-FP16-NEXT: vmov s0, r0
1039 ; CHECK-FP16-NEXT: bl __fixhfdi
1040 ; CHECK-FP16-NEXT: vmov.32 d10[0], r0
1041 ; CHECK-FP16-NEXT: mvn r7, #0
1042 ; CHECK-FP16-NEXT: subs r0, r0, r7
1043 ; CHECK-FP16-NEXT: vmov.i64 q6, #0xffffffff
1044 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
1045 ; CHECK-FP16-NEXT: vmov.32 d11[1], r5
1046 ; CHECK-FP16-NEXT: mov r0, #0
1047 ; CHECK-FP16-NEXT: vmov s0, r8
1048 ; CHECK-FP16-NEXT: movwlt r0, #1
1049 ; CHECK-FP16-NEXT: cmp r0, #0
1050 ; CHECK-FP16-NEXT: vmov.32 d10[1], r1
1051 ; CHECK-FP16-NEXT: mvnne r0, #0
1052 ; CHECK-FP16-NEXT: subs r1, r4, r7
1053 ; CHECK-FP16-NEXT: mov r6, #0
1054 ; CHECK-FP16-NEXT: sbcs r1, r5, #0
1055 ; CHECK-FP16-NEXT: vmov s16, r9
1056 ; CHECK-FP16-NEXT: mov r1, #0
1057 ; CHECK-FP16-NEXT: movwlt r1, #1
1058 ; CHECK-FP16-NEXT: cmp r1, #0
1059 ; CHECK-FP16-NEXT: mvnne r1, #0
1060 ; CHECK-FP16-NEXT: vdup.32 d17, r1
1061 ; CHECK-FP16-NEXT: vdup.32 d16, r0
1062 ; CHECK-FP16-NEXT: vbif q5, q6, q8
1063 ; CHECK-FP16-NEXT: vmov r9, r8, d10
1064 ; CHECK-FP16-NEXT: bl __fixhfdi
1065 ; CHECK-FP16-NEXT: vmov.f32 s0, s16
1066 ; CHECK-FP16-NEXT: mov r4, r0
1067 ; CHECK-FP16-NEXT: mov r5, r1
1068 ; CHECK-FP16-NEXT: vmov.32 d14[0], r0
1069 ; CHECK-FP16-NEXT: bl __fixhfdi
1070 ; CHECK-FP16-NEXT: subs r2, r4, r7
1071 ; CHECK-FP16-NEXT: vmov.32 d15[0], r0
1072 ; CHECK-FP16-NEXT: sbcs r2, r5, #0
1073 ; CHECK-FP16-NEXT: mov r2, #0
1074 ; CHECK-FP16-NEXT: movwlt r2, #1
1075 ; CHECK-FP16-NEXT: subs r0, r0, r7
1076 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
1077 ; CHECK-FP16-NEXT: vmov.32 d15[1], r1
1078 ; CHECK-FP16-NEXT: mov r0, #0
1079 ; CHECK-FP16-NEXT: movwlt r0, #1
1080 ; CHECK-FP16-NEXT: cmp r0, #0
1081 ; CHECK-FP16-NEXT: mvnne r0, #0
1082 ; CHECK-FP16-NEXT: cmp r2, #0
1083 ; CHECK-FP16-NEXT: vmov.32 d14[1], r5
1084 ; CHECK-FP16-NEXT: mvnne r2, #0
1085 ; CHECK-FP16-NEXT: vmov r5, r4, d11
1086 ; CHECK-FP16-NEXT: vdup.32 d17, r0
1087 ; CHECK-FP16-NEXT: rsbs r0, r9, #0
1088 ; CHECK-FP16-NEXT: vdup.32 d16, r2
1089 ; CHECK-FP16-NEXT: rscs r0, r8, #0
1090 ; CHECK-FP16-NEXT: vbsl q8, q7, q6
1091 ; CHECK-FP16-NEXT: mov r0, #0
1092 ; CHECK-FP16-NEXT: movwlt r0, #1
1093 ; CHECK-FP16-NEXT: vmov r1, r2, d16
1094 ; CHECK-FP16-NEXT: vmov r3, r7, d17
1095 ; CHECK-FP16-NEXT: rsbs r1, r1, #0
1096 ; CHECK-FP16-NEXT: rscs r1, r2, #0
1097 ; CHECK-FP16-NEXT: mov r1, #0
1098 ; CHECK-FP16-NEXT: movwlt r1, #1
1099 ; CHECK-FP16-NEXT: rsbs r2, r3, #0
1100 ; CHECK-FP16-NEXT: rscs r2, r7, #0
1101 ; CHECK-FP16-NEXT: mov r2, #0
1102 ; CHECK-FP16-NEXT: movwlt r2, #1
1103 ; CHECK-FP16-NEXT: rsbs r3, r5, #0
1104 ; CHECK-FP16-NEXT: rscs r3, r4, #0
1105 ; CHECK-FP16-NEXT: movwlt r6, #1
1106 ; CHECK-FP16-NEXT: cmp r6, #0
1107 ; CHECK-FP16-NEXT: mvnne r6, #0
1108 ; CHECK-FP16-NEXT: cmp r2, #0
1109 ; CHECK-FP16-NEXT: mvnne r2, #0
1110 ; CHECK-FP16-NEXT: cmp r1, #0
1111 ; CHECK-FP16-NEXT: mvnne r1, #0
1112 ; CHECK-FP16-NEXT: vmov.32 d21[0], r2
1113 ; CHECK-FP16-NEXT: cmp r0, #0
1114 ; CHECK-FP16-NEXT: vmov.32 d20[0], r1
1115 ; CHECK-FP16-NEXT: mvnne r0, #0
1116 ; CHECK-FP16-NEXT: vmov.32 d19[0], r6
1117 ; CHECK-FP16-NEXT: vand q8, q8, q10
1118 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
1119 ; CHECK-FP16-NEXT: vmovn.i64 d1, q8
1120 ; CHECK-FP16-NEXT: vand q9, q5, q9
1121 ; CHECK-FP16-NEXT: vmovn.i64 d0, q9
1122 ; CHECK-FP16-NEXT: vpop {d8}
1123 ; CHECK-FP16-NEXT: vpop {d10, d11, d12, d13, d14, d15}
1124 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r11, pc}
1126 %conv = fptosi <4 x half> %x to <4 x i64>
1127 %0 = icmp slt <4 x i64> %conv, <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
1128 %spec.store.select = select <4 x i1> %0, <4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>
1129 %1 = icmp sgt <4 x i64> %spec.store.select, zeroinitializer
1130 %spec.store.select7 = select <4 x i1> %1, <4 x i64> %spec.store.select, <4 x i64> zeroinitializer
1131 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
1132 ret <4 x i32> %conv6
1137 define <2 x i16> @stest_f64i16(<2 x double> %x) {
1138 ; CHECK-LABEL: stest_f64i16:
1139 ; CHECK: @ %bb.0: @ %entry
1140 ; CHECK-NEXT: vcvt.s32.f64 s4, d0
1141 ; CHECK-NEXT: vmov r0, s4
1142 ; CHECK-NEXT: vcvt.s32.f64 s0, d1
1143 ; CHECK-NEXT: vmov.i32 d17, #0x7fff
1144 ; CHECK-NEXT: vmvn.i32 d18, #0x7fff
1145 ; CHECK-NEXT: vmov.32 d16[0], r0
1146 ; CHECK-NEXT: vmov r0, s0
1147 ; CHECK-NEXT: vmov.32 d16[1], r0
1148 ; CHECK-NEXT: vmin.s32 d16, d16, d17
1149 ; CHECK-NEXT: vmax.s32 d0, d16, d18
1152 %conv = fptosi <2 x double> %x to <2 x i32>
1153 %0 = icmp slt <2 x i32> %conv, <i32 32767, i32 32767>
1154 %spec.store.select = select <2 x i1> %0, <2 x i32> %conv, <2 x i32> <i32 32767, i32 32767>
1155 %1 = icmp sgt <2 x i32> %spec.store.select, <i32 -32768, i32 -32768>
1156 %spec.store.select7 = select <2 x i1> %1, <2 x i32> %spec.store.select, <2 x i32> <i32 -32768, i32 -32768>
1157 %conv6 = trunc <2 x i32> %spec.store.select7 to <2 x i16>
1158 ret <2 x i16> %conv6
1161 define <2 x i16> @utest_f64i16(<2 x double> %x) {
1162 ; CHECK-LABEL: utest_f64i16:
1163 ; CHECK: @ %bb.0: @ %entry
1164 ; CHECK-NEXT: vcvt.u32.f64 s4, d0
1165 ; CHECK-NEXT: vmov r0, s4
1166 ; CHECK-NEXT: vcvt.u32.f64 s0, d1
1167 ; CHECK-NEXT: vmov.i32 d17, #0xffff
1168 ; CHECK-NEXT: vmov.32 d16[0], r0
1169 ; CHECK-NEXT: vmov r0, s0
1170 ; CHECK-NEXT: vmov.32 d16[1], r0
1171 ; CHECK-NEXT: vmin.u32 d0, d16, d17
1174 %conv = fptoui <2 x double> %x to <2 x i32>
1175 %0 = icmp ult <2 x i32> %conv, <i32 65535, i32 65535>
1176 %spec.store.select = select <2 x i1> %0, <2 x i32> %conv, <2 x i32> <i32 65535, i32 65535>
1177 %conv6 = trunc <2 x i32> %spec.store.select to <2 x i16>
1178 ret <2 x i16> %conv6
1181 define <2 x i16> @ustest_f64i16(<2 x double> %x) {
1182 ; CHECK-LABEL: ustest_f64i16:
1183 ; CHECK: @ %bb.0: @ %entry
1184 ; CHECK-NEXT: vcvt.s32.f64 s4, d0
1185 ; CHECK-NEXT: vmov r0, s4
1186 ; CHECK-NEXT: vcvt.s32.f64 s0, d1
1187 ; CHECK-NEXT: vmov.i32 d17, #0xffff
1188 ; CHECK-NEXT: vmov.i32 d18, #0x0
1189 ; CHECK-NEXT: vmov.32 d16[0], r0
1190 ; CHECK-NEXT: vmov r0, s0
1191 ; CHECK-NEXT: vmov.32 d16[1], r0
1192 ; CHECK-NEXT: vmin.s32 d16, d16, d17
1193 ; CHECK-NEXT: vmax.s32 d0, d16, d18
1196 %conv = fptosi <2 x double> %x to <2 x i32>
1197 %0 = icmp slt <2 x i32> %conv, <i32 65535, i32 65535>
1198 %spec.store.select = select <2 x i1> %0, <2 x i32> %conv, <2 x i32> <i32 65535, i32 65535>
1199 %1 = icmp sgt <2 x i32> %spec.store.select, zeroinitializer
1200 %spec.store.select7 = select <2 x i1> %1, <2 x i32> %spec.store.select, <2 x i32> zeroinitializer
1201 %conv6 = trunc <2 x i32> %spec.store.select7 to <2 x i16>
1202 ret <2 x i16> %conv6
1205 define <4 x i16> @stest_f32i16(<4 x float> %x) {
1206 ; CHECK-LABEL: stest_f32i16:
1207 ; CHECK: @ %bb.0: @ %entry
1208 ; CHECK-NEXT: vcvt.s32.f32 q8, q0
1209 ; CHECK-NEXT: vmov.i32 q9, #0x7fff
1210 ; CHECK-NEXT: vmvn.i32 q10, #0x7fff
1211 ; CHECK-NEXT: vmin.s32 q8, q8, q9
1212 ; CHECK-NEXT: vmax.s32 q8, q8, q10
1213 ; CHECK-NEXT: vmovn.i32 d0, q8
1216 %conv = fptosi <4 x float> %x to <4 x i32>
1217 %0 = icmp slt <4 x i32> %conv, <i32 32767, i32 32767, i32 32767, i32 32767>
1218 %spec.store.select = select <4 x i1> %0, <4 x i32> %conv, <4 x i32> <i32 32767, i32 32767, i32 32767, i32 32767>
1219 %1 = icmp sgt <4 x i32> %spec.store.select, <i32 -32768, i32 -32768, i32 -32768, i32 -32768>
1220 %spec.store.select7 = select <4 x i1> %1, <4 x i32> %spec.store.select, <4 x i32> <i32 -32768, i32 -32768, i32 -32768, i32 -32768>
1221 %conv6 = trunc <4 x i32> %spec.store.select7 to <4 x i16>
1222 ret <4 x i16> %conv6
1225 define <4 x i16> @utest_f32i16(<4 x float> %x) {
1226 ; CHECK-LABEL: utest_f32i16:
1227 ; CHECK: @ %bb.0: @ %entry
1228 ; CHECK-NEXT: vcvt.u32.f32 q8, q0
1229 ; CHECK-NEXT: vmov.i32 q9, #0xffff
1230 ; CHECK-NEXT: vmin.u32 q8, q8, q9
1231 ; CHECK-NEXT: vmovn.i32 d0, q8
1234 %conv = fptoui <4 x float> %x to <4 x i32>
1235 %0 = icmp ult <4 x i32> %conv, <i32 65535, i32 65535, i32 65535, i32 65535>
1236 %spec.store.select = select <4 x i1> %0, <4 x i32> %conv, <4 x i32> <i32 65535, i32 65535, i32 65535, i32 65535>
1237 %conv6 = trunc <4 x i32> %spec.store.select to <4 x i16>
1238 ret <4 x i16> %conv6
1241 define <4 x i16> @ustest_f32i16(<4 x float> %x) {
1242 ; CHECK-LABEL: ustest_f32i16:
1243 ; CHECK: @ %bb.0: @ %entry
1244 ; CHECK-NEXT: vcvt.s32.f32 q8, q0
1245 ; CHECK-NEXT: vmov.i32 q9, #0xffff
1246 ; CHECK-NEXT: vmov.i32 q10, #0x0
1247 ; CHECK-NEXT: vmin.s32 q8, q8, q9
1248 ; CHECK-NEXT: vmax.s32 q8, q8, q10
1249 ; CHECK-NEXT: vmovn.i32 d0, q8
1252 %conv = fptosi <4 x float> %x to <4 x i32>
1253 %0 = icmp slt <4 x i32> %conv, <i32 65535, i32 65535, i32 65535, i32 65535>
1254 %spec.store.select = select <4 x i1> %0, <4 x i32> %conv, <4 x i32> <i32 65535, i32 65535, i32 65535, i32 65535>
1255 %1 = icmp sgt <4 x i32> %spec.store.select, zeroinitializer
1256 %spec.store.select7 = select <4 x i1> %1, <4 x i32> %spec.store.select, <4 x i32> zeroinitializer
1257 %conv6 = trunc <4 x i32> %spec.store.select7 to <4 x i16>
1258 ret <4 x i16> %conv6
1261 define <8 x i16> @stest_f16i16(<8 x half> %x) {
1262 ; CHECK-NEON-LABEL: stest_f16i16:
1263 ; CHECK-NEON: @ %bb.0: @ %entry
1264 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
1265 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
1266 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
1267 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
1268 ; CHECK-NEON-NEXT: vmov r0, s1
1269 ; CHECK-NEON-NEXT: vmov.f32 s16, s7
1270 ; CHECK-NEON-NEXT: vmov.f32 s18, s6
1271 ; CHECK-NEON-NEXT: vmov.f32 s20, s5
1272 ; CHECK-NEON-NEXT: vmov.f32 s22, s4
1273 ; CHECK-NEON-NEXT: vmov.f32 s24, s3
1274 ; CHECK-NEON-NEXT: vmov.f32 s26, s2
1275 ; CHECK-NEON-NEXT: vmov.f32 s28, s0
1276 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1277 ; CHECK-NEON-NEXT: mov r4, r0
1278 ; CHECK-NEON-NEXT: vmov r0, s26
1279 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1280 ; CHECK-NEON-NEXT: mov r5, r0
1281 ; CHECK-NEON-NEXT: vmov r0, s22
1282 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1283 ; CHECK-NEON-NEXT: mov r6, r0
1284 ; CHECK-NEON-NEXT: vmov r0, s24
1285 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1286 ; CHECK-NEON-NEXT: mov r7, r0
1287 ; CHECK-NEON-NEXT: vmov r0, s18
1288 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1289 ; CHECK-NEON-NEXT: vmov s0, r0
1290 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1291 ; CHECK-NEON-NEXT: vmov r0, s0
1292 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
1293 ; CHECK-NEON-NEXT: vmov r0, s16
1294 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1295 ; CHECK-NEON-NEXT: vmov s0, r0
1296 ; CHECK-NEON-NEXT: vmov s22, r7
1297 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1298 ; CHECK-NEON-NEXT: vmov s30, r6
1299 ; CHECK-NEON-NEXT: vmov r0, s0
1300 ; CHECK-NEON-NEXT: vmov.32 d13[1], r0
1301 ; CHECK-NEON-NEXT: vmov r0, s28
1302 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1303 ; CHECK-NEON-NEXT: vmov s0, r0
1304 ; CHECK-NEON-NEXT: vmov r1, s20
1305 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1306 ; CHECK-NEON-NEXT: vmov s2, r5
1307 ; CHECK-NEON-NEXT: vcvt.s32.f32 s20, s2
1308 ; CHECK-NEON-NEXT: vmov r0, s0
1309 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s30
1310 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
1311 ; CHECK-NEON-NEXT: vmov r0, s0
1312 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
1313 ; CHECK-NEON-NEXT: mov r0, r1
1314 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1315 ; CHECK-NEON-NEXT: vmov s0, r0
1316 ; CHECK-NEON-NEXT: vmov r0, s20
1317 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1318 ; CHECK-NEON-NEXT: vmov s2, r4
1319 ; CHECK-NEON-NEXT: vmov.i32 q8, #0x7fff
1320 ; CHECK-NEON-NEXT: vcvt.s32.f32 s2, s2
1321 ; CHECK-NEON-NEXT: vmvn.i32 q9, #0x7fff
1322 ; CHECK-NEON-NEXT: vmov.32 d9[0], r0
1323 ; CHECK-NEON-NEXT: vmov r0, s0
1324 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s22
1325 ; CHECK-NEON-NEXT: vmov.32 d12[1], r0
1326 ; CHECK-NEON-NEXT: vmov r0, s0
1327 ; CHECK-NEON-NEXT: vmin.s32 q10, q6, q8
1328 ; CHECK-NEON-NEXT: vmax.s32 q10, q10, q9
1329 ; CHECK-NEON-NEXT: vmov.32 d9[1], r0
1330 ; CHECK-NEON-NEXT: vmov r0, s2
1331 ; CHECK-NEON-NEXT: vmovn.i32 d1, q10
1332 ; CHECK-NEON-NEXT: vmov.32 d8[1], r0
1333 ; CHECK-NEON-NEXT: vmin.s32 q8, q4, q8
1334 ; CHECK-NEON-NEXT: vmax.s32 q8, q8, q9
1335 ; CHECK-NEON-NEXT: vmovn.i32 d0, q8
1336 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
1337 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
1339 ; CHECK-FP16-LABEL: stest_f16i16:
1340 ; CHECK-FP16: @ %bb.0: @ %entry
1341 ; CHECK-FP16-NEXT: vmovx.f16 s4, s0
1342 ; CHECK-FP16-NEXT: vcvt.s32.f16 s12, s0
1343 ; CHECK-FP16-NEXT: vcvt.s32.f16 s0, s3
1344 ; CHECK-FP16-NEXT: vcvt.s32.f16 s5, s2
1345 ; CHECK-FP16-NEXT: vmov r0, s0
1346 ; CHECK-FP16-NEXT: vcvt.s32.f16 s14, s1
1347 ; CHECK-FP16-NEXT: vmovx.f16 s10, s3
1348 ; CHECK-FP16-NEXT: vmovx.f16 s8, s2
1349 ; CHECK-FP16-NEXT: vcvt.s32.f16 s10, s10
1350 ; CHECK-FP16-NEXT: vcvt.s32.f16 s8, s8
1351 ; CHECK-FP16-NEXT: vmovx.f16 s6, s1
1352 ; CHECK-FP16-NEXT: vcvt.s32.f16 s4, s4
1353 ; CHECK-FP16-NEXT: vcvt.s32.f16 s6, s6
1354 ; CHECK-FP16-NEXT: vmov.i32 q10, #0x7fff
1355 ; CHECK-FP16-NEXT: vmvn.i32 q11, #0x7fff
1356 ; CHECK-FP16-NEXT: vmov.32 d17[0], r0
1357 ; CHECK-FP16-NEXT: vmov r0, s5
1358 ; CHECK-FP16-NEXT: vmov.32 d16[0], r0
1359 ; CHECK-FP16-NEXT: vmov r0, s14
1360 ; CHECK-FP16-NEXT: vmov.32 d19[0], r0
1361 ; CHECK-FP16-NEXT: vmov r0, s12
1362 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
1363 ; CHECK-FP16-NEXT: vmov r0, s10
1364 ; CHECK-FP16-NEXT: vmov.32 d17[1], r0
1365 ; CHECK-FP16-NEXT: vmov r0, s8
1366 ; CHECK-FP16-NEXT: vmov.32 d16[1], r0
1367 ; CHECK-FP16-NEXT: vmov r0, s6
1368 ; CHECK-FP16-NEXT: vmin.s32 q8, q8, q10
1369 ; CHECK-FP16-NEXT: vmax.s32 q8, q8, q11
1370 ; CHECK-FP16-NEXT: vmovn.i32 d1, q8
1371 ; CHECK-FP16-NEXT: vmov.32 d19[1], r0
1372 ; CHECK-FP16-NEXT: vmov r0, s4
1373 ; CHECK-FP16-NEXT: vmov.32 d18[1], r0
1374 ; CHECK-FP16-NEXT: vmin.s32 q9, q9, q10
1375 ; CHECK-FP16-NEXT: vmax.s32 q9, q9, q11
1376 ; CHECK-FP16-NEXT: vmovn.i32 d0, q9
1377 ; CHECK-FP16-NEXT: bx lr
1379 %conv = fptosi <8 x half> %x to <8 x i32>
1380 %0 = icmp slt <8 x i32> %conv, <i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767>
1381 %spec.store.select = select <8 x i1> %0, <8 x i32> %conv, <8 x i32> <i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767>
1382 %1 = icmp sgt <8 x i32> %spec.store.select, <i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768>
1383 %spec.store.select7 = select <8 x i1> %1, <8 x i32> %spec.store.select, <8 x i32> <i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768>
1384 %conv6 = trunc <8 x i32> %spec.store.select7 to <8 x i16>
1385 ret <8 x i16> %conv6
1388 define <8 x i16> @utesth_f16i16(<8 x half> %x) {
1389 ; CHECK-NEON-LABEL: utesth_f16i16:
1390 ; CHECK-NEON: @ %bb.0: @ %entry
1391 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
1392 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
1393 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14}
1394 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14}
1395 ; CHECK-NEON-NEXT: vmov r0, s1
1396 ; CHECK-NEON-NEXT: vmov.f32 s16, s7
1397 ; CHECK-NEON-NEXT: vmov.f32 s18, s6
1398 ; CHECK-NEON-NEXT: vmov.f32 s20, s5
1399 ; CHECK-NEON-NEXT: vmov.f32 s22, s4
1400 ; CHECK-NEON-NEXT: vmov.f32 s24, s3
1401 ; CHECK-NEON-NEXT: vmov.f32 s26, s2
1402 ; CHECK-NEON-NEXT: vmov.f32 s28, s0
1403 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1404 ; CHECK-NEON-NEXT: mov r4, r0
1405 ; CHECK-NEON-NEXT: vmov r0, s26
1406 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1407 ; CHECK-NEON-NEXT: mov r5, r0
1408 ; CHECK-NEON-NEXT: vmov r0, s22
1409 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1410 ; CHECK-NEON-NEXT: mov r6, r0
1411 ; CHECK-NEON-NEXT: vmov r0, s24
1412 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1413 ; CHECK-NEON-NEXT: mov r7, r0
1414 ; CHECK-NEON-NEXT: vmov r0, s18
1415 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1416 ; CHECK-NEON-NEXT: vmov s0, r0
1417 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
1418 ; CHECK-NEON-NEXT: vmov r0, s0
1419 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
1420 ; CHECK-NEON-NEXT: vmov r0, s16
1421 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1422 ; CHECK-NEON-NEXT: vmov s0, r0
1423 ; CHECK-NEON-NEXT: vmov s16, r7
1424 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
1425 ; CHECK-NEON-NEXT: vmov s18, r6
1426 ; CHECK-NEON-NEXT: vmov r0, s0
1427 ; CHECK-NEON-NEXT: vmov.32 d13[1], r0
1428 ; CHECK-NEON-NEXT: vmov r0, s28
1429 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1430 ; CHECK-NEON-NEXT: vmov s0, r0
1431 ; CHECK-NEON-NEXT: vmov r1, s20
1432 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
1433 ; CHECK-NEON-NEXT: vmov s2, r5
1434 ; CHECK-NEON-NEXT: vmov r0, s0
1435 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s18
1436 ; CHECK-NEON-NEXT: vcvt.u32.f32 s18, s2
1437 ; CHECK-NEON-NEXT: vmov.32 d10[0], r0
1438 ; CHECK-NEON-NEXT: vmov r0, s0
1439 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
1440 ; CHECK-NEON-NEXT: mov r0, r1
1441 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1442 ; CHECK-NEON-NEXT: vmov s0, r0
1443 ; CHECK-NEON-NEXT: vmov r0, s18
1444 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
1445 ; CHECK-NEON-NEXT: vmov s2, r4
1446 ; CHECK-NEON-NEXT: vmov.i32 q8, #0xffff
1447 ; CHECK-NEON-NEXT: vcvt.u32.f32 s2, s2
1448 ; CHECK-NEON-NEXT: vmov.32 d11[0], r0
1449 ; CHECK-NEON-NEXT: vmov r0, s0
1450 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s16
1451 ; CHECK-NEON-NEXT: vmov.32 d12[1], r0
1452 ; CHECK-NEON-NEXT: vmov r0, s0
1453 ; CHECK-NEON-NEXT: vmin.u32 q9, q6, q8
1454 ; CHECK-NEON-NEXT: vmov.32 d11[1], r0
1455 ; CHECK-NEON-NEXT: vmov r0, s2
1456 ; CHECK-NEON-NEXT: vmovn.i32 d1, q9
1457 ; CHECK-NEON-NEXT: vmov.32 d10[1], r0
1458 ; CHECK-NEON-NEXT: vmin.u32 q8, q5, q8
1459 ; CHECK-NEON-NEXT: vmovn.i32 d0, q8
1460 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14}
1461 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
1463 ; CHECK-FP16-LABEL: utesth_f16i16:
1464 ; CHECK-FP16: @ %bb.0: @ %entry
1465 ; CHECK-FP16-NEXT: vmovx.f16 s4, s0
1466 ; CHECK-FP16-NEXT: vcvt.u32.f16 s12, s0
1467 ; CHECK-FP16-NEXT: vcvt.u32.f16 s0, s3
1468 ; CHECK-FP16-NEXT: vcvt.u32.f16 s5, s2
1469 ; CHECK-FP16-NEXT: vmov r0, s0
1470 ; CHECK-FP16-NEXT: vcvt.u32.f16 s14, s1
1471 ; CHECK-FP16-NEXT: vmovx.f16 s10, s3
1472 ; CHECK-FP16-NEXT: vmovx.f16 s8, s2
1473 ; CHECK-FP16-NEXT: vcvt.u32.f16 s10, s10
1474 ; CHECK-FP16-NEXT: vcvt.u32.f16 s8, s8
1475 ; CHECK-FP16-NEXT: vmovx.f16 s6, s1
1476 ; CHECK-FP16-NEXT: vcvt.u32.f16 s4, s4
1477 ; CHECK-FP16-NEXT: vcvt.u32.f16 s6, s6
1478 ; CHECK-FP16-NEXT: vmov.i32 q10, #0xffff
1479 ; CHECK-FP16-NEXT: vmov.32 d17[0], r0
1480 ; CHECK-FP16-NEXT: vmov r0, s5
1481 ; CHECK-FP16-NEXT: vmov.32 d16[0], r0
1482 ; CHECK-FP16-NEXT: vmov r0, s14
1483 ; CHECK-FP16-NEXT: vmov.32 d19[0], r0
1484 ; CHECK-FP16-NEXT: vmov r0, s12
1485 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
1486 ; CHECK-FP16-NEXT: vmov r0, s10
1487 ; CHECK-FP16-NEXT: vmov.32 d17[1], r0
1488 ; CHECK-FP16-NEXT: vmov r0, s8
1489 ; CHECK-FP16-NEXT: vmov.32 d16[1], r0
1490 ; CHECK-FP16-NEXT: vmov r0, s6
1491 ; CHECK-FP16-NEXT: vmin.u32 q8, q8, q10
1492 ; CHECK-FP16-NEXT: vmovn.i32 d1, q8
1493 ; CHECK-FP16-NEXT: vmov.32 d19[1], r0
1494 ; CHECK-FP16-NEXT: vmov r0, s4
1495 ; CHECK-FP16-NEXT: vmov.32 d18[1], r0
1496 ; CHECK-FP16-NEXT: vmin.u32 q9, q9, q10
1497 ; CHECK-FP16-NEXT: vmovn.i32 d0, q9
1498 ; CHECK-FP16-NEXT: bx lr
1500 %conv = fptoui <8 x half> %x to <8 x i32>
1501 %0 = icmp ult <8 x i32> %conv, <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>
1502 %spec.store.select = select <8 x i1> %0, <8 x i32> %conv, <8 x i32> <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>
1503 %conv6 = trunc <8 x i32> %spec.store.select to <8 x i16>
1504 ret <8 x i16> %conv6
1507 define <8 x i16> @ustest_f16i16(<8 x half> %x) {
1508 ; CHECK-NEON-LABEL: ustest_f16i16:
1509 ; CHECK-NEON: @ %bb.0: @ %entry
1510 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
1511 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
1512 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
1513 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
1514 ; CHECK-NEON-NEXT: vmov r0, s1
1515 ; CHECK-NEON-NEXT: vmov.f32 s16, s7
1516 ; CHECK-NEON-NEXT: vmov.f32 s18, s6
1517 ; CHECK-NEON-NEXT: vmov.f32 s20, s5
1518 ; CHECK-NEON-NEXT: vmov.f32 s22, s4
1519 ; CHECK-NEON-NEXT: vmov.f32 s24, s3
1520 ; CHECK-NEON-NEXT: vmov.f32 s26, s2
1521 ; CHECK-NEON-NEXT: vmov.f32 s28, s0
1522 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1523 ; CHECK-NEON-NEXT: mov r4, r0
1524 ; CHECK-NEON-NEXT: vmov r0, s26
1525 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1526 ; CHECK-NEON-NEXT: mov r5, r0
1527 ; CHECK-NEON-NEXT: vmov r0, s22
1528 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1529 ; CHECK-NEON-NEXT: mov r6, r0
1530 ; CHECK-NEON-NEXT: vmov r0, s24
1531 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1532 ; CHECK-NEON-NEXT: mov r7, r0
1533 ; CHECK-NEON-NEXT: vmov r0, s18
1534 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1535 ; CHECK-NEON-NEXT: vmov s0, r0
1536 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1537 ; CHECK-NEON-NEXT: vmov r0, s0
1538 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
1539 ; CHECK-NEON-NEXT: vmov r0, s16
1540 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1541 ; CHECK-NEON-NEXT: vmov s0, r0
1542 ; CHECK-NEON-NEXT: vmov s22, r7
1543 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1544 ; CHECK-NEON-NEXT: vmov s30, r6
1545 ; CHECK-NEON-NEXT: vmov r0, s0
1546 ; CHECK-NEON-NEXT: vmov.32 d13[1], r0
1547 ; CHECK-NEON-NEXT: vmov r0, s28
1548 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1549 ; CHECK-NEON-NEXT: vmov s0, r0
1550 ; CHECK-NEON-NEXT: vmov r1, s20
1551 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1552 ; CHECK-NEON-NEXT: vmov s2, r5
1553 ; CHECK-NEON-NEXT: vcvt.s32.f32 s20, s2
1554 ; CHECK-NEON-NEXT: vmov r0, s0
1555 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s30
1556 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
1557 ; CHECK-NEON-NEXT: vmov r0, s0
1558 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
1559 ; CHECK-NEON-NEXT: mov r0, r1
1560 ; CHECK-NEON-NEXT: bl __aeabi_h2f
1561 ; CHECK-NEON-NEXT: vmov s0, r0
1562 ; CHECK-NEON-NEXT: vmov r0, s20
1563 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
1564 ; CHECK-NEON-NEXT: vmov s2, r4
1565 ; CHECK-NEON-NEXT: vmov.i32 q8, #0xffff
1566 ; CHECK-NEON-NEXT: vcvt.s32.f32 s2, s2
1567 ; CHECK-NEON-NEXT: vmov.i32 q9, #0x0
1568 ; CHECK-NEON-NEXT: vmov.32 d9[0], r0
1569 ; CHECK-NEON-NEXT: vmov r0, s0
1570 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s22
1571 ; CHECK-NEON-NEXT: vmov.32 d12[1], r0
1572 ; CHECK-NEON-NEXT: vmov r0, s0
1573 ; CHECK-NEON-NEXT: vmin.s32 q10, q6, q8
1574 ; CHECK-NEON-NEXT: vmax.s32 q10, q10, q9
1575 ; CHECK-NEON-NEXT: vmov.32 d9[1], r0
1576 ; CHECK-NEON-NEXT: vmov r0, s2
1577 ; CHECK-NEON-NEXT: vmovn.i32 d1, q10
1578 ; CHECK-NEON-NEXT: vmov.32 d8[1], r0
1579 ; CHECK-NEON-NEXT: vmin.s32 q8, q4, q8
1580 ; CHECK-NEON-NEXT: vmax.s32 q8, q8, q9
1581 ; CHECK-NEON-NEXT: vmovn.i32 d0, q8
1582 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
1583 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
1585 ; CHECK-FP16-LABEL: ustest_f16i16:
1586 ; CHECK-FP16: @ %bb.0: @ %entry
1587 ; CHECK-FP16-NEXT: vmovx.f16 s4, s0
1588 ; CHECK-FP16-NEXT: vcvt.s32.f16 s12, s0
1589 ; CHECK-FP16-NEXT: vcvt.s32.f16 s0, s3
1590 ; CHECK-FP16-NEXT: vcvt.s32.f16 s5, s2
1591 ; CHECK-FP16-NEXT: vmov r0, s0
1592 ; CHECK-FP16-NEXT: vcvt.s32.f16 s14, s1
1593 ; CHECK-FP16-NEXT: vmovx.f16 s10, s3
1594 ; CHECK-FP16-NEXT: vmovx.f16 s8, s2
1595 ; CHECK-FP16-NEXT: vcvt.s32.f16 s10, s10
1596 ; CHECK-FP16-NEXT: vcvt.s32.f16 s8, s8
1597 ; CHECK-FP16-NEXT: vmovx.f16 s6, s1
1598 ; CHECK-FP16-NEXT: vcvt.s32.f16 s4, s4
1599 ; CHECK-FP16-NEXT: vcvt.s32.f16 s6, s6
1600 ; CHECK-FP16-NEXT: vmov.i32 q10, #0xffff
1601 ; CHECK-FP16-NEXT: vmov.i32 q11, #0x0
1602 ; CHECK-FP16-NEXT: vmov.32 d17[0], r0
1603 ; CHECK-FP16-NEXT: vmov r0, s5
1604 ; CHECK-FP16-NEXT: vmov.32 d16[0], r0
1605 ; CHECK-FP16-NEXT: vmov r0, s14
1606 ; CHECK-FP16-NEXT: vmov.32 d19[0], r0
1607 ; CHECK-FP16-NEXT: vmov r0, s12
1608 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
1609 ; CHECK-FP16-NEXT: vmov r0, s10
1610 ; CHECK-FP16-NEXT: vmov.32 d17[1], r0
1611 ; CHECK-FP16-NEXT: vmov r0, s8
1612 ; CHECK-FP16-NEXT: vmov.32 d16[1], r0
1613 ; CHECK-FP16-NEXT: vmov r0, s6
1614 ; CHECK-FP16-NEXT: vmin.s32 q8, q8, q10
1615 ; CHECK-FP16-NEXT: vmax.s32 q8, q8, q11
1616 ; CHECK-FP16-NEXT: vmovn.i32 d1, q8
1617 ; CHECK-FP16-NEXT: vmov.32 d19[1], r0
1618 ; CHECK-FP16-NEXT: vmov r0, s4
1619 ; CHECK-FP16-NEXT: vmov.32 d18[1], r0
1620 ; CHECK-FP16-NEXT: vmin.s32 q9, q9, q10
1621 ; CHECK-FP16-NEXT: vmax.s32 q9, q9, q11
1622 ; CHECK-FP16-NEXT: vmovn.i32 d0, q9
1623 ; CHECK-FP16-NEXT: bx lr
1625 %conv = fptosi <8 x half> %x to <8 x i32>
1626 %0 = icmp slt <8 x i32> %conv, <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>
1627 %spec.store.select = select <8 x i1> %0, <8 x i32> %conv, <8 x i32> <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>
1628 %1 = icmp sgt <8 x i32> %spec.store.select, zeroinitializer
1629 %spec.store.select7 = select <8 x i1> %1, <8 x i32> %spec.store.select, <8 x i32> zeroinitializer
1630 %conv6 = trunc <8 x i32> %spec.store.select7 to <8 x i16>
1631 ret <8 x i16> %conv6
1636 define <2 x i64> @stest_f64i64(<2 x double> %x) {
1637 ; CHECK-LABEL: stest_f64i64:
1638 ; CHECK: @ %bb.0: @ %entry
1639 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
1640 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
1641 ; CHECK-NEXT: .vsave {d8, d9}
1642 ; CHECK-NEXT: vpush {d8, d9}
1643 ; CHECK-NEXT: vorr q4, q0, q0
1644 ; CHECK-NEXT: vorr d0, d9, d9
1645 ; CHECK-NEXT: bl __fixdfti
1646 ; CHECK-NEXT: mov r5, r0
1647 ; CHECK-NEXT: mvn r8, #0
1648 ; CHECK-NEXT: subs r0, r0, r8
1649 ; CHECK-NEXT: mvn r6, #-2147483648
1650 ; CHECK-NEXT: sbcs r0, r1, r6
1651 ; CHECK-NEXT: mov r10, r1
1652 ; CHECK-NEXT: sbcs r0, r2, #0
1653 ; CHECK-NEXT: vorr d0, d8, d8
1654 ; CHECK-NEXT: sbcs r0, r3, #0
1655 ; CHECK-NEXT: mov r7, #0
1656 ; CHECK-NEXT: mov r0, #0
1657 ; CHECK-NEXT: mov r9, #0
1658 ; CHECK-NEXT: movwlt r0, #1
1659 ; CHECK-NEXT: cmp r0, #0
1660 ; CHECK-NEXT: moveq r3, r0
1661 ; CHECK-NEXT: movne r0, r2
1662 ; CHECK-NEXT: moveq r10, r6
1663 ; CHECK-NEXT: moveq r5, r8
1664 ; CHECK-NEXT: rsbs r1, r5, #0
1665 ; CHECK-NEXT: rscs r1, r10, #-2147483648
1666 ; CHECK-NEXT: sbcs r0, r8, r0
1667 ; CHECK-NEXT: sbcs r0, r8, r3
1668 ; CHECK-NEXT: movwlt r7, #1
1669 ; CHECK-NEXT: cmp r7, #0
1670 ; CHECK-NEXT: moveq r5, r7
1671 ; CHECK-NEXT: bl __fixdfti
1672 ; CHECK-NEXT: subs r4, r0, r8
1673 ; CHECK-NEXT: vmov.32 d1[0], r5
1674 ; CHECK-NEXT: sbcs r4, r1, r6
1675 ; CHECK-NEXT: sbcs r4, r2, #0
1676 ; CHECK-NEXT: sbcs r4, r3, #0
1677 ; CHECK-NEXT: mov r4, #0
1678 ; CHECK-NEXT: movwlt r4, #1
1679 ; CHECK-NEXT: cmp r4, #0
1680 ; CHECK-NEXT: moveq r3, r4
1681 ; CHECK-NEXT: movne r6, r1
1682 ; CHECK-NEXT: movne r4, r2
1683 ; CHECK-NEXT: moveq r0, r8
1684 ; CHECK-NEXT: rsbs r1, r0, #0
1685 ; CHECK-NEXT: rscs r1, r6, #-2147483648
1686 ; CHECK-NEXT: sbcs r1, r8, r4
1687 ; CHECK-NEXT: sbcs r1, r8, r3
1688 ; CHECK-NEXT: movwlt r9, #1
1689 ; CHECK-NEXT: cmp r9, #0
1690 ; CHECK-NEXT: moveq r0, r9
1691 ; CHECK-NEXT: mov r1, #-2147483648
1692 ; CHECK-NEXT: cmp r7, #0
1693 ; CHECK-NEXT: vmov.32 d0[0], r0
1694 ; CHECK-NEXT: moveq r10, r1
1695 ; CHECK-NEXT: cmp r9, #0
1696 ; CHECK-NEXT: vmov.32 d1[1], r10
1697 ; CHECK-NEXT: moveq r6, r1
1698 ; CHECK-NEXT: vmov.32 d0[1], r6
1699 ; CHECK-NEXT: vpop {d8, d9}
1700 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
1702 %conv = fptosi <2 x double> %x to <2 x i128>
1703 %0 = icmp slt <2 x i128> %conv, <i128 9223372036854775807, i128 9223372036854775807>
1704 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 9223372036854775807, i128 9223372036854775807>
1705 %1 = icmp sgt <2 x i128> %spec.store.select, <i128 -9223372036854775808, i128 -9223372036854775808>
1706 %spec.store.select7 = select <2 x i1> %1, <2 x i128> %spec.store.select, <2 x i128> <i128 -9223372036854775808, i128 -9223372036854775808>
1707 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
1708 ret <2 x i64> %conv6
1711 define <2 x i64> @utest_f64i64(<2 x double> %x) {
1712 ; CHECK-LABEL: utest_f64i64:
1713 ; CHECK: @ %bb.0: @ %entry
1714 ; CHECK-NEXT: .save {r4, r5, r6, r7, r11, lr}
1715 ; CHECK-NEXT: push {r4, r5, r6, r7, r11, lr}
1716 ; CHECK-NEXT: .vsave {d8, d9}
1717 ; CHECK-NEXT: vpush {d8, d9}
1718 ; CHECK-NEXT: vorr q4, q0, q0
1719 ; CHECK-NEXT: vorr d0, d9, d9
1720 ; CHECK-NEXT: bl __fixunsdfti
1721 ; CHECK-NEXT: mov r5, r0
1722 ; CHECK-NEXT: subs r0, r2, #1
1723 ; CHECK-NEXT: vorr d0, d8, d8
1724 ; CHECK-NEXT: sbcs r0, r3, #0
1725 ; CHECK-NEXT: mov r7, #0
1726 ; CHECK-NEXT: mov r4, r1
1727 ; CHECK-NEXT: movwlo r7, #1
1728 ; CHECK-NEXT: cmp r7, #0
1729 ; CHECK-NEXT: mov r6, #0
1730 ; CHECK-NEXT: moveq r5, r7
1731 ; CHECK-NEXT: bl __fixunsdfti
1732 ; CHECK-NEXT: subs r2, r2, #1
1733 ; CHECK-NEXT: vmov.32 d1[0], r5
1734 ; CHECK-NEXT: sbcs r2, r3, #0
1735 ; CHECK-NEXT: movwlo r6, #1
1736 ; CHECK-NEXT: cmp r6, #0
1737 ; CHECK-NEXT: moveq r0, r6
1738 ; CHECK-NEXT: cmp r7, #0
1739 ; CHECK-NEXT: movne r7, r4
1740 ; CHECK-NEXT: vmov.32 d0[0], r0
1741 ; CHECK-NEXT: cmp r6, #0
1742 ; CHECK-NEXT: vmov.32 d1[1], r7
1743 ; CHECK-NEXT: movne r6, r1
1744 ; CHECK-NEXT: vmov.32 d0[1], r6
1745 ; CHECK-NEXT: vpop {d8, d9}
1746 ; CHECK-NEXT: pop {r4, r5, r6, r7, r11, pc}
1748 %conv = fptoui <2 x double> %x to <2 x i128>
1749 %0 = icmp ult <2 x i128> %conv, <i128 18446744073709551616, i128 18446744073709551616>
1750 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>
1751 %conv6 = trunc <2 x i128> %spec.store.select to <2 x i64>
1752 ret <2 x i64> %conv6
1755 define <2 x i64> @ustest_f64i64(<2 x double> %x) {
1756 ; CHECK-LABEL: ustest_f64i64:
1757 ; CHECK: @ %bb.0: @ %entry
1758 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r11, lr}
1759 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r11, lr}
1760 ; CHECK-NEXT: .vsave {d8, d9}
1761 ; CHECK-NEXT: vpush {d8, d9}
1762 ; CHECK-NEXT: vorr q4, q0, q0
1763 ; CHECK-NEXT: vorr d0, d9, d9
1764 ; CHECK-NEXT: bl __fixdfti
1765 ; CHECK-NEXT: mov r8, r1
1766 ; CHECK-NEXT: subs r1, r2, #1
1767 ; CHECK-NEXT: sbcs r1, r3, #0
1768 ; CHECK-NEXT: mov r6, #0
1769 ; CHECK-NEXT: movwlt r6, #1
1770 ; CHECK-NEXT: cmp r6, #0
1771 ; CHECK-NEXT: mov r9, #1
1772 ; CHECK-NEXT: moveq r3, r6
1773 ; CHECK-NEXT: moveq r8, r6
1774 ; CHECK-NEXT: moveq r2, r9
1775 ; CHECK-NEXT: movne r6, r0
1776 ; CHECK-NEXT: rsbs r0, r6, #0
1777 ; CHECK-NEXT: rscs r0, r8, #0
1778 ; CHECK-NEXT: vorr d0, d8, d8
1779 ; CHECK-NEXT: rscs r0, r2, #0
1780 ; CHECK-NEXT: mov r7, #0
1781 ; CHECK-NEXT: rscs r0, r3, #0
1782 ; CHECK-NEXT: mov r5, #0
1783 ; CHECK-NEXT: movwlt r7, #1
1784 ; CHECK-NEXT: cmp r7, #0
1785 ; CHECK-NEXT: moveq r6, r7
1786 ; CHECK-NEXT: bl __fixdfti
1787 ; CHECK-NEXT: subs r4, r2, #1
1788 ; CHECK-NEXT: vmov.32 d1[0], r6
1789 ; CHECK-NEXT: sbcs r4, r3, #0
1790 ; CHECK-NEXT: mov r4, #0
1791 ; CHECK-NEXT: movwlt r4, #1
1792 ; CHECK-NEXT: cmp r4, #0
1793 ; CHECK-NEXT: movne r9, r2
1794 ; CHECK-NEXT: moveq r3, r4
1795 ; CHECK-NEXT: moveq r1, r4
1796 ; CHECK-NEXT: movne r4, r0
1797 ; CHECK-NEXT: rsbs r0, r4, #0
1798 ; CHECK-NEXT: rscs r0, r1, #0
1799 ; CHECK-NEXT: rscs r0, r9, #0
1800 ; CHECK-NEXT: rscs r0, r3, #0
1801 ; CHECK-NEXT: movwlt r5, #1
1802 ; CHECK-NEXT: cmp r5, #0
1803 ; CHECK-NEXT: moveq r4, r5
1804 ; CHECK-NEXT: cmp r7, #0
1805 ; CHECK-NEXT: movne r7, r8
1806 ; CHECK-NEXT: vmov.32 d0[0], r4
1807 ; CHECK-NEXT: cmp r5, #0
1808 ; CHECK-NEXT: vmov.32 d1[1], r7
1809 ; CHECK-NEXT: movne r5, r1
1810 ; CHECK-NEXT: vmov.32 d0[1], r5
1811 ; CHECK-NEXT: vpop {d8, d9}
1812 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r11, pc}
1814 %conv = fptosi <2 x double> %x to <2 x i128>
1815 %0 = icmp slt <2 x i128> %conv, <i128 18446744073709551616, i128 18446744073709551616>
1816 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>
1817 %1 = icmp sgt <2 x i128> %spec.store.select, zeroinitializer
1818 %spec.store.select7 = select <2 x i1> %1, <2 x i128> %spec.store.select, <2 x i128> zeroinitializer
1819 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
1820 ret <2 x i64> %conv6
1823 define <2 x i64> @stest_f32i64(<2 x float> %x) {
1824 ; CHECK-LABEL: stest_f32i64:
1825 ; CHECK: @ %bb.0: @ %entry
1826 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
1827 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
1828 ; CHECK-NEXT: .vsave {d8}
1829 ; CHECK-NEXT: vpush {d8}
1830 ; CHECK-NEXT: vmov.f64 d8, d0
1831 ; CHECK-NEXT: vmov.f32 s0, s17
1832 ; CHECK-NEXT: bl __fixsfti
1833 ; CHECK-NEXT: mov r5, r0
1834 ; CHECK-NEXT: mvn r8, #0
1835 ; CHECK-NEXT: subs r0, r0, r8
1836 ; CHECK-NEXT: mvn r6, #-2147483648
1837 ; CHECK-NEXT: sbcs r0, r1, r6
1838 ; CHECK-NEXT: vmov.f32 s0, s16
1839 ; CHECK-NEXT: sbcs r0, r2, #0
1840 ; CHECK-NEXT: mov r10, r1
1841 ; CHECK-NEXT: sbcs r0, r3, #0
1842 ; CHECK-NEXT: mov r7, #0
1843 ; CHECK-NEXT: mov r0, #0
1844 ; CHECK-NEXT: mov r9, #0
1845 ; CHECK-NEXT: movwlt r0, #1
1846 ; CHECK-NEXT: cmp r0, #0
1847 ; CHECK-NEXT: moveq r3, r0
1848 ; CHECK-NEXT: movne r0, r2
1849 ; CHECK-NEXT: moveq r10, r6
1850 ; CHECK-NEXT: moveq r5, r8
1851 ; CHECK-NEXT: rsbs r1, r5, #0
1852 ; CHECK-NEXT: rscs r1, r10, #-2147483648
1853 ; CHECK-NEXT: sbcs r0, r8, r0
1854 ; CHECK-NEXT: sbcs r0, r8, r3
1855 ; CHECK-NEXT: movwlt r7, #1
1856 ; CHECK-NEXT: cmp r7, #0
1857 ; CHECK-NEXT: moveq r5, r7
1858 ; CHECK-NEXT: bl __fixsfti
1859 ; CHECK-NEXT: subs r4, r0, r8
1860 ; CHECK-NEXT: vmov.32 d1[0], r5
1861 ; CHECK-NEXT: sbcs r4, r1, r6
1862 ; CHECK-NEXT: sbcs r4, r2, #0
1863 ; CHECK-NEXT: sbcs r4, r3, #0
1864 ; CHECK-NEXT: mov r4, #0
1865 ; CHECK-NEXT: movwlt r4, #1
1866 ; CHECK-NEXT: cmp r4, #0
1867 ; CHECK-NEXT: moveq r3, r4
1868 ; CHECK-NEXT: movne r6, r1
1869 ; CHECK-NEXT: movne r4, r2
1870 ; CHECK-NEXT: moveq r0, r8
1871 ; CHECK-NEXT: rsbs r1, r0, #0
1872 ; CHECK-NEXT: rscs r1, r6, #-2147483648
1873 ; CHECK-NEXT: sbcs r1, r8, r4
1874 ; CHECK-NEXT: sbcs r1, r8, r3
1875 ; CHECK-NEXT: movwlt r9, #1
1876 ; CHECK-NEXT: cmp r9, #0
1877 ; CHECK-NEXT: moveq r0, r9
1878 ; CHECK-NEXT: mov r1, #-2147483648
1879 ; CHECK-NEXT: cmp r7, #0
1880 ; CHECK-NEXT: vmov.32 d0[0], r0
1881 ; CHECK-NEXT: moveq r10, r1
1882 ; CHECK-NEXT: cmp r9, #0
1883 ; CHECK-NEXT: vmov.32 d1[1], r10
1884 ; CHECK-NEXT: moveq r6, r1
1885 ; CHECK-NEXT: vmov.32 d0[1], r6
1886 ; CHECK-NEXT: vpop {d8}
1887 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
1889 %conv = fptosi <2 x float> %x to <2 x i128>
1890 %0 = icmp slt <2 x i128> %conv, <i128 9223372036854775807, i128 9223372036854775807>
1891 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 9223372036854775807, i128 9223372036854775807>
1892 %1 = icmp sgt <2 x i128> %spec.store.select, <i128 -9223372036854775808, i128 -9223372036854775808>
1893 %spec.store.select7 = select <2 x i1> %1, <2 x i128> %spec.store.select, <2 x i128> <i128 -9223372036854775808, i128 -9223372036854775808>
1894 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
1895 ret <2 x i64> %conv6
1898 define <2 x i64> @utest_f32i64(<2 x float> %x) {
1899 ; CHECK-LABEL: utest_f32i64:
1900 ; CHECK: @ %bb.0: @ %entry
1901 ; CHECK-NEXT: .save {r4, r5, r6, r7, r11, lr}
1902 ; CHECK-NEXT: push {r4, r5, r6, r7, r11, lr}
1903 ; CHECK-NEXT: .vsave {d8}
1904 ; CHECK-NEXT: vpush {d8}
1905 ; CHECK-NEXT: vmov.f64 d8, d0
1906 ; CHECK-NEXT: vmov.f32 s0, s17
1907 ; CHECK-NEXT: bl __fixunssfti
1908 ; CHECK-NEXT: vmov.f32 s0, s16
1909 ; CHECK-NEXT: mov r5, r0
1910 ; CHECK-NEXT: subs r0, r2, #1
1911 ; CHECK-NEXT: mov r7, #0
1912 ; CHECK-NEXT: sbcs r0, r3, #0
1913 ; CHECK-NEXT: mov r4, r1
1914 ; CHECK-NEXT: movwlo r7, #1
1915 ; CHECK-NEXT: cmp r7, #0
1916 ; CHECK-NEXT: mov r6, #0
1917 ; CHECK-NEXT: moveq r5, r7
1918 ; CHECK-NEXT: bl __fixunssfti
1919 ; CHECK-NEXT: subs r2, r2, #1
1920 ; CHECK-NEXT: vmov.32 d1[0], r5
1921 ; CHECK-NEXT: sbcs r2, r3, #0
1922 ; CHECK-NEXT: movwlo r6, #1
1923 ; CHECK-NEXT: cmp r6, #0
1924 ; CHECK-NEXT: moveq r0, r6
1925 ; CHECK-NEXT: cmp r7, #0
1926 ; CHECK-NEXT: movne r7, r4
1927 ; CHECK-NEXT: vmov.32 d0[0], r0
1928 ; CHECK-NEXT: cmp r6, #0
1929 ; CHECK-NEXT: vmov.32 d1[1], r7
1930 ; CHECK-NEXT: movne r6, r1
1931 ; CHECK-NEXT: vmov.32 d0[1], r6
1932 ; CHECK-NEXT: vpop {d8}
1933 ; CHECK-NEXT: pop {r4, r5, r6, r7, r11, pc}
1935 %conv = fptoui <2 x float> %x to <2 x i128>
1936 %0 = icmp ult <2 x i128> %conv, <i128 18446744073709551616, i128 18446744073709551616>
1937 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>
1938 %conv6 = trunc <2 x i128> %spec.store.select to <2 x i64>
1939 ret <2 x i64> %conv6
1942 define <2 x i64> @ustest_f32i64(<2 x float> %x) {
1943 ; CHECK-LABEL: ustest_f32i64:
1944 ; CHECK: @ %bb.0: @ %entry
1945 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r11, lr}
1946 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r11, lr}
1947 ; CHECK-NEXT: .vsave {d8}
1948 ; CHECK-NEXT: vpush {d8}
1949 ; CHECK-NEXT: vmov.f64 d8, d0
1950 ; CHECK-NEXT: vmov.f32 s0, s17
1951 ; CHECK-NEXT: bl __fixsfti
1952 ; CHECK-NEXT: mov r8, r1
1953 ; CHECK-NEXT: subs r1, r2, #1
1954 ; CHECK-NEXT: vmov.f32 s0, s16
1955 ; CHECK-NEXT: sbcs r1, r3, #0
1956 ; CHECK-NEXT: mov r6, #0
1957 ; CHECK-NEXT: mov r9, #1
1958 ; CHECK-NEXT: movwlt r6, #1
1959 ; CHECK-NEXT: cmp r6, #0
1960 ; CHECK-NEXT: moveq r3, r6
1961 ; CHECK-NEXT: moveq r8, r6
1962 ; CHECK-NEXT: moveq r2, r9
1963 ; CHECK-NEXT: movne r6, r0
1964 ; CHECK-NEXT: rsbs r0, r6, #0
1965 ; CHECK-NEXT: mov r7, #0
1966 ; CHECK-NEXT: rscs r0, r8, #0
1967 ; CHECK-NEXT: mov r5, #0
1968 ; CHECK-NEXT: rscs r0, r2, #0
1969 ; CHECK-NEXT: rscs r0, r3, #0
1970 ; CHECK-NEXT: movwlt r7, #1
1971 ; CHECK-NEXT: cmp r7, #0
1972 ; CHECK-NEXT: moveq r6, r7
1973 ; CHECK-NEXT: bl __fixsfti
1974 ; CHECK-NEXT: subs r4, r2, #1
1975 ; CHECK-NEXT: vmov.32 d1[0], r6
1976 ; CHECK-NEXT: sbcs r4, r3, #0
1977 ; CHECK-NEXT: mov r4, #0
1978 ; CHECK-NEXT: movwlt r4, #1
1979 ; CHECK-NEXT: cmp r4, #0
1980 ; CHECK-NEXT: movne r9, r2
1981 ; CHECK-NEXT: moveq r3, r4
1982 ; CHECK-NEXT: moveq r1, r4
1983 ; CHECK-NEXT: movne r4, r0
1984 ; CHECK-NEXT: rsbs r0, r4, #0
1985 ; CHECK-NEXT: rscs r0, r1, #0
1986 ; CHECK-NEXT: rscs r0, r9, #0
1987 ; CHECK-NEXT: rscs r0, r3, #0
1988 ; CHECK-NEXT: movwlt r5, #1
1989 ; CHECK-NEXT: cmp r5, #0
1990 ; CHECK-NEXT: moveq r4, r5
1991 ; CHECK-NEXT: cmp r7, #0
1992 ; CHECK-NEXT: movne r7, r8
1993 ; CHECK-NEXT: vmov.32 d0[0], r4
1994 ; CHECK-NEXT: cmp r5, #0
1995 ; CHECK-NEXT: vmov.32 d1[1], r7
1996 ; CHECK-NEXT: movne r5, r1
1997 ; CHECK-NEXT: vmov.32 d0[1], r5
1998 ; CHECK-NEXT: vpop {d8}
1999 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r11, pc}
2001 %conv = fptosi <2 x float> %x to <2 x i128>
2002 %0 = icmp slt <2 x i128> %conv, <i128 18446744073709551616, i128 18446744073709551616>
2003 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>
2004 %1 = icmp sgt <2 x i128> %spec.store.select, zeroinitializer
2005 %spec.store.select7 = select <2 x i1> %1, <2 x i128> %spec.store.select, <2 x i128> zeroinitializer
2006 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
2007 ret <2 x i64> %conv6
2010 define <2 x i64> @stest_f16i64(<2 x half> %x) {
2011 ; CHECK-NEON-LABEL: stest_f16i64:
2012 ; CHECK-NEON: @ %bb.0: @ %entry
2013 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2014 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2015 ; CHECK-NEON-NEXT: .pad #4
2016 ; CHECK-NEON-NEXT: sub sp, sp, #4
2017 ; CHECK-NEON-NEXT: .vsave {d8}
2018 ; CHECK-NEON-NEXT: vpush {d8}
2019 ; CHECK-NEON-NEXT: vmov r0, s0
2020 ; CHECK-NEON-NEXT: vmov.f32 s16, s1
2021 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2022 ; CHECK-NEON-NEXT: mov r8, r0
2023 ; CHECK-NEON-NEXT: vmov r0, s16
2024 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2025 ; CHECK-NEON-NEXT: vmov s0, r0
2026 ; CHECK-NEON-NEXT: bl __fixsfti
2027 ; CHECK-NEON-NEXT: mov r5, r0
2028 ; CHECK-NEON-NEXT: mvn r9, #0
2029 ; CHECK-NEON-NEXT: subs r0, r0, r9
2030 ; CHECK-NEON-NEXT: mvn r7, #-2147483648
2031 ; CHECK-NEON-NEXT: sbcs r0, r1, r7
2032 ; CHECK-NEON-NEXT: mov r11, r1
2033 ; CHECK-NEON-NEXT: sbcs r0, r2, #0
2034 ; CHECK-NEON-NEXT: vmov s0, r8
2035 ; CHECK-NEON-NEXT: sbcs r0, r3, #0
2036 ; CHECK-NEON-NEXT: mov r6, #0
2037 ; CHECK-NEON-NEXT: mov r0, #0
2038 ; CHECK-NEON-NEXT: mov r10, #0
2039 ; CHECK-NEON-NEXT: movwlt r0, #1
2040 ; CHECK-NEON-NEXT: cmp r0, #0
2041 ; CHECK-NEON-NEXT: moveq r3, r0
2042 ; CHECK-NEON-NEXT: movne r0, r2
2043 ; CHECK-NEON-NEXT: moveq r11, r7
2044 ; CHECK-NEON-NEXT: moveq r5, r9
2045 ; CHECK-NEON-NEXT: rsbs r1, r5, #0
2046 ; CHECK-NEON-NEXT: rscs r1, r11, #-2147483648
2047 ; CHECK-NEON-NEXT: sbcs r0, r9, r0
2048 ; CHECK-NEON-NEXT: sbcs r0, r9, r3
2049 ; CHECK-NEON-NEXT: movwlt r6, #1
2050 ; CHECK-NEON-NEXT: cmp r6, #0
2051 ; CHECK-NEON-NEXT: moveq r5, r6
2052 ; CHECK-NEON-NEXT: bl __fixsfti
2053 ; CHECK-NEON-NEXT: subs r4, r0, r9
2054 ; CHECK-NEON-NEXT: vmov.32 d1[0], r5
2055 ; CHECK-NEON-NEXT: sbcs r4, r1, r7
2056 ; CHECK-NEON-NEXT: sbcs r4, r2, #0
2057 ; CHECK-NEON-NEXT: sbcs r4, r3, #0
2058 ; CHECK-NEON-NEXT: mov r4, #0
2059 ; CHECK-NEON-NEXT: movwlt r4, #1
2060 ; CHECK-NEON-NEXT: cmp r4, #0
2061 ; CHECK-NEON-NEXT: moveq r3, r4
2062 ; CHECK-NEON-NEXT: movne r7, r1
2063 ; CHECK-NEON-NEXT: movne r4, r2
2064 ; CHECK-NEON-NEXT: moveq r0, r9
2065 ; CHECK-NEON-NEXT: rsbs r1, r0, #0
2066 ; CHECK-NEON-NEXT: rscs r1, r7, #-2147483648
2067 ; CHECK-NEON-NEXT: sbcs r1, r9, r4
2068 ; CHECK-NEON-NEXT: sbcs r1, r9, r3
2069 ; CHECK-NEON-NEXT: movwlt r10, #1
2070 ; CHECK-NEON-NEXT: cmp r10, #0
2071 ; CHECK-NEON-NEXT: moveq r0, r10
2072 ; CHECK-NEON-NEXT: mov r1, #-2147483648
2073 ; CHECK-NEON-NEXT: cmp r6, #0
2074 ; CHECK-NEON-NEXT: vmov.32 d0[0], r0
2075 ; CHECK-NEON-NEXT: moveq r11, r1
2076 ; CHECK-NEON-NEXT: cmp r10, #0
2077 ; CHECK-NEON-NEXT: vmov.32 d1[1], r11
2078 ; CHECK-NEON-NEXT: moveq r7, r1
2079 ; CHECK-NEON-NEXT: vmov.32 d0[1], r7
2080 ; CHECK-NEON-NEXT: vpop {d8}
2081 ; CHECK-NEON-NEXT: add sp, sp, #4
2082 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, r11, pc}
2084 ; CHECK-FP16-LABEL: stest_f16i64:
2085 ; CHECK-FP16: @ %bb.0: @ %entry
2086 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
2087 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
2088 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
2089 ; CHECK-FP16-NEXT: vmov.u16 r7, d0[0]
2090 ; CHECK-FP16-NEXT: vmov s0, r0
2091 ; CHECK-FP16-NEXT: bl __fixhfti
2092 ; CHECK-FP16-NEXT: mov r5, r0
2093 ; CHECK-FP16-NEXT: mvn r8, #0
2094 ; CHECK-FP16-NEXT: subs r0, r0, r8
2095 ; CHECK-FP16-NEXT: mvn r6, #-2147483648
2096 ; CHECK-FP16-NEXT: sbcs r0, r1, r6
2097 ; CHECK-FP16-NEXT: mov r10, r1
2098 ; CHECK-FP16-NEXT: sbcs r0, r2, #0
2099 ; CHECK-FP16-NEXT: vmov s0, r7
2100 ; CHECK-FP16-NEXT: sbcs r0, r3, #0
2101 ; CHECK-FP16-NEXT: mov r7, #0
2102 ; CHECK-FP16-NEXT: mov r0, #0
2103 ; CHECK-FP16-NEXT: mov r9, #0
2104 ; CHECK-FP16-NEXT: movwlt r0, #1
2105 ; CHECK-FP16-NEXT: cmp r0, #0
2106 ; CHECK-FP16-NEXT: moveq r3, r0
2107 ; CHECK-FP16-NEXT: movne r0, r2
2108 ; CHECK-FP16-NEXT: moveq r10, r6
2109 ; CHECK-FP16-NEXT: moveq r5, r8
2110 ; CHECK-FP16-NEXT: rsbs r1, r5, #0
2111 ; CHECK-FP16-NEXT: rscs r1, r10, #-2147483648
2112 ; CHECK-FP16-NEXT: sbcs r0, r8, r0
2113 ; CHECK-FP16-NEXT: sbcs r0, r8, r3
2114 ; CHECK-FP16-NEXT: movwlt r7, #1
2115 ; CHECK-FP16-NEXT: cmp r7, #0
2116 ; CHECK-FP16-NEXT: moveq r5, r7
2117 ; CHECK-FP16-NEXT: bl __fixhfti
2118 ; CHECK-FP16-NEXT: subs r4, r0, r8
2119 ; CHECK-FP16-NEXT: vmov.32 d1[0], r5
2120 ; CHECK-FP16-NEXT: sbcs r4, r1, r6
2121 ; CHECK-FP16-NEXT: sbcs r4, r2, #0
2122 ; CHECK-FP16-NEXT: sbcs r4, r3, #0
2123 ; CHECK-FP16-NEXT: mov r4, #0
2124 ; CHECK-FP16-NEXT: movwlt r4, #1
2125 ; CHECK-FP16-NEXT: cmp r4, #0
2126 ; CHECK-FP16-NEXT: moveq r3, r4
2127 ; CHECK-FP16-NEXT: movne r6, r1
2128 ; CHECK-FP16-NEXT: movne r4, r2
2129 ; CHECK-FP16-NEXT: moveq r0, r8
2130 ; CHECK-FP16-NEXT: rsbs r1, r0, #0
2131 ; CHECK-FP16-NEXT: rscs r1, r6, #-2147483648
2132 ; CHECK-FP16-NEXT: sbcs r1, r8, r4
2133 ; CHECK-FP16-NEXT: sbcs r1, r8, r3
2134 ; CHECK-FP16-NEXT: movwlt r9, #1
2135 ; CHECK-FP16-NEXT: cmp r9, #0
2136 ; CHECK-FP16-NEXT: moveq r0, r9
2137 ; CHECK-FP16-NEXT: mov r1, #-2147483648
2138 ; CHECK-FP16-NEXT: cmp r7, #0
2139 ; CHECK-FP16-NEXT: vmov.32 d0[0], r0
2140 ; CHECK-FP16-NEXT: moveq r10, r1
2141 ; CHECK-FP16-NEXT: cmp r9, #0
2142 ; CHECK-FP16-NEXT: vmov.32 d1[1], r10
2143 ; CHECK-FP16-NEXT: moveq r6, r1
2144 ; CHECK-FP16-NEXT: vmov.32 d0[1], r6
2145 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
2147 %conv = fptosi <2 x half> %x to <2 x i128>
2148 %0 = icmp slt <2 x i128> %conv, <i128 9223372036854775807, i128 9223372036854775807>
2149 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 9223372036854775807, i128 9223372036854775807>
2150 %1 = icmp sgt <2 x i128> %spec.store.select, <i128 -9223372036854775808, i128 -9223372036854775808>
2151 %spec.store.select7 = select <2 x i1> %1, <2 x i128> %spec.store.select, <2 x i128> <i128 -9223372036854775808, i128 -9223372036854775808>
2152 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
2153 ret <2 x i64> %conv6
2156 define <2 x i64> @utesth_f16i64(<2 x half> %x) {
2157 ; CHECK-NEON-LABEL: utesth_f16i64:
2158 ; CHECK-NEON: @ %bb.0: @ %entry
2159 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
2160 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
2161 ; CHECK-NEON-NEXT: .vsave {d8}
2162 ; CHECK-NEON-NEXT: vpush {d8}
2163 ; CHECK-NEON-NEXT: vmov r0, s0
2164 ; CHECK-NEON-NEXT: vmov.f32 s16, s1
2165 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2166 ; CHECK-NEON-NEXT: mov r5, r0
2167 ; CHECK-NEON-NEXT: vmov r0, s16
2168 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2169 ; CHECK-NEON-NEXT: vmov s0, r0
2170 ; CHECK-NEON-NEXT: bl __fixunssfti
2171 ; CHECK-NEON-NEXT: mov r6, r0
2172 ; CHECK-NEON-NEXT: subs r0, r2, #1
2173 ; CHECK-NEON-NEXT: vmov s0, r5
2174 ; CHECK-NEON-NEXT: sbcs r0, r3, #0
2175 ; CHECK-NEON-NEXT: mov r5, #0
2176 ; CHECK-NEON-NEXT: mov r4, r1
2177 ; CHECK-NEON-NEXT: movwlo r5, #1
2178 ; CHECK-NEON-NEXT: cmp r5, #0
2179 ; CHECK-NEON-NEXT: mov r7, #0
2180 ; CHECK-NEON-NEXT: moveq r6, r5
2181 ; CHECK-NEON-NEXT: bl __fixunssfti
2182 ; CHECK-NEON-NEXT: subs r2, r2, #1
2183 ; CHECK-NEON-NEXT: vmov.32 d1[0], r6
2184 ; CHECK-NEON-NEXT: sbcs r2, r3, #0
2185 ; CHECK-NEON-NEXT: movwlo r7, #1
2186 ; CHECK-NEON-NEXT: cmp r7, #0
2187 ; CHECK-NEON-NEXT: moveq r0, r7
2188 ; CHECK-NEON-NEXT: cmp r5, #0
2189 ; CHECK-NEON-NEXT: movne r5, r4
2190 ; CHECK-NEON-NEXT: vmov.32 d0[0], r0
2191 ; CHECK-NEON-NEXT: cmp r7, #0
2192 ; CHECK-NEON-NEXT: vmov.32 d1[1], r5
2193 ; CHECK-NEON-NEXT: movne r7, r1
2194 ; CHECK-NEON-NEXT: vmov.32 d0[1], r7
2195 ; CHECK-NEON-NEXT: vpop {d8}
2196 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
2198 ; CHECK-FP16-LABEL: utesth_f16i64:
2199 ; CHECK-FP16: @ %bb.0: @ %entry
2200 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r11, lr}
2201 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r11, lr}
2202 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
2203 ; CHECK-FP16-NEXT: vmov.u16 r7, d0[0]
2204 ; CHECK-FP16-NEXT: vmov s0, r0
2205 ; CHECK-FP16-NEXT: bl __fixunshfti
2206 ; CHECK-FP16-NEXT: mov r5, r0
2207 ; CHECK-FP16-NEXT: subs r0, r2, #1
2208 ; CHECK-FP16-NEXT: vmov s0, r7
2209 ; CHECK-FP16-NEXT: sbcs r0, r3, #0
2210 ; CHECK-FP16-NEXT: mov r7, #0
2211 ; CHECK-FP16-NEXT: mov r4, r1
2212 ; CHECK-FP16-NEXT: movwlo r7, #1
2213 ; CHECK-FP16-NEXT: cmp r7, #0
2214 ; CHECK-FP16-NEXT: mov r6, #0
2215 ; CHECK-FP16-NEXT: moveq r5, r7
2216 ; CHECK-FP16-NEXT: bl __fixunshfti
2217 ; CHECK-FP16-NEXT: subs r2, r2, #1
2218 ; CHECK-FP16-NEXT: vmov.32 d1[0], r5
2219 ; CHECK-FP16-NEXT: sbcs r2, r3, #0
2220 ; CHECK-FP16-NEXT: movwlo r6, #1
2221 ; CHECK-FP16-NEXT: cmp r6, #0
2222 ; CHECK-FP16-NEXT: moveq r0, r6
2223 ; CHECK-FP16-NEXT: cmp r7, #0
2224 ; CHECK-FP16-NEXT: movne r7, r4
2225 ; CHECK-FP16-NEXT: vmov.32 d0[0], r0
2226 ; CHECK-FP16-NEXT: cmp r6, #0
2227 ; CHECK-FP16-NEXT: vmov.32 d1[1], r7
2228 ; CHECK-FP16-NEXT: movne r6, r1
2229 ; CHECK-FP16-NEXT: vmov.32 d0[1], r6
2230 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r11, pc}
2232 %conv = fptoui <2 x half> %x to <2 x i128>
2233 %0 = icmp ult <2 x i128> %conv, <i128 18446744073709551616, i128 18446744073709551616>
2234 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>
2235 %conv6 = trunc <2 x i128> %spec.store.select to <2 x i64>
2236 ret <2 x i64> %conv6
2239 define <2 x i64> @ustest_f16i64(<2 x half> %x) {
2240 ; CHECK-NEON-LABEL: ustest_f16i64:
2241 ; CHECK-NEON: @ %bb.0: @ %entry
2242 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r11, lr}
2243 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r11, lr}
2244 ; CHECK-NEON-NEXT: .vsave {d8}
2245 ; CHECK-NEON-NEXT: vpush {d8}
2246 ; CHECK-NEON-NEXT: vmov r0, s0
2247 ; CHECK-NEON-NEXT: vmov.f32 s16, s1
2248 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2249 ; CHECK-NEON-NEXT: mov r5, r0
2250 ; CHECK-NEON-NEXT: vmov r0, s16
2251 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2252 ; CHECK-NEON-NEXT: vmov s0, r0
2253 ; CHECK-NEON-NEXT: bl __fixsfti
2254 ; CHECK-NEON-NEXT: mov r8, r1
2255 ; CHECK-NEON-NEXT: subs r1, r2, #1
2256 ; CHECK-NEON-NEXT: vmov s0, r5
2257 ; CHECK-NEON-NEXT: sbcs r1, r3, #0
2258 ; CHECK-NEON-NEXT: mov r5, #0
2259 ; CHECK-NEON-NEXT: mov r9, #1
2260 ; CHECK-NEON-NEXT: movwlt r5, #1
2261 ; CHECK-NEON-NEXT: cmp r5, #0
2262 ; CHECK-NEON-NEXT: moveq r3, r5
2263 ; CHECK-NEON-NEXT: moveq r8, r5
2264 ; CHECK-NEON-NEXT: moveq r2, r9
2265 ; CHECK-NEON-NEXT: movne r5, r0
2266 ; CHECK-NEON-NEXT: rsbs r0, r5, #0
2267 ; CHECK-NEON-NEXT: mov r7, #0
2268 ; CHECK-NEON-NEXT: rscs r0, r8, #0
2269 ; CHECK-NEON-NEXT: mov r6, #0
2270 ; CHECK-NEON-NEXT: rscs r0, r2, #0
2271 ; CHECK-NEON-NEXT: rscs r0, r3, #0
2272 ; CHECK-NEON-NEXT: movwlt r7, #1
2273 ; CHECK-NEON-NEXT: cmp r7, #0
2274 ; CHECK-NEON-NEXT: moveq r5, r7
2275 ; CHECK-NEON-NEXT: bl __fixsfti
2276 ; CHECK-NEON-NEXT: subs r4, r2, #1
2277 ; CHECK-NEON-NEXT: vmov.32 d1[0], r5
2278 ; CHECK-NEON-NEXT: sbcs r4, r3, #0
2279 ; CHECK-NEON-NEXT: mov r4, #0
2280 ; CHECK-NEON-NEXT: movwlt r4, #1
2281 ; CHECK-NEON-NEXT: cmp r4, #0
2282 ; CHECK-NEON-NEXT: movne r9, r2
2283 ; CHECK-NEON-NEXT: moveq r3, r4
2284 ; CHECK-NEON-NEXT: moveq r1, r4
2285 ; CHECK-NEON-NEXT: movne r4, r0
2286 ; CHECK-NEON-NEXT: rsbs r0, r4, #0
2287 ; CHECK-NEON-NEXT: rscs r0, r1, #0
2288 ; CHECK-NEON-NEXT: rscs r0, r9, #0
2289 ; CHECK-NEON-NEXT: rscs r0, r3, #0
2290 ; CHECK-NEON-NEXT: movwlt r6, #1
2291 ; CHECK-NEON-NEXT: cmp r6, #0
2292 ; CHECK-NEON-NEXT: moveq r4, r6
2293 ; CHECK-NEON-NEXT: cmp r7, #0
2294 ; CHECK-NEON-NEXT: movne r7, r8
2295 ; CHECK-NEON-NEXT: vmov.32 d0[0], r4
2296 ; CHECK-NEON-NEXT: cmp r6, #0
2297 ; CHECK-NEON-NEXT: vmov.32 d1[1], r7
2298 ; CHECK-NEON-NEXT: movne r6, r1
2299 ; CHECK-NEON-NEXT: vmov.32 d0[1], r6
2300 ; CHECK-NEON-NEXT: vpop {d8}
2301 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r11, pc}
2303 ; CHECK-FP16-LABEL: ustest_f16i64:
2304 ; CHECK-FP16: @ %bb.0: @ %entry
2305 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r11, lr}
2306 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r11, lr}
2307 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
2308 ; CHECK-FP16-NEXT: vmov.u16 r4, d0[0]
2309 ; CHECK-FP16-NEXT: vmov s0, r0
2310 ; CHECK-FP16-NEXT: bl __fixhfti
2311 ; CHECK-FP16-NEXT: mov r8, r1
2312 ; CHECK-FP16-NEXT: subs r1, r2, #1
2313 ; CHECK-FP16-NEXT: sbcs r1, r3, #0
2314 ; CHECK-FP16-NEXT: mov r6, #0
2315 ; CHECK-FP16-NEXT: movwlt r6, #1
2316 ; CHECK-FP16-NEXT: cmp r6, #0
2317 ; CHECK-FP16-NEXT: mov r9, #1
2318 ; CHECK-FP16-NEXT: moveq r3, r6
2319 ; CHECK-FP16-NEXT: moveq r8, r6
2320 ; CHECK-FP16-NEXT: moveq r2, r9
2321 ; CHECK-FP16-NEXT: movne r6, r0
2322 ; CHECK-FP16-NEXT: rsbs r0, r6, #0
2323 ; CHECK-FP16-NEXT: rscs r0, r8, #0
2324 ; CHECK-FP16-NEXT: vmov s0, r4
2325 ; CHECK-FP16-NEXT: rscs r0, r2, #0
2326 ; CHECK-FP16-NEXT: mov r7, #0
2327 ; CHECK-FP16-NEXT: rscs r0, r3, #0
2328 ; CHECK-FP16-NEXT: mov r5, #0
2329 ; CHECK-FP16-NEXT: movwlt r7, #1
2330 ; CHECK-FP16-NEXT: cmp r7, #0
2331 ; CHECK-FP16-NEXT: moveq r6, r7
2332 ; CHECK-FP16-NEXT: bl __fixhfti
2333 ; CHECK-FP16-NEXT: subs r4, r2, #1
2334 ; CHECK-FP16-NEXT: vmov.32 d1[0], r6
2335 ; CHECK-FP16-NEXT: sbcs r4, r3, #0
2336 ; CHECK-FP16-NEXT: mov r4, #0
2337 ; CHECK-FP16-NEXT: movwlt r4, #1
2338 ; CHECK-FP16-NEXT: cmp r4, #0
2339 ; CHECK-FP16-NEXT: movne r9, r2
2340 ; CHECK-FP16-NEXT: moveq r3, r4
2341 ; CHECK-FP16-NEXT: moveq r1, r4
2342 ; CHECK-FP16-NEXT: movne r4, r0
2343 ; CHECK-FP16-NEXT: rsbs r0, r4, #0
2344 ; CHECK-FP16-NEXT: rscs r0, r1, #0
2345 ; CHECK-FP16-NEXT: rscs r0, r9, #0
2346 ; CHECK-FP16-NEXT: rscs r0, r3, #0
2347 ; CHECK-FP16-NEXT: movwlt r5, #1
2348 ; CHECK-FP16-NEXT: cmp r5, #0
2349 ; CHECK-FP16-NEXT: moveq r4, r5
2350 ; CHECK-FP16-NEXT: cmp r7, #0
2351 ; CHECK-FP16-NEXT: movne r7, r8
2352 ; CHECK-FP16-NEXT: vmov.32 d0[0], r4
2353 ; CHECK-FP16-NEXT: cmp r5, #0
2354 ; CHECK-FP16-NEXT: vmov.32 d1[1], r7
2355 ; CHECK-FP16-NEXT: movne r5, r1
2356 ; CHECK-FP16-NEXT: vmov.32 d0[1], r5
2357 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r11, pc}
2359 %conv = fptosi <2 x half> %x to <2 x i128>
2360 %0 = icmp slt <2 x i128> %conv, <i128 18446744073709551616, i128 18446744073709551616>
2361 %spec.store.select = select <2 x i1> %0, <2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>
2362 %1 = icmp sgt <2 x i128> %spec.store.select, zeroinitializer
2363 %spec.store.select7 = select <2 x i1> %1, <2 x i128> %spec.store.select, <2 x i128> zeroinitializer
2364 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
2365 ret <2 x i64> %conv6
2372 define <2 x i32> @stest_f64i32_mm(<2 x double> %x) {
2373 ; CHECK-LABEL: stest_f64i32_mm:
2374 ; CHECK: @ %bb.0: @ %entry
2375 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
2376 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, lr}
2377 ; CHECK-NEXT: .vsave {d8, d9}
2378 ; CHECK-NEXT: vpush {d8, d9}
2379 ; CHECK-NEXT: vorr q4, q0, q0
2380 ; CHECK-NEXT: vmov r0, r1, d8
2381 ; CHECK-NEXT: bl __aeabi_d2lz
2382 ; CHECK-NEXT: mov r4, r0
2383 ; CHECK-NEXT: vmov r0, r2, d9
2384 ; CHECK-NEXT: mvn r5, #-2147483648
2385 ; CHECK-NEXT: subs r3, r4, r5
2386 ; CHECK-NEXT: sbcs r3, r1, #0
2387 ; CHECK-NEXT: mvn r7, #0
2388 ; CHECK-NEXT: mov r3, #0
2389 ; CHECK-NEXT: mov r8, #-2147483648
2390 ; CHECK-NEXT: movwlt r3, #1
2391 ; CHECK-NEXT: cmp r3, #0
2392 ; CHECK-NEXT: movne r3, r1
2393 ; CHECK-NEXT: moveq r4, r5
2394 ; CHECK-NEXT: rsbs r1, r4, #-2147483648
2395 ; CHECK-NEXT: mov r6, #0
2396 ; CHECK-NEXT: sbcs r1, r7, r3
2397 ; CHECK-NEXT: movge r4, r8
2398 ; CHECK-NEXT: mov r1, r2
2399 ; CHECK-NEXT: bl __aeabi_d2lz
2400 ; CHECK-NEXT: subs r2, r0, r5
2401 ; CHECK-NEXT: vmov.32 d0[0], r4
2402 ; CHECK-NEXT: sbcs r2, r1, #0
2403 ; CHECK-NEXT: movwlt r6, #1
2404 ; CHECK-NEXT: cmp r6, #0
2405 ; CHECK-NEXT: movne r6, r1
2406 ; CHECK-NEXT: movne r5, r0
2407 ; CHECK-NEXT: rsbs r0, r5, #-2147483648
2408 ; CHECK-NEXT: sbcs r0, r7, r6
2409 ; CHECK-NEXT: movge r5, r8
2410 ; CHECK-NEXT: vmov.32 d0[1], r5
2411 ; CHECK-NEXT: vpop {d8, d9}
2412 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, pc}
2414 %conv = fptosi <2 x double> %x to <2 x i64>
2415 %spec.store.select = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %conv, <2 x i64> <i64 2147483647, i64 2147483647>)
2416 %spec.store.select7 = call <2 x i64> @llvm.smax.v2i64(<2 x i64> %spec.store.select, <2 x i64> <i64 -2147483648, i64 -2147483648>)
2417 %conv6 = trunc <2 x i64> %spec.store.select7 to <2 x i32>
2418 ret <2 x i32> %conv6
2421 define <2 x i32> @utest_f64i32_mm(<2 x double> %x) {
2422 ; CHECK-LABEL: utest_f64i32_mm:
2423 ; CHECK: @ %bb.0: @ %entry
2424 ; CHECK-NEXT: .save {r4, lr}
2425 ; CHECK-NEXT: push {r4, lr}
2426 ; CHECK-NEXT: .vsave {d8, d9}
2427 ; CHECK-NEXT: vpush {d8, d9}
2428 ; CHECK-NEXT: vorr q4, q0, q0
2429 ; CHECK-NEXT: vmov r0, r1, d9
2430 ; CHECK-NEXT: bl __aeabi_d2ulz
2431 ; CHECK-NEXT: mov r4, r1
2432 ; CHECK-NEXT: vmov r2, r1, d8
2433 ; CHECK-NEXT: vmov.32 d9[0], r0
2434 ; CHECK-NEXT: mov r0, r2
2435 ; CHECK-NEXT: bl __aeabi_d2ulz
2436 ; CHECK-NEXT: vmov.32 d8[0], r0
2437 ; CHECK-NEXT: vmov.i64 q8, #0xffffffff
2438 ; CHECK-NEXT: vmov.32 d9[1], r4
2439 ; CHECK-NEXT: vmov.32 d8[1], r1
2440 ; CHECK-NEXT: vqsub.u64 q8, q4, q8
2441 ; CHECK-NEXT: vsub.i64 q8, q4, q8
2442 ; CHECK-NEXT: vmovn.i64 d0, q8
2443 ; CHECK-NEXT: vpop {d8, d9}
2444 ; CHECK-NEXT: pop {r4, pc}
2446 %conv = fptoui <2 x double> %x to <2 x i64>
2447 %spec.store.select = call <2 x i64> @llvm.umin.v2i64(<2 x i64> %conv, <2 x i64> <i64 4294967295, i64 4294967295>)
2448 %conv6 = trunc <2 x i64> %spec.store.select to <2 x i32>
2449 ret <2 x i32> %conv6
2452 define <2 x i32> @ustest_f64i32_mm(<2 x double> %x) {
2453 ; CHECK-LABEL: ustest_f64i32_mm:
2454 ; CHECK: @ %bb.0: @ %entry
2455 ; CHECK-NEXT: .save {r4, r5, r6, lr}
2456 ; CHECK-NEXT: push {r4, r5, r6, lr}
2457 ; CHECK-NEXT: .vsave {d8, d9}
2458 ; CHECK-NEXT: vpush {d8, d9}
2459 ; CHECK-NEXT: vorr q4, q0, q0
2460 ; CHECK-NEXT: vmov r0, r1, d8
2461 ; CHECK-NEXT: bl __aeabi_d2lz
2462 ; CHECK-NEXT: vmov r2, r12, d9
2463 ; CHECK-NEXT: mvn r5, #0
2464 ; CHECK-NEXT: subs r3, r0, r5
2465 ; CHECK-NEXT: mov r6, #0
2466 ; CHECK-NEXT: sbcs r3, r1, #0
2467 ; CHECK-NEXT: mov r4, #0
2468 ; CHECK-NEXT: mov r3, #0
2469 ; CHECK-NEXT: movwlt r3, #1
2470 ; CHECK-NEXT: cmp r3, #0
2471 ; CHECK-NEXT: movne r3, r1
2472 ; CHECK-NEXT: moveq r0, r5
2473 ; CHECK-NEXT: rsbs r1, r0, #0
2474 ; CHECK-NEXT: rscs r1, r3, #0
2475 ; CHECK-NEXT: movwlt r6, #1
2476 ; CHECK-NEXT: cmp r6, #0
2477 ; CHECK-NEXT: movne r6, r0
2478 ; CHECK-NEXT: mov r0, r2
2479 ; CHECK-NEXT: mov r1, r12
2480 ; CHECK-NEXT: bl __aeabi_d2lz
2481 ; CHECK-NEXT: subs r2, r0, r5
2482 ; CHECK-NEXT: vmov.32 d0[0], r6
2483 ; CHECK-NEXT: sbcs r2, r1, #0
2484 ; CHECK-NEXT: mov r2, #0
2485 ; CHECK-NEXT: movwlt r2, #1
2486 ; CHECK-NEXT: cmp r2, #0
2487 ; CHECK-NEXT: movne r2, r1
2488 ; CHECK-NEXT: movne r5, r0
2489 ; CHECK-NEXT: rsbs r0, r5, #0
2490 ; CHECK-NEXT: rscs r0, r2, #0
2491 ; CHECK-NEXT: movwlt r4, #1
2492 ; CHECK-NEXT: cmp r4, #0
2493 ; CHECK-NEXT: movne r4, r5
2494 ; CHECK-NEXT: vmov.32 d0[1], r4
2495 ; CHECK-NEXT: vpop {d8, d9}
2496 ; CHECK-NEXT: pop {r4, r5, r6, pc}
2498 %conv = fptosi <2 x double> %x to <2 x i64>
2499 %spec.store.select = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %conv, <2 x i64> <i64 4294967295, i64 4294967295>)
2500 %spec.store.select7 = call <2 x i64> @llvm.smax.v2i64(<2 x i64> %spec.store.select, <2 x i64> zeroinitializer)
2501 %conv6 = trunc <2 x i64> %spec.store.select7 to <2 x i32>
2502 ret <2 x i32> %conv6
2505 define <4 x i32> @stest_f32i32_mm(<4 x float> %x) {
2506 ; CHECK-LABEL: stest_f32i32_mm:
2507 ; CHECK: @ %bb.0: @ %entry
2508 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
2509 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
2510 ; CHECK-NEXT: .vsave {d8, d9}
2511 ; CHECK-NEXT: vpush {d8, d9}
2512 ; CHECK-NEXT: vorr q4, q0, q0
2513 ; CHECK-NEXT: mov r8, #-2147483648
2514 ; CHECK-NEXT: mvn r9, #0
2515 ; CHECK-NEXT: mov r10, #0
2516 ; CHECK-NEXT: vmov r0, s19
2517 ; CHECK-NEXT: vmov r5, s16
2518 ; CHECK-NEXT: bl __aeabi_f2lz
2519 ; CHECK-NEXT: mov r4, r0
2520 ; CHECK-NEXT: mvn r7, #-2147483648
2521 ; CHECK-NEXT: subs r0, r0, r7
2522 ; CHECK-NEXT: sbcs r0, r1, #0
2523 ; CHECK-NEXT: mov r0, #0
2524 ; CHECK-NEXT: movwlt r0, #1
2525 ; CHECK-NEXT: cmp r0, #0
2526 ; CHECK-NEXT: movne r0, r1
2527 ; CHECK-NEXT: moveq r4, r7
2528 ; CHECK-NEXT: rsbs r1, r4, #-2147483648
2529 ; CHECK-NEXT: sbcs r0, r9, r0
2530 ; CHECK-NEXT: mov r0, r5
2531 ; CHECK-NEXT: movge r4, r8
2532 ; CHECK-NEXT: bl __aeabi_f2lz
2533 ; CHECK-NEXT: mov r5, r0
2534 ; CHECK-NEXT: subs r0, r0, r7
2535 ; CHECK-NEXT: sbcs r0, r1, #0
2536 ; CHECK-NEXT: mov r2, #0
2537 ; CHECK-NEXT: vmov r0, s18
2538 ; CHECK-NEXT: movwlt r2, #1
2539 ; CHECK-NEXT: cmp r2, #0
2540 ; CHECK-NEXT: movne r2, r1
2541 ; CHECK-NEXT: moveq r5, r7
2542 ; CHECK-NEXT: rsbs r1, r5, #-2147483648
2543 ; CHECK-NEXT: sbcs r1, r9, r2
2544 ; CHECK-NEXT: movge r5, r8
2545 ; CHECK-NEXT: bl __aeabi_f2lz
2546 ; CHECK-NEXT: mov r6, r0
2547 ; CHECK-NEXT: subs r0, r0, r7
2548 ; CHECK-NEXT: sbcs r0, r1, #0
2549 ; CHECK-NEXT: mov r0, #0
2550 ; CHECK-NEXT: movwlt r0, #1
2551 ; CHECK-NEXT: cmp r0, #0
2552 ; CHECK-NEXT: movne r0, r1
2553 ; CHECK-NEXT: moveq r6, r7
2554 ; CHECK-NEXT: rsbs r1, r6, #-2147483648
2555 ; CHECK-NEXT: sbcs r0, r9, r0
2556 ; CHECK-NEXT: vmov r0, s17
2557 ; CHECK-NEXT: movge r6, r8
2558 ; CHECK-NEXT: bl __aeabi_f2lz
2559 ; CHECK-NEXT: subs r2, r0, r7
2560 ; CHECK-NEXT: vmov.32 d1[0], r6
2561 ; CHECK-NEXT: sbcs r2, r1, #0
2562 ; CHECK-NEXT: movwlt r10, #1
2563 ; CHECK-NEXT: cmp r10, #0
2564 ; CHECK-NEXT: movne r10, r1
2565 ; CHECK-NEXT: movne r7, r0
2566 ; CHECK-NEXT: rsbs r0, r7, #-2147483648
2567 ; CHECK-NEXT: vmov.32 d0[0], r5
2568 ; CHECK-NEXT: sbcs r0, r9, r10
2569 ; CHECK-NEXT: vmov.32 d1[1], r4
2570 ; CHECK-NEXT: movge r7, r8
2571 ; CHECK-NEXT: vmov.32 d0[1], r7
2572 ; CHECK-NEXT: vpop {d8, d9}
2573 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
2575 %conv = fptosi <4 x float> %x to <4 x i64>
2576 %spec.store.select = call <4 x i64> @llvm.smin.v4i64(<4 x i64> %conv, <4 x i64> <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>)
2577 %spec.store.select7 = call <4 x i64> @llvm.smax.v4i64(<4 x i64> %spec.store.select, <4 x i64> <i64 -2147483648, i64 -2147483648, i64 -2147483648, i64 -2147483648>)
2578 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
2579 ret <4 x i32> %conv6
2582 define <4 x i32> @utest_f32i32_mm(<4 x float> %x) {
2583 ; CHECK-LABEL: utest_f32i32_mm:
2584 ; CHECK: @ %bb.0: @ %entry
2585 ; CHECK-NEXT: .save {r4, r5, r6, r7, r11, lr}
2586 ; CHECK-NEXT: push {r4, r5, r6, r7, r11, lr}
2587 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
2588 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
2589 ; CHECK-NEXT: vorr q4, q0, q0
2590 ; CHECK-NEXT: vmov r0, s17
2591 ; CHECK-NEXT: bl __aeabi_f2ulz
2592 ; CHECK-NEXT: mov r4, r1
2593 ; CHECK-NEXT: vmov r1, s18
2594 ; CHECK-NEXT: vmov r5, s19
2595 ; CHECK-NEXT: vmov r6, s16
2596 ; CHECK-NEXT: vmov.32 d9[0], r0
2597 ; CHECK-NEXT: mov r0, r1
2598 ; CHECK-NEXT: bl __aeabi_f2ulz
2599 ; CHECK-NEXT: vmov.32 d10[0], r0
2600 ; CHECK-NEXT: mov r0, r5
2601 ; CHECK-NEXT: mov r7, r1
2602 ; CHECK-NEXT: bl __aeabi_f2ulz
2603 ; CHECK-NEXT: vmov.32 d11[0], r0
2604 ; CHECK-NEXT: mov r0, r6
2605 ; CHECK-NEXT: mov r5, r1
2606 ; CHECK-NEXT: bl __aeabi_f2ulz
2607 ; CHECK-NEXT: vmov.32 d8[0], r0
2608 ; CHECK-NEXT: vmov.i64 q8, #0xffffffff
2609 ; CHECK-NEXT: vmov.32 d11[1], r5
2610 ; CHECK-NEXT: vmov.32 d9[1], r4
2611 ; CHECK-NEXT: vmov.32 d10[1], r7
2612 ; CHECK-NEXT: vmov.32 d8[1], r1
2613 ; CHECK-NEXT: vqsub.u64 q9, q5, q8
2614 ; CHECK-NEXT: vqsub.u64 q8, q4, q8
2615 ; CHECK-NEXT: vsub.i64 q9, q5, q9
2616 ; CHECK-NEXT: vsub.i64 q8, q4, q8
2617 ; CHECK-NEXT: vmovn.i64 d1, q9
2618 ; CHECK-NEXT: vmovn.i64 d0, q8
2619 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
2620 ; CHECK-NEXT: pop {r4, r5, r6, r7, r11, pc}
2622 %conv = fptoui <4 x float> %x to <4 x i64>
2623 %spec.store.select = call <4 x i64> @llvm.umin.v4i64(<4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>)
2624 %conv6 = trunc <4 x i64> %spec.store.select to <4 x i32>
2625 ret <4 x i32> %conv6
2628 define <4 x i32> @ustest_f32i32_mm(<4 x float> %x) {
2629 ; CHECK-LABEL: ustest_f32i32_mm:
2630 ; CHECK: @ %bb.0: @ %entry
2631 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
2632 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
2633 ; CHECK-NEXT: .vsave {d8, d9}
2634 ; CHECK-NEXT: vpush {d8, d9}
2635 ; CHECK-NEXT: vorr q4, q0, q0
2636 ; CHECK-NEXT: vmov r0, s19
2637 ; CHECK-NEXT: bl __aeabi_f2lz
2638 ; CHECK-NEXT: vmov r2, s16
2639 ; CHECK-NEXT: mvn r7, #0
2640 ; CHECK-NEXT: subs r3, r0, r7
2641 ; CHECK-NEXT: mov r4, #0
2642 ; CHECK-NEXT: sbcs r3, r1, #0
2643 ; CHECK-NEXT: mov r10, #0
2644 ; CHECK-NEXT: mov r3, #0
2645 ; CHECK-NEXT: vmov r9, s18
2646 ; CHECK-NEXT: movwlt r3, #1
2647 ; CHECK-NEXT: cmp r3, #0
2648 ; CHECK-NEXT: movne r3, r1
2649 ; CHECK-NEXT: moveq r0, r7
2650 ; CHECK-NEXT: rsbs r1, r0, #0
2651 ; CHECK-NEXT: vmov r8, s17
2652 ; CHECK-NEXT: rscs r1, r3, #0
2653 ; CHECK-NEXT: movwlt r4, #1
2654 ; CHECK-NEXT: cmp r4, #0
2655 ; CHECK-NEXT: movne r4, r0
2656 ; CHECK-NEXT: mov r0, r2
2657 ; CHECK-NEXT: bl __aeabi_f2lz
2658 ; CHECK-NEXT: subs r2, r0, r7
2659 ; CHECK-NEXT: mov r5, #0
2660 ; CHECK-NEXT: sbcs r2, r1, #0
2661 ; CHECK-NEXT: mov r2, #0
2662 ; CHECK-NEXT: movwlt r2, #1
2663 ; CHECK-NEXT: cmp r2, #0
2664 ; CHECK-NEXT: movne r2, r1
2665 ; CHECK-NEXT: moveq r0, r7
2666 ; CHECK-NEXT: rsbs r1, r0, #0
2667 ; CHECK-NEXT: rscs r1, r2, #0
2668 ; CHECK-NEXT: movwlt r5, #1
2669 ; CHECK-NEXT: cmp r5, #0
2670 ; CHECK-NEXT: movne r5, r0
2671 ; CHECK-NEXT: mov r0, r9
2672 ; CHECK-NEXT: bl __aeabi_f2lz
2673 ; CHECK-NEXT: subs r2, r0, r7
2674 ; CHECK-NEXT: mov r6, #0
2675 ; CHECK-NEXT: sbcs r2, r1, #0
2676 ; CHECK-NEXT: mov r2, #0
2677 ; CHECK-NEXT: movwlt r2, #1
2678 ; CHECK-NEXT: cmp r2, #0
2679 ; CHECK-NEXT: movne r2, r1
2680 ; CHECK-NEXT: moveq r0, r7
2681 ; CHECK-NEXT: rsbs r1, r0, #0
2682 ; CHECK-NEXT: rscs r1, r2, #0
2683 ; CHECK-NEXT: movwlt r6, #1
2684 ; CHECK-NEXT: cmp r6, #0
2685 ; CHECK-NEXT: movne r6, r0
2686 ; CHECK-NEXT: mov r0, r8
2687 ; CHECK-NEXT: bl __aeabi_f2lz
2688 ; CHECK-NEXT: subs r2, r0, r7
2689 ; CHECK-NEXT: vmov.32 d1[0], r6
2690 ; CHECK-NEXT: sbcs r2, r1, #0
2691 ; CHECK-NEXT: mov r2, #0
2692 ; CHECK-NEXT: vmov.32 d0[0], r5
2693 ; CHECK-NEXT: movwlt r2, #1
2694 ; CHECK-NEXT: cmp r2, #0
2695 ; CHECK-NEXT: movne r2, r1
2696 ; CHECK-NEXT: movne r7, r0
2697 ; CHECK-NEXT: rsbs r0, r7, #0
2698 ; CHECK-NEXT: vmov.32 d1[1], r4
2699 ; CHECK-NEXT: rscs r0, r2, #0
2700 ; CHECK-NEXT: movwlt r10, #1
2701 ; CHECK-NEXT: cmp r10, #0
2702 ; CHECK-NEXT: movne r10, r7
2703 ; CHECK-NEXT: vmov.32 d0[1], r10
2704 ; CHECK-NEXT: vpop {d8, d9}
2705 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
2707 %conv = fptosi <4 x float> %x to <4 x i64>
2708 %spec.store.select = call <4 x i64> @llvm.smin.v4i64(<4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>)
2709 %spec.store.select7 = call <4 x i64> @llvm.smax.v4i64(<4 x i64> %spec.store.select, <4 x i64> zeroinitializer)
2710 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
2711 ret <4 x i32> %conv6
2714 define <4 x i32> @stest_f16i32_mm(<4 x half> %x) {
2715 ; CHECK-NEON-LABEL: stest_f16i32_mm:
2716 ; CHECK-NEON: @ %bb.0: @ %entry
2717 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
2718 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
2719 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10}
2720 ; CHECK-NEON-NEXT: vpush {d8, d9, d10}
2721 ; CHECK-NEON-NEXT: vmov r0, s3
2722 ; CHECK-NEON-NEXT: vmov.f32 s18, s2
2723 ; CHECK-NEON-NEXT: vmov.f32 s16, s1
2724 ; CHECK-NEON-NEXT: vmov.f32 s20, s0
2725 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2726 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
2727 ; CHECK-NEON-NEXT: mov r4, r0
2728 ; CHECK-NEON-NEXT: vmov r0, s20
2729 ; CHECK-NEON-NEXT: mvn r7, #-2147483648
2730 ; CHECK-NEON-NEXT: subs r2, r4, r7
2731 ; CHECK-NEON-NEXT: sbcs r2, r1, #0
2732 ; CHECK-NEON-NEXT: mov r8, #-2147483648
2733 ; CHECK-NEON-NEXT: mov r2, #0
2734 ; CHECK-NEON-NEXT: mvn r9, #0
2735 ; CHECK-NEON-NEXT: movwlt r2, #1
2736 ; CHECK-NEON-NEXT: cmp r2, #0
2737 ; CHECK-NEON-NEXT: movne r2, r1
2738 ; CHECK-NEON-NEXT: moveq r4, r7
2739 ; CHECK-NEON-NEXT: rsbs r1, r4, #-2147483648
2740 ; CHECK-NEON-NEXT: mov r10, #0
2741 ; CHECK-NEON-NEXT: sbcs r1, r9, r2
2742 ; CHECK-NEON-NEXT: movge r4, r8
2743 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2744 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
2745 ; CHECK-NEON-NEXT: mov r5, r0
2746 ; CHECK-NEON-NEXT: subs r0, r0, r7
2747 ; CHECK-NEON-NEXT: sbcs r0, r1, #0
2748 ; CHECK-NEON-NEXT: mov r2, #0
2749 ; CHECK-NEON-NEXT: vmov r0, s18
2750 ; CHECK-NEON-NEXT: movwlt r2, #1
2751 ; CHECK-NEON-NEXT: cmp r2, #0
2752 ; CHECK-NEON-NEXT: movne r2, r1
2753 ; CHECK-NEON-NEXT: moveq r5, r7
2754 ; CHECK-NEON-NEXT: rsbs r1, r5, #-2147483648
2755 ; CHECK-NEON-NEXT: sbcs r1, r9, r2
2756 ; CHECK-NEON-NEXT: movge r5, r8
2757 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2758 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
2759 ; CHECK-NEON-NEXT: mov r6, r0
2760 ; CHECK-NEON-NEXT: subs r0, r0, r7
2761 ; CHECK-NEON-NEXT: sbcs r0, r1, #0
2762 ; CHECK-NEON-NEXT: mov r0, #0
2763 ; CHECK-NEON-NEXT: movwlt r0, #1
2764 ; CHECK-NEON-NEXT: cmp r0, #0
2765 ; CHECK-NEON-NEXT: movne r0, r1
2766 ; CHECK-NEON-NEXT: moveq r6, r7
2767 ; CHECK-NEON-NEXT: rsbs r1, r6, #-2147483648
2768 ; CHECK-NEON-NEXT: sbcs r0, r9, r0
2769 ; CHECK-NEON-NEXT: vmov r0, s16
2770 ; CHECK-NEON-NEXT: movge r6, r8
2771 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2772 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
2773 ; CHECK-NEON-NEXT: subs r2, r0, r7
2774 ; CHECK-NEON-NEXT: vmov.32 d1[0], r6
2775 ; CHECK-NEON-NEXT: sbcs r2, r1, #0
2776 ; CHECK-NEON-NEXT: movwlt r10, #1
2777 ; CHECK-NEON-NEXT: cmp r10, #0
2778 ; CHECK-NEON-NEXT: movne r10, r1
2779 ; CHECK-NEON-NEXT: movne r7, r0
2780 ; CHECK-NEON-NEXT: rsbs r0, r7, #-2147483648
2781 ; CHECK-NEON-NEXT: vmov.32 d0[0], r5
2782 ; CHECK-NEON-NEXT: sbcs r0, r9, r10
2783 ; CHECK-NEON-NEXT: vmov.32 d1[1], r4
2784 ; CHECK-NEON-NEXT: movge r7, r8
2785 ; CHECK-NEON-NEXT: vmov.32 d0[1], r7
2786 ; CHECK-NEON-NEXT: vpop {d8, d9, d10}
2787 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
2789 ; CHECK-FP16-LABEL: stest_f16i32_mm:
2790 ; CHECK-FP16: @ %bb.0: @ %entry
2791 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
2792 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
2793 ; CHECK-FP16-NEXT: .vsave {d8, d9}
2794 ; CHECK-FP16-NEXT: vpush {d8, d9}
2795 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[3]
2796 ; CHECK-FP16-NEXT: vorr d8, d0, d0
2797 ; CHECK-FP16-NEXT: vmov.u16 r5, d0[2]
2798 ; CHECK-FP16-NEXT: vmov.u16 r6, d0[0]
2799 ; CHECK-FP16-NEXT: vmov s0, r0
2800 ; CHECK-FP16-NEXT: bl __fixhfdi
2801 ; CHECK-FP16-NEXT: mov r4, r0
2802 ; CHECK-FP16-NEXT: mvn r7, #-2147483648
2803 ; CHECK-FP16-NEXT: subs r0, r0, r7
2804 ; CHECK-FP16-NEXT: vmov s0, r6
2805 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
2806 ; CHECK-FP16-NEXT: mov r8, #-2147483648
2807 ; CHECK-FP16-NEXT: mov r0, #0
2808 ; CHECK-FP16-NEXT: mvn r9, #0
2809 ; CHECK-FP16-NEXT: movwlt r0, #1
2810 ; CHECK-FP16-NEXT: cmp r0, #0
2811 ; CHECK-FP16-NEXT: movne r0, r1
2812 ; CHECK-FP16-NEXT: moveq r4, r7
2813 ; CHECK-FP16-NEXT: rsbs r1, r4, #-2147483648
2814 ; CHECK-FP16-NEXT: mov r10, #0
2815 ; CHECK-FP16-NEXT: sbcs r0, r9, r0
2816 ; CHECK-FP16-NEXT: vmov s18, r5
2817 ; CHECK-FP16-NEXT: movge r4, r8
2818 ; CHECK-FP16-NEXT: bl __fixhfdi
2819 ; CHECK-FP16-NEXT: vmov.f32 s0, s18
2820 ; CHECK-FP16-NEXT: mov r5, r0
2821 ; CHECK-FP16-NEXT: subs r0, r0, r7
2822 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
2823 ; CHECK-FP16-NEXT: mov r0, #0
2824 ; CHECK-FP16-NEXT: movwlt r0, #1
2825 ; CHECK-FP16-NEXT: cmp r0, #0
2826 ; CHECK-FP16-NEXT: movne r0, r1
2827 ; CHECK-FP16-NEXT: moveq r5, r7
2828 ; CHECK-FP16-NEXT: rsbs r1, r5, #-2147483648
2829 ; CHECK-FP16-NEXT: sbcs r0, r9, r0
2830 ; CHECK-FP16-NEXT: movge r5, r8
2831 ; CHECK-FP16-NEXT: bl __fixhfdi
2832 ; CHECK-FP16-NEXT: mov r6, r0
2833 ; CHECK-FP16-NEXT: subs r0, r0, r7
2834 ; CHECK-FP16-NEXT: sbcs r0, r1, #0
2835 ; CHECK-FP16-NEXT: mov r0, #0
2836 ; CHECK-FP16-NEXT: movwlt r0, #1
2837 ; CHECK-FP16-NEXT: cmp r0, #0
2838 ; CHECK-FP16-NEXT: movne r0, r1
2839 ; CHECK-FP16-NEXT: vmov.u16 r1, d8[1]
2840 ; CHECK-FP16-NEXT: moveq r6, r7
2841 ; CHECK-FP16-NEXT: vmov s0, r1
2842 ; CHECK-FP16-NEXT: rsbs r1, r6, #-2147483648
2843 ; CHECK-FP16-NEXT: sbcs r0, r9, r0
2844 ; CHECK-FP16-NEXT: movge r6, r8
2845 ; CHECK-FP16-NEXT: bl __fixhfdi
2846 ; CHECK-FP16-NEXT: subs r2, r0, r7
2847 ; CHECK-FP16-NEXT: vmov.32 d1[0], r6
2848 ; CHECK-FP16-NEXT: sbcs r2, r1, #0
2849 ; CHECK-FP16-NEXT: movwlt r10, #1
2850 ; CHECK-FP16-NEXT: cmp r10, #0
2851 ; CHECK-FP16-NEXT: movne r10, r1
2852 ; CHECK-FP16-NEXT: movne r7, r0
2853 ; CHECK-FP16-NEXT: rsbs r0, r7, #-2147483648
2854 ; CHECK-FP16-NEXT: vmov.32 d0[0], r5
2855 ; CHECK-FP16-NEXT: sbcs r0, r9, r10
2856 ; CHECK-FP16-NEXT: vmov.32 d1[1], r4
2857 ; CHECK-FP16-NEXT: movge r7, r8
2858 ; CHECK-FP16-NEXT: vmov.32 d0[1], r7
2859 ; CHECK-FP16-NEXT: vpop {d8, d9}
2860 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
2862 %conv = fptosi <4 x half> %x to <4 x i64>
2863 %spec.store.select = call <4 x i64> @llvm.smin.v4i64(<4 x i64> %conv, <4 x i64> <i64 2147483647, i64 2147483647, i64 2147483647, i64 2147483647>)
2864 %spec.store.select7 = call <4 x i64> @llvm.smax.v4i64(<4 x i64> %spec.store.select, <4 x i64> <i64 -2147483648, i64 -2147483648, i64 -2147483648, i64 -2147483648>)
2865 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
2866 ret <4 x i32> %conv6
2869 define <4 x i32> @utesth_f16i32_mm(<4 x half> %x) {
2870 ; CHECK-NEON-LABEL: utesth_f16i32_mm:
2871 ; CHECK-NEON: @ %bb.0: @ %entry
2872 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
2873 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
2874 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11}
2875 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11}
2876 ; CHECK-NEON-NEXT: vmov r0, s1
2877 ; CHECK-NEON-NEXT: vmov.f32 s16, s3
2878 ; CHECK-NEON-NEXT: vmov.f32 s18, s2
2879 ; CHECK-NEON-NEXT: vmov.f32 s20, s0
2880 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2881 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
2882 ; CHECK-NEON-NEXT: mov r4, r1
2883 ; CHECK-NEON-NEXT: vmov r1, s18
2884 ; CHECK-NEON-NEXT: vmov r6, s16
2885 ; CHECK-NEON-NEXT: vmov.32 d9[0], r0
2886 ; CHECK-NEON-NEXT: vmov r7, s20
2887 ; CHECK-NEON-NEXT: mov r0, r1
2888 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2889 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
2890 ; CHECK-NEON-NEXT: vmov.32 d10[0], r0
2891 ; CHECK-NEON-NEXT: mov r0, r6
2892 ; CHECK-NEON-NEXT: mov r5, r1
2893 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2894 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
2895 ; CHECK-NEON-NEXT: vmov.32 d11[0], r0
2896 ; CHECK-NEON-NEXT: mov r0, r7
2897 ; CHECK-NEON-NEXT: mov r6, r1
2898 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2899 ; CHECK-NEON-NEXT: bl __aeabi_f2ulz
2900 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
2901 ; CHECK-NEON-NEXT: vmov.i64 q8, #0xffffffff
2902 ; CHECK-NEON-NEXT: vmov.32 d11[1], r6
2903 ; CHECK-NEON-NEXT: vmov.32 d9[1], r4
2904 ; CHECK-NEON-NEXT: vmov.32 d10[1], r5
2905 ; CHECK-NEON-NEXT: vmov.32 d8[1], r1
2906 ; CHECK-NEON-NEXT: vqsub.u64 q9, q5, q8
2907 ; CHECK-NEON-NEXT: vqsub.u64 q8, q4, q8
2908 ; CHECK-NEON-NEXT: vsub.i64 q9, q5, q9
2909 ; CHECK-NEON-NEXT: vsub.i64 q8, q4, q8
2910 ; CHECK-NEON-NEXT: vmovn.i64 d1, q9
2911 ; CHECK-NEON-NEXT: vmovn.i64 d0, q8
2912 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11}
2913 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
2915 ; CHECK-FP16-LABEL: utesth_f16i32_mm:
2916 ; CHECK-FP16: @ %bb.0: @ %entry
2917 ; CHECK-FP16-NEXT: .save {r4, r5, r6, lr}
2918 ; CHECK-FP16-NEXT: push {r4, r5, r6, lr}
2919 ; CHECK-FP16-NEXT: .vsave {d10, d11, d12, d13}
2920 ; CHECK-FP16-NEXT: vpush {d10, d11, d12, d13}
2921 ; CHECK-FP16-NEXT: .vsave {d8}
2922 ; CHECK-FP16-NEXT: vpush {d8}
2923 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
2924 ; CHECK-FP16-NEXT: vorr d8, d0, d0
2925 ; CHECK-FP16-NEXT: vmov.u16 r6, d0[3]
2926 ; CHECK-FP16-NEXT: vmov s0, r0
2927 ; CHECK-FP16-NEXT: bl __fixunshfdi
2928 ; CHECK-FP16-NEXT: mov r4, r1
2929 ; CHECK-FP16-NEXT: vmov.u16 r1, d8[2]
2930 ; CHECK-FP16-NEXT: vmov.32 d11[0], r0
2931 ; CHECK-FP16-NEXT: vmov s0, r1
2932 ; CHECK-FP16-NEXT: bl __fixunshfdi
2933 ; CHECK-FP16-NEXT: vmov s0, r6
2934 ; CHECK-FP16-NEXT: mov r5, r1
2935 ; CHECK-FP16-NEXT: vmov.32 d12[0], r0
2936 ; CHECK-FP16-NEXT: bl __fixunshfdi
2937 ; CHECK-FP16-NEXT: mov r6, r1
2938 ; CHECK-FP16-NEXT: vmov.u16 r1, d8[0]
2939 ; CHECK-FP16-NEXT: vmov.32 d13[0], r0
2940 ; CHECK-FP16-NEXT: vmov s0, r1
2941 ; CHECK-FP16-NEXT: bl __fixunshfdi
2942 ; CHECK-FP16-NEXT: vmov.32 d10[0], r0
2943 ; CHECK-FP16-NEXT: vmov.i64 q8, #0xffffffff
2944 ; CHECK-FP16-NEXT: vmov.32 d13[1], r6
2945 ; CHECK-FP16-NEXT: vmov.32 d11[1], r4
2946 ; CHECK-FP16-NEXT: vmov.32 d12[1], r5
2947 ; CHECK-FP16-NEXT: vmov.32 d10[1], r1
2948 ; CHECK-FP16-NEXT: vqsub.u64 q9, q6, q8
2949 ; CHECK-FP16-NEXT: vqsub.u64 q8, q5, q8
2950 ; CHECK-FP16-NEXT: vsub.i64 q9, q6, q9
2951 ; CHECK-FP16-NEXT: vsub.i64 q8, q5, q8
2952 ; CHECK-FP16-NEXT: vmovn.i64 d1, q9
2953 ; CHECK-FP16-NEXT: vmovn.i64 d0, q8
2954 ; CHECK-FP16-NEXT: vpop {d8}
2955 ; CHECK-FP16-NEXT: vpop {d10, d11, d12, d13}
2956 ; CHECK-FP16-NEXT: pop {r4, r5, r6, pc}
2958 %conv = fptoui <4 x half> %x to <4 x i64>
2959 %spec.store.select = call <4 x i64> @llvm.umin.v4i64(<4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>)
2960 %conv6 = trunc <4 x i64> %spec.store.select to <4 x i32>
2961 ret <4 x i32> %conv6
2964 define <4 x i32> @ustest_f16i32_mm(<4 x half> %x) {
2965 ; CHECK-NEON-LABEL: ustest_f16i32_mm:
2966 ; CHECK-NEON: @ %bb.0: @ %entry
2967 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
2968 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
2969 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10}
2970 ; CHECK-NEON-NEXT: vpush {d8, d9, d10}
2971 ; CHECK-NEON-NEXT: vmov r0, s3
2972 ; CHECK-NEON-NEXT: vmov.f32 s16, s2
2973 ; CHECK-NEON-NEXT: vmov.f32 s18, s1
2974 ; CHECK-NEON-NEXT: vmov.f32 s20, s0
2975 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2976 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
2977 ; CHECK-NEON-NEXT: vmov r2, s20
2978 ; CHECK-NEON-NEXT: mvn r7, #0
2979 ; CHECK-NEON-NEXT: subs r3, r0, r7
2980 ; CHECK-NEON-NEXT: mov r4, #0
2981 ; CHECK-NEON-NEXT: sbcs r3, r1, #0
2982 ; CHECK-NEON-NEXT: mov r10, #0
2983 ; CHECK-NEON-NEXT: mov r3, #0
2984 ; CHECK-NEON-NEXT: vmov r8, s18
2985 ; CHECK-NEON-NEXT: movwlt r3, #1
2986 ; CHECK-NEON-NEXT: cmp r3, #0
2987 ; CHECK-NEON-NEXT: movne r3, r1
2988 ; CHECK-NEON-NEXT: moveq r0, r7
2989 ; CHECK-NEON-NEXT: rsbs r1, r0, #0
2990 ; CHECK-NEON-NEXT: vmov r9, s16
2991 ; CHECK-NEON-NEXT: rscs r1, r3, #0
2992 ; CHECK-NEON-NEXT: movwlt r4, #1
2993 ; CHECK-NEON-NEXT: cmp r4, #0
2994 ; CHECK-NEON-NEXT: movne r4, r0
2995 ; CHECK-NEON-NEXT: mov r0, r2
2996 ; CHECK-NEON-NEXT: bl __aeabi_h2f
2997 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
2998 ; CHECK-NEON-NEXT: subs r2, r0, r7
2999 ; CHECK-NEON-NEXT: mov r5, #0
3000 ; CHECK-NEON-NEXT: sbcs r2, r1, #0
3001 ; CHECK-NEON-NEXT: mov r2, #0
3002 ; CHECK-NEON-NEXT: movwlt r2, #1
3003 ; CHECK-NEON-NEXT: cmp r2, #0
3004 ; CHECK-NEON-NEXT: movne r2, r1
3005 ; CHECK-NEON-NEXT: moveq r0, r7
3006 ; CHECK-NEON-NEXT: rsbs r1, r0, #0
3007 ; CHECK-NEON-NEXT: rscs r1, r2, #0
3008 ; CHECK-NEON-NEXT: movwlt r5, #1
3009 ; CHECK-NEON-NEXT: cmp r5, #0
3010 ; CHECK-NEON-NEXT: movne r5, r0
3011 ; CHECK-NEON-NEXT: mov r0, r9
3012 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3013 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
3014 ; CHECK-NEON-NEXT: subs r2, r0, r7
3015 ; CHECK-NEON-NEXT: mov r6, #0
3016 ; CHECK-NEON-NEXT: sbcs r2, r1, #0
3017 ; CHECK-NEON-NEXT: mov r2, #0
3018 ; CHECK-NEON-NEXT: movwlt r2, #1
3019 ; CHECK-NEON-NEXT: cmp r2, #0
3020 ; CHECK-NEON-NEXT: movne r2, r1
3021 ; CHECK-NEON-NEXT: moveq r0, r7
3022 ; CHECK-NEON-NEXT: rsbs r1, r0, #0
3023 ; CHECK-NEON-NEXT: rscs r1, r2, #0
3024 ; CHECK-NEON-NEXT: movwlt r6, #1
3025 ; CHECK-NEON-NEXT: cmp r6, #0
3026 ; CHECK-NEON-NEXT: movne r6, r0
3027 ; CHECK-NEON-NEXT: mov r0, r8
3028 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3029 ; CHECK-NEON-NEXT: bl __aeabi_f2lz
3030 ; CHECK-NEON-NEXT: subs r2, r0, r7
3031 ; CHECK-NEON-NEXT: vmov.32 d1[0], r6
3032 ; CHECK-NEON-NEXT: sbcs r2, r1, #0
3033 ; CHECK-NEON-NEXT: mov r2, #0
3034 ; CHECK-NEON-NEXT: vmov.32 d0[0], r5
3035 ; CHECK-NEON-NEXT: movwlt r2, #1
3036 ; CHECK-NEON-NEXT: cmp r2, #0
3037 ; CHECK-NEON-NEXT: movne r2, r1
3038 ; CHECK-NEON-NEXT: movne r7, r0
3039 ; CHECK-NEON-NEXT: rsbs r0, r7, #0
3040 ; CHECK-NEON-NEXT: vmov.32 d1[1], r4
3041 ; CHECK-NEON-NEXT: rscs r0, r2, #0
3042 ; CHECK-NEON-NEXT: movwlt r10, #1
3043 ; CHECK-NEON-NEXT: cmp r10, #0
3044 ; CHECK-NEON-NEXT: movne r10, r7
3045 ; CHECK-NEON-NEXT: vmov.32 d0[1], r10
3046 ; CHECK-NEON-NEXT: vpop {d8, d9, d10}
3047 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
3049 ; CHECK-FP16-LABEL: ustest_f16i32_mm:
3050 ; CHECK-FP16: @ %bb.0: @ %entry
3051 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, lr}
3052 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, lr}
3053 ; CHECK-FP16-NEXT: .vsave {d8, d9}
3054 ; CHECK-FP16-NEXT: vpush {d8, d9}
3055 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[3]
3056 ; CHECK-FP16-NEXT: vorr d8, d0, d0
3057 ; CHECK-FP16-NEXT: vmov.u16 r6, d0[0]
3058 ; CHECK-FP16-NEXT: vmov.u16 r7, d0[2]
3059 ; CHECK-FP16-NEXT: vmov s0, r0
3060 ; CHECK-FP16-NEXT: bl __fixhfdi
3061 ; CHECK-FP16-NEXT: vmov.u16 r2, d8[1]
3062 ; CHECK-FP16-NEXT: mvn r5, #0
3063 ; CHECK-FP16-NEXT: vmov s0, r6
3064 ; CHECK-FP16-NEXT: mov r6, #0
3065 ; CHECK-FP16-NEXT: mov r8, #0
3066 ; CHECK-FP16-NEXT: vmov s18, r7
3067 ; CHECK-FP16-NEXT: vmov s16, r2
3068 ; CHECK-FP16-NEXT: subs r2, r0, r5
3069 ; CHECK-FP16-NEXT: sbcs r2, r1, #0
3070 ; CHECK-FP16-NEXT: mov r2, #0
3071 ; CHECK-FP16-NEXT: movwlt r2, #1
3072 ; CHECK-FP16-NEXT: cmp r2, #0
3073 ; CHECK-FP16-NEXT: movne r2, r1
3074 ; CHECK-FP16-NEXT: moveq r0, r5
3075 ; CHECK-FP16-NEXT: rsbs r1, r0, #0
3076 ; CHECK-FP16-NEXT: rscs r1, r2, #0
3077 ; CHECK-FP16-NEXT: movwlt r6, #1
3078 ; CHECK-FP16-NEXT: cmp r6, #0
3079 ; CHECK-FP16-NEXT: movne r6, r0
3080 ; CHECK-FP16-NEXT: bl __fixhfdi
3081 ; CHECK-FP16-NEXT: subs r2, r0, r5
3082 ; CHECK-FP16-NEXT: vmov.f32 s0, s18
3083 ; CHECK-FP16-NEXT: sbcs r2, r1, #0
3084 ; CHECK-FP16-NEXT: mov r7, #0
3085 ; CHECK-FP16-NEXT: mov r2, #0
3086 ; CHECK-FP16-NEXT: movwlt r2, #1
3087 ; CHECK-FP16-NEXT: cmp r2, #0
3088 ; CHECK-FP16-NEXT: movne r2, r1
3089 ; CHECK-FP16-NEXT: moveq r0, r5
3090 ; CHECK-FP16-NEXT: rsbs r1, r0, #0
3091 ; CHECK-FP16-NEXT: rscs r1, r2, #0
3092 ; CHECK-FP16-NEXT: movwlt r7, #1
3093 ; CHECK-FP16-NEXT: cmp r7, #0
3094 ; CHECK-FP16-NEXT: movne r7, r0
3095 ; CHECK-FP16-NEXT: bl __fixhfdi
3096 ; CHECK-FP16-NEXT: subs r2, r0, r5
3097 ; CHECK-FP16-NEXT: vmov.f32 s0, s16
3098 ; CHECK-FP16-NEXT: sbcs r2, r1, #0
3099 ; CHECK-FP16-NEXT: mov r4, #0
3100 ; CHECK-FP16-NEXT: mov r2, #0
3101 ; CHECK-FP16-NEXT: movwlt r2, #1
3102 ; CHECK-FP16-NEXT: cmp r2, #0
3103 ; CHECK-FP16-NEXT: movne r2, r1
3104 ; CHECK-FP16-NEXT: moveq r0, r5
3105 ; CHECK-FP16-NEXT: rsbs r1, r0, #0
3106 ; CHECK-FP16-NEXT: rscs r1, r2, #0
3107 ; CHECK-FP16-NEXT: movwlt r4, #1
3108 ; CHECK-FP16-NEXT: cmp r4, #0
3109 ; CHECK-FP16-NEXT: movne r4, r0
3110 ; CHECK-FP16-NEXT: bl __fixhfdi
3111 ; CHECK-FP16-NEXT: subs r2, r0, r5
3112 ; CHECK-FP16-NEXT: vmov.32 d1[0], r4
3113 ; CHECK-FP16-NEXT: sbcs r2, r1, #0
3114 ; CHECK-FP16-NEXT: mov r2, #0
3115 ; CHECK-FP16-NEXT: vmov.32 d0[0], r7
3116 ; CHECK-FP16-NEXT: movwlt r2, #1
3117 ; CHECK-FP16-NEXT: cmp r2, #0
3118 ; CHECK-FP16-NEXT: movne r2, r1
3119 ; CHECK-FP16-NEXT: movne r5, r0
3120 ; CHECK-FP16-NEXT: rsbs r0, r5, #0
3121 ; CHECK-FP16-NEXT: vmov.32 d1[1], r6
3122 ; CHECK-FP16-NEXT: rscs r0, r2, #0
3123 ; CHECK-FP16-NEXT: movwlt r8, #1
3124 ; CHECK-FP16-NEXT: cmp r8, #0
3125 ; CHECK-FP16-NEXT: movne r8, r5
3126 ; CHECK-FP16-NEXT: vmov.32 d0[1], r8
3127 ; CHECK-FP16-NEXT: vpop {d8, d9}
3128 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, pc}
3130 %conv = fptosi <4 x half> %x to <4 x i64>
3131 %spec.store.select = call <4 x i64> @llvm.smin.v4i64(<4 x i64> %conv, <4 x i64> <i64 4294967295, i64 4294967295, i64 4294967295, i64 4294967295>)
3132 %spec.store.select7 = call <4 x i64> @llvm.smax.v4i64(<4 x i64> %spec.store.select, <4 x i64> zeroinitializer)
3133 %conv6 = trunc <4 x i64> %spec.store.select7 to <4 x i32>
3134 ret <4 x i32> %conv6
3139 define <2 x i16> @stest_f64i16_mm(<2 x double> %x) {
3140 ; CHECK-LABEL: stest_f64i16_mm:
3141 ; CHECK: @ %bb.0: @ %entry
3142 ; CHECK-NEXT: vcvt.s32.f64 s4, d0
3143 ; CHECK-NEXT: vmov r0, s4
3144 ; CHECK-NEXT: vcvt.s32.f64 s0, d1
3145 ; CHECK-NEXT: vmov.i32 d17, #0x7fff
3146 ; CHECK-NEXT: vmvn.i32 d18, #0x7fff
3147 ; CHECK-NEXT: vmov.32 d16[0], r0
3148 ; CHECK-NEXT: vmov r0, s0
3149 ; CHECK-NEXT: vmov.32 d16[1], r0
3150 ; CHECK-NEXT: vmin.s32 d16, d16, d17
3151 ; CHECK-NEXT: vmax.s32 d0, d16, d18
3154 %conv = fptosi <2 x double> %x to <2 x i32>
3155 %spec.store.select = call <2 x i32> @llvm.smin.v2i32(<2 x i32> %conv, <2 x i32> <i32 32767, i32 32767>)
3156 %spec.store.select7 = call <2 x i32> @llvm.smax.v2i32(<2 x i32> %spec.store.select, <2 x i32> <i32 -32768, i32 -32768>)
3157 %conv6 = trunc <2 x i32> %spec.store.select7 to <2 x i16>
3158 ret <2 x i16> %conv6
3161 define <2 x i16> @utest_f64i16_mm(<2 x double> %x) {
3162 ; CHECK-LABEL: utest_f64i16_mm:
3163 ; CHECK: @ %bb.0: @ %entry
3164 ; CHECK-NEXT: vcvt.u32.f64 s4, d0
3165 ; CHECK-NEXT: vmov r0, s4
3166 ; CHECK-NEXT: vcvt.u32.f64 s0, d1
3167 ; CHECK-NEXT: vmov.i32 d17, #0xffff
3168 ; CHECK-NEXT: vmov.32 d16[0], r0
3169 ; CHECK-NEXT: vmov r0, s0
3170 ; CHECK-NEXT: vmov.32 d16[1], r0
3171 ; CHECK-NEXT: vmin.u32 d0, d16, d17
3174 %conv = fptoui <2 x double> %x to <2 x i32>
3175 %spec.store.select = call <2 x i32> @llvm.umin.v2i32(<2 x i32> %conv, <2 x i32> <i32 65535, i32 65535>)
3176 %conv6 = trunc <2 x i32> %spec.store.select to <2 x i16>
3177 ret <2 x i16> %conv6
3180 define <2 x i16> @ustest_f64i16_mm(<2 x double> %x) {
3181 ; CHECK-LABEL: ustest_f64i16_mm:
3182 ; CHECK: @ %bb.0: @ %entry
3183 ; CHECK-NEXT: vcvt.s32.f64 s4, d0
3184 ; CHECK-NEXT: vmov r0, s4
3185 ; CHECK-NEXT: vcvt.s32.f64 s0, d1
3186 ; CHECK-NEXT: vmov.i32 d17, #0xffff
3187 ; CHECK-NEXT: vmov.i32 d18, #0x0
3188 ; CHECK-NEXT: vmov.32 d16[0], r0
3189 ; CHECK-NEXT: vmov r0, s0
3190 ; CHECK-NEXT: vmov.32 d16[1], r0
3191 ; CHECK-NEXT: vmin.s32 d16, d16, d17
3192 ; CHECK-NEXT: vmax.s32 d0, d16, d18
3195 %conv = fptosi <2 x double> %x to <2 x i32>
3196 %spec.store.select = call <2 x i32> @llvm.smin.v2i32(<2 x i32> %conv, <2 x i32> <i32 65535, i32 65535>)
3197 %spec.store.select7 = call <2 x i32> @llvm.smax.v2i32(<2 x i32> %spec.store.select, <2 x i32> zeroinitializer)
3198 %conv6 = trunc <2 x i32> %spec.store.select7 to <2 x i16>
3199 ret <2 x i16> %conv6
3202 define <4 x i16> @stest_f32i16_mm(<4 x float> %x) {
3203 ; CHECK-LABEL: stest_f32i16_mm:
3204 ; CHECK: @ %bb.0: @ %entry
3205 ; CHECK-NEXT: vcvt.s32.f32 q8, q0
3206 ; CHECK-NEXT: vmov.i32 q9, #0x7fff
3207 ; CHECK-NEXT: vmvn.i32 q10, #0x7fff
3208 ; CHECK-NEXT: vmin.s32 q8, q8, q9
3209 ; CHECK-NEXT: vmax.s32 q8, q8, q10
3210 ; CHECK-NEXT: vmovn.i32 d0, q8
3213 %conv = fptosi <4 x float> %x to <4 x i32>
3214 %spec.store.select = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %conv, <4 x i32> <i32 32767, i32 32767, i32 32767, i32 32767>)
3215 %spec.store.select7 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %spec.store.select, <4 x i32> <i32 -32768, i32 -32768, i32 -32768, i32 -32768>)
3216 %conv6 = trunc <4 x i32> %spec.store.select7 to <4 x i16>
3217 ret <4 x i16> %conv6
3220 define <4 x i16> @utest_f32i16_mm(<4 x float> %x) {
3221 ; CHECK-LABEL: utest_f32i16_mm:
3222 ; CHECK: @ %bb.0: @ %entry
3223 ; CHECK-NEXT: vcvt.u32.f32 q8, q0
3224 ; CHECK-NEXT: vmov.i32 q9, #0xffff
3225 ; CHECK-NEXT: vmin.u32 q8, q8, q9
3226 ; CHECK-NEXT: vmovn.i32 d0, q8
3229 %conv = fptoui <4 x float> %x to <4 x i32>
3230 %spec.store.select = call <4 x i32> @llvm.umin.v4i32(<4 x i32> %conv, <4 x i32> <i32 65535, i32 65535, i32 65535, i32 65535>)
3231 %conv6 = trunc <4 x i32> %spec.store.select to <4 x i16>
3232 ret <4 x i16> %conv6
3235 define <4 x i16> @ustest_f32i16_mm(<4 x float> %x) {
3236 ; CHECK-LABEL: ustest_f32i16_mm:
3237 ; CHECK: @ %bb.0: @ %entry
3238 ; CHECK-NEXT: vcvt.s32.f32 q8, q0
3239 ; CHECK-NEXT: vmov.i32 q9, #0xffff
3240 ; CHECK-NEXT: vmov.i32 q10, #0x0
3241 ; CHECK-NEXT: vmin.s32 q8, q8, q9
3242 ; CHECK-NEXT: vmax.s32 q8, q8, q10
3243 ; CHECK-NEXT: vmovn.i32 d0, q8
3246 %conv = fptosi <4 x float> %x to <4 x i32>
3247 %spec.store.select = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %conv, <4 x i32> <i32 65535, i32 65535, i32 65535, i32 65535>)
3248 %spec.store.select7 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %spec.store.select, <4 x i32> zeroinitializer)
3249 %conv6 = trunc <4 x i32> %spec.store.select7 to <4 x i16>
3250 ret <4 x i16> %conv6
3253 define <8 x i16> @stest_f16i16_mm(<8 x half> %x) {
3254 ; CHECK-NEON-LABEL: stest_f16i16_mm:
3255 ; CHECK-NEON: @ %bb.0: @ %entry
3256 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
3257 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
3258 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
3259 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
3260 ; CHECK-NEON-NEXT: vmov r0, s1
3261 ; CHECK-NEON-NEXT: vmov.f32 s16, s7
3262 ; CHECK-NEON-NEXT: vmov.f32 s18, s6
3263 ; CHECK-NEON-NEXT: vmov.f32 s20, s5
3264 ; CHECK-NEON-NEXT: vmov.f32 s22, s4
3265 ; CHECK-NEON-NEXT: vmov.f32 s24, s3
3266 ; CHECK-NEON-NEXT: vmov.f32 s26, s2
3267 ; CHECK-NEON-NEXT: vmov.f32 s28, s0
3268 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3269 ; CHECK-NEON-NEXT: mov r4, r0
3270 ; CHECK-NEON-NEXT: vmov r0, s26
3271 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3272 ; CHECK-NEON-NEXT: mov r5, r0
3273 ; CHECK-NEON-NEXT: vmov r0, s22
3274 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3275 ; CHECK-NEON-NEXT: mov r6, r0
3276 ; CHECK-NEON-NEXT: vmov r0, s24
3277 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3278 ; CHECK-NEON-NEXT: mov r7, r0
3279 ; CHECK-NEON-NEXT: vmov r0, s18
3280 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3281 ; CHECK-NEON-NEXT: vmov s0, r0
3282 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3283 ; CHECK-NEON-NEXT: vmov r0, s0
3284 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
3285 ; CHECK-NEON-NEXT: vmov r0, s16
3286 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3287 ; CHECK-NEON-NEXT: vmov s0, r0
3288 ; CHECK-NEON-NEXT: vmov s22, r7
3289 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3290 ; CHECK-NEON-NEXT: vmov s30, r6
3291 ; CHECK-NEON-NEXT: vmov r0, s0
3292 ; CHECK-NEON-NEXT: vmov.32 d13[1], r0
3293 ; CHECK-NEON-NEXT: vmov r0, s28
3294 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3295 ; CHECK-NEON-NEXT: vmov s0, r0
3296 ; CHECK-NEON-NEXT: vmov r1, s20
3297 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3298 ; CHECK-NEON-NEXT: vmov s2, r5
3299 ; CHECK-NEON-NEXT: vcvt.s32.f32 s20, s2
3300 ; CHECK-NEON-NEXT: vmov r0, s0
3301 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s30
3302 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
3303 ; CHECK-NEON-NEXT: vmov r0, s0
3304 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
3305 ; CHECK-NEON-NEXT: mov r0, r1
3306 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3307 ; CHECK-NEON-NEXT: vmov s0, r0
3308 ; CHECK-NEON-NEXT: vmov r0, s20
3309 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3310 ; CHECK-NEON-NEXT: vmov s2, r4
3311 ; CHECK-NEON-NEXT: vmov.i32 q8, #0x7fff
3312 ; CHECK-NEON-NEXT: vcvt.s32.f32 s2, s2
3313 ; CHECK-NEON-NEXT: vmvn.i32 q9, #0x7fff
3314 ; CHECK-NEON-NEXT: vmov.32 d9[0], r0
3315 ; CHECK-NEON-NEXT: vmov r0, s0
3316 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s22
3317 ; CHECK-NEON-NEXT: vmov.32 d12[1], r0
3318 ; CHECK-NEON-NEXT: vmov r0, s0
3319 ; CHECK-NEON-NEXT: vmin.s32 q10, q6, q8
3320 ; CHECK-NEON-NEXT: vmax.s32 q10, q10, q9
3321 ; CHECK-NEON-NEXT: vmov.32 d9[1], r0
3322 ; CHECK-NEON-NEXT: vmov r0, s2
3323 ; CHECK-NEON-NEXT: vmovn.i32 d1, q10
3324 ; CHECK-NEON-NEXT: vmov.32 d8[1], r0
3325 ; CHECK-NEON-NEXT: vmin.s32 q8, q4, q8
3326 ; CHECK-NEON-NEXT: vmax.s32 q8, q8, q9
3327 ; CHECK-NEON-NEXT: vmovn.i32 d0, q8
3328 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
3329 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
3331 ; CHECK-FP16-LABEL: stest_f16i16_mm:
3332 ; CHECK-FP16: @ %bb.0: @ %entry
3333 ; CHECK-FP16-NEXT: vmovx.f16 s4, s0
3334 ; CHECK-FP16-NEXT: vcvt.s32.f16 s12, s0
3335 ; CHECK-FP16-NEXT: vcvt.s32.f16 s0, s3
3336 ; CHECK-FP16-NEXT: vcvt.s32.f16 s5, s2
3337 ; CHECK-FP16-NEXT: vmov r0, s0
3338 ; CHECK-FP16-NEXT: vcvt.s32.f16 s14, s1
3339 ; CHECK-FP16-NEXT: vmovx.f16 s10, s3
3340 ; CHECK-FP16-NEXT: vmovx.f16 s8, s2
3341 ; CHECK-FP16-NEXT: vcvt.s32.f16 s10, s10
3342 ; CHECK-FP16-NEXT: vcvt.s32.f16 s8, s8
3343 ; CHECK-FP16-NEXT: vmovx.f16 s6, s1
3344 ; CHECK-FP16-NEXT: vcvt.s32.f16 s4, s4
3345 ; CHECK-FP16-NEXT: vcvt.s32.f16 s6, s6
3346 ; CHECK-FP16-NEXT: vmov.i32 q10, #0x7fff
3347 ; CHECK-FP16-NEXT: vmvn.i32 q11, #0x7fff
3348 ; CHECK-FP16-NEXT: vmov.32 d17[0], r0
3349 ; CHECK-FP16-NEXT: vmov r0, s5
3350 ; CHECK-FP16-NEXT: vmov.32 d16[0], r0
3351 ; CHECK-FP16-NEXT: vmov r0, s14
3352 ; CHECK-FP16-NEXT: vmov.32 d19[0], r0
3353 ; CHECK-FP16-NEXT: vmov r0, s12
3354 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
3355 ; CHECK-FP16-NEXT: vmov r0, s10
3356 ; CHECK-FP16-NEXT: vmov.32 d17[1], r0
3357 ; CHECK-FP16-NEXT: vmov r0, s8
3358 ; CHECK-FP16-NEXT: vmov.32 d16[1], r0
3359 ; CHECK-FP16-NEXT: vmov r0, s6
3360 ; CHECK-FP16-NEXT: vmin.s32 q8, q8, q10
3361 ; CHECK-FP16-NEXT: vmax.s32 q8, q8, q11
3362 ; CHECK-FP16-NEXT: vmovn.i32 d1, q8
3363 ; CHECK-FP16-NEXT: vmov.32 d19[1], r0
3364 ; CHECK-FP16-NEXT: vmov r0, s4
3365 ; CHECK-FP16-NEXT: vmov.32 d18[1], r0
3366 ; CHECK-FP16-NEXT: vmin.s32 q9, q9, q10
3367 ; CHECK-FP16-NEXT: vmax.s32 q9, q9, q11
3368 ; CHECK-FP16-NEXT: vmovn.i32 d0, q9
3369 ; CHECK-FP16-NEXT: bx lr
3371 %conv = fptosi <8 x half> %x to <8 x i32>
3372 %spec.store.select = call <8 x i32> @llvm.smin.v8i32(<8 x i32> %conv, <8 x i32> <i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767, i32 32767>)
3373 %spec.store.select7 = call <8 x i32> @llvm.smax.v8i32(<8 x i32> %spec.store.select, <8 x i32> <i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768, i32 -32768>)
3374 %conv6 = trunc <8 x i32> %spec.store.select7 to <8 x i16>
3375 ret <8 x i16> %conv6
3378 define <8 x i16> @utesth_f16i16_mm(<8 x half> %x) {
3379 ; CHECK-NEON-LABEL: utesth_f16i16_mm:
3380 ; CHECK-NEON: @ %bb.0: @ %entry
3381 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
3382 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
3383 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14}
3384 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14}
3385 ; CHECK-NEON-NEXT: vmov r0, s1
3386 ; CHECK-NEON-NEXT: vmov.f32 s16, s7
3387 ; CHECK-NEON-NEXT: vmov.f32 s18, s6
3388 ; CHECK-NEON-NEXT: vmov.f32 s20, s5
3389 ; CHECK-NEON-NEXT: vmov.f32 s22, s4
3390 ; CHECK-NEON-NEXT: vmov.f32 s24, s3
3391 ; CHECK-NEON-NEXT: vmov.f32 s26, s2
3392 ; CHECK-NEON-NEXT: vmov.f32 s28, s0
3393 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3394 ; CHECK-NEON-NEXT: mov r4, r0
3395 ; CHECK-NEON-NEXT: vmov r0, s26
3396 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3397 ; CHECK-NEON-NEXT: mov r5, r0
3398 ; CHECK-NEON-NEXT: vmov r0, s22
3399 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3400 ; CHECK-NEON-NEXT: mov r6, r0
3401 ; CHECK-NEON-NEXT: vmov r0, s24
3402 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3403 ; CHECK-NEON-NEXT: mov r7, r0
3404 ; CHECK-NEON-NEXT: vmov r0, s18
3405 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3406 ; CHECK-NEON-NEXT: vmov s0, r0
3407 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
3408 ; CHECK-NEON-NEXT: vmov r0, s0
3409 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
3410 ; CHECK-NEON-NEXT: vmov r0, s16
3411 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3412 ; CHECK-NEON-NEXT: vmov s0, r0
3413 ; CHECK-NEON-NEXT: vmov s16, r7
3414 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
3415 ; CHECK-NEON-NEXT: vmov s18, r6
3416 ; CHECK-NEON-NEXT: vmov r0, s0
3417 ; CHECK-NEON-NEXT: vmov.32 d13[1], r0
3418 ; CHECK-NEON-NEXT: vmov r0, s28
3419 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3420 ; CHECK-NEON-NEXT: vmov s0, r0
3421 ; CHECK-NEON-NEXT: vmov r1, s20
3422 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
3423 ; CHECK-NEON-NEXT: vmov s2, r5
3424 ; CHECK-NEON-NEXT: vmov r0, s0
3425 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s18
3426 ; CHECK-NEON-NEXT: vcvt.u32.f32 s18, s2
3427 ; CHECK-NEON-NEXT: vmov.32 d10[0], r0
3428 ; CHECK-NEON-NEXT: vmov r0, s0
3429 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
3430 ; CHECK-NEON-NEXT: mov r0, r1
3431 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3432 ; CHECK-NEON-NEXT: vmov s0, r0
3433 ; CHECK-NEON-NEXT: vmov r0, s18
3434 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s0
3435 ; CHECK-NEON-NEXT: vmov s2, r4
3436 ; CHECK-NEON-NEXT: vmov.i32 q8, #0xffff
3437 ; CHECK-NEON-NEXT: vcvt.u32.f32 s2, s2
3438 ; CHECK-NEON-NEXT: vmov.32 d11[0], r0
3439 ; CHECK-NEON-NEXT: vmov r0, s0
3440 ; CHECK-NEON-NEXT: vcvt.u32.f32 s0, s16
3441 ; CHECK-NEON-NEXT: vmov.32 d12[1], r0
3442 ; CHECK-NEON-NEXT: vmov r0, s0
3443 ; CHECK-NEON-NEXT: vmin.u32 q9, q6, q8
3444 ; CHECK-NEON-NEXT: vmov.32 d11[1], r0
3445 ; CHECK-NEON-NEXT: vmov r0, s2
3446 ; CHECK-NEON-NEXT: vmovn.i32 d1, q9
3447 ; CHECK-NEON-NEXT: vmov.32 d10[1], r0
3448 ; CHECK-NEON-NEXT: vmin.u32 q8, q5, q8
3449 ; CHECK-NEON-NEXT: vmovn.i32 d0, q8
3450 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14}
3451 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
3453 ; CHECK-FP16-LABEL: utesth_f16i16_mm:
3454 ; CHECK-FP16: @ %bb.0: @ %entry
3455 ; CHECK-FP16-NEXT: vmovx.f16 s4, s0
3456 ; CHECK-FP16-NEXT: vcvt.u32.f16 s12, s0
3457 ; CHECK-FP16-NEXT: vcvt.u32.f16 s0, s3
3458 ; CHECK-FP16-NEXT: vcvt.u32.f16 s5, s2
3459 ; CHECK-FP16-NEXT: vmov r0, s0
3460 ; CHECK-FP16-NEXT: vcvt.u32.f16 s14, s1
3461 ; CHECK-FP16-NEXT: vmovx.f16 s10, s3
3462 ; CHECK-FP16-NEXT: vmovx.f16 s8, s2
3463 ; CHECK-FP16-NEXT: vcvt.u32.f16 s10, s10
3464 ; CHECK-FP16-NEXT: vcvt.u32.f16 s8, s8
3465 ; CHECK-FP16-NEXT: vmovx.f16 s6, s1
3466 ; CHECK-FP16-NEXT: vcvt.u32.f16 s4, s4
3467 ; CHECK-FP16-NEXT: vcvt.u32.f16 s6, s6
3468 ; CHECK-FP16-NEXT: vmov.i32 q10, #0xffff
3469 ; CHECK-FP16-NEXT: vmov.32 d17[0], r0
3470 ; CHECK-FP16-NEXT: vmov r0, s5
3471 ; CHECK-FP16-NEXT: vmov.32 d16[0], r0
3472 ; CHECK-FP16-NEXT: vmov r0, s14
3473 ; CHECK-FP16-NEXT: vmov.32 d19[0], r0
3474 ; CHECK-FP16-NEXT: vmov r0, s12
3475 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
3476 ; CHECK-FP16-NEXT: vmov r0, s10
3477 ; CHECK-FP16-NEXT: vmov.32 d17[1], r0
3478 ; CHECK-FP16-NEXT: vmov r0, s8
3479 ; CHECK-FP16-NEXT: vmov.32 d16[1], r0
3480 ; CHECK-FP16-NEXT: vmov r0, s6
3481 ; CHECK-FP16-NEXT: vmin.u32 q8, q8, q10
3482 ; CHECK-FP16-NEXT: vmovn.i32 d1, q8
3483 ; CHECK-FP16-NEXT: vmov.32 d19[1], r0
3484 ; CHECK-FP16-NEXT: vmov r0, s4
3485 ; CHECK-FP16-NEXT: vmov.32 d18[1], r0
3486 ; CHECK-FP16-NEXT: vmin.u32 q9, q9, q10
3487 ; CHECK-FP16-NEXT: vmovn.i32 d0, q9
3488 ; CHECK-FP16-NEXT: bx lr
3490 %conv = fptoui <8 x half> %x to <8 x i32>
3491 %spec.store.select = call <8 x i32> @llvm.umin.v8i32(<8 x i32> %conv, <8 x i32> <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>)
3492 %conv6 = trunc <8 x i32> %spec.store.select to <8 x i16>
3493 ret <8 x i16> %conv6
3496 define <8 x i16> @ustest_f16i16_mm(<8 x half> %x) {
3497 ; CHECK-NEON-LABEL: ustest_f16i16_mm:
3498 ; CHECK-NEON: @ %bb.0: @ %entry
3499 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
3500 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
3501 ; CHECK-NEON-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
3502 ; CHECK-NEON-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
3503 ; CHECK-NEON-NEXT: vmov r0, s1
3504 ; CHECK-NEON-NEXT: vmov.f32 s16, s7
3505 ; CHECK-NEON-NEXT: vmov.f32 s18, s6
3506 ; CHECK-NEON-NEXT: vmov.f32 s20, s5
3507 ; CHECK-NEON-NEXT: vmov.f32 s22, s4
3508 ; CHECK-NEON-NEXT: vmov.f32 s24, s3
3509 ; CHECK-NEON-NEXT: vmov.f32 s26, s2
3510 ; CHECK-NEON-NEXT: vmov.f32 s28, s0
3511 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3512 ; CHECK-NEON-NEXT: mov r4, r0
3513 ; CHECK-NEON-NEXT: vmov r0, s26
3514 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3515 ; CHECK-NEON-NEXT: mov r5, r0
3516 ; CHECK-NEON-NEXT: vmov r0, s22
3517 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3518 ; CHECK-NEON-NEXT: mov r6, r0
3519 ; CHECK-NEON-NEXT: vmov r0, s24
3520 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3521 ; CHECK-NEON-NEXT: mov r7, r0
3522 ; CHECK-NEON-NEXT: vmov r0, s18
3523 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3524 ; CHECK-NEON-NEXT: vmov s0, r0
3525 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3526 ; CHECK-NEON-NEXT: vmov r0, s0
3527 ; CHECK-NEON-NEXT: vmov.32 d13[0], r0
3528 ; CHECK-NEON-NEXT: vmov r0, s16
3529 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3530 ; CHECK-NEON-NEXT: vmov s0, r0
3531 ; CHECK-NEON-NEXT: vmov s22, r7
3532 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3533 ; CHECK-NEON-NEXT: vmov s30, r6
3534 ; CHECK-NEON-NEXT: vmov r0, s0
3535 ; CHECK-NEON-NEXT: vmov.32 d13[1], r0
3536 ; CHECK-NEON-NEXT: vmov r0, s28
3537 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3538 ; CHECK-NEON-NEXT: vmov s0, r0
3539 ; CHECK-NEON-NEXT: vmov r1, s20
3540 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3541 ; CHECK-NEON-NEXT: vmov s2, r5
3542 ; CHECK-NEON-NEXT: vcvt.s32.f32 s20, s2
3543 ; CHECK-NEON-NEXT: vmov r0, s0
3544 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s30
3545 ; CHECK-NEON-NEXT: vmov.32 d8[0], r0
3546 ; CHECK-NEON-NEXT: vmov r0, s0
3547 ; CHECK-NEON-NEXT: vmov.32 d12[0], r0
3548 ; CHECK-NEON-NEXT: mov r0, r1
3549 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3550 ; CHECK-NEON-NEXT: vmov s0, r0
3551 ; CHECK-NEON-NEXT: vmov r0, s20
3552 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s0
3553 ; CHECK-NEON-NEXT: vmov s2, r4
3554 ; CHECK-NEON-NEXT: vmov.i32 q8, #0xffff
3555 ; CHECK-NEON-NEXT: vcvt.s32.f32 s2, s2
3556 ; CHECK-NEON-NEXT: vmov.i32 q9, #0x0
3557 ; CHECK-NEON-NEXT: vmov.32 d9[0], r0
3558 ; CHECK-NEON-NEXT: vmov r0, s0
3559 ; CHECK-NEON-NEXT: vcvt.s32.f32 s0, s22
3560 ; CHECK-NEON-NEXT: vmov.32 d12[1], r0
3561 ; CHECK-NEON-NEXT: vmov r0, s0
3562 ; CHECK-NEON-NEXT: vmin.s32 q10, q6, q8
3563 ; CHECK-NEON-NEXT: vmax.s32 q10, q10, q9
3564 ; CHECK-NEON-NEXT: vmov.32 d9[1], r0
3565 ; CHECK-NEON-NEXT: vmov r0, s2
3566 ; CHECK-NEON-NEXT: vmovn.i32 d1, q10
3567 ; CHECK-NEON-NEXT: vmov.32 d8[1], r0
3568 ; CHECK-NEON-NEXT: vmin.s32 q8, q4, q8
3569 ; CHECK-NEON-NEXT: vmax.s32 q8, q8, q9
3570 ; CHECK-NEON-NEXT: vmovn.i32 d0, q8
3571 ; CHECK-NEON-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
3572 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
3574 ; CHECK-FP16-LABEL: ustest_f16i16_mm:
3575 ; CHECK-FP16: @ %bb.0: @ %entry
3576 ; CHECK-FP16-NEXT: vmovx.f16 s4, s0
3577 ; CHECK-FP16-NEXT: vcvt.s32.f16 s12, s0
3578 ; CHECK-FP16-NEXT: vcvt.s32.f16 s0, s3
3579 ; CHECK-FP16-NEXT: vcvt.s32.f16 s5, s2
3580 ; CHECK-FP16-NEXT: vmov r0, s0
3581 ; CHECK-FP16-NEXT: vcvt.s32.f16 s14, s1
3582 ; CHECK-FP16-NEXT: vmovx.f16 s10, s3
3583 ; CHECK-FP16-NEXT: vmovx.f16 s8, s2
3584 ; CHECK-FP16-NEXT: vcvt.s32.f16 s10, s10
3585 ; CHECK-FP16-NEXT: vcvt.s32.f16 s8, s8
3586 ; CHECK-FP16-NEXT: vmovx.f16 s6, s1
3587 ; CHECK-FP16-NEXT: vcvt.s32.f16 s4, s4
3588 ; CHECK-FP16-NEXT: vcvt.s32.f16 s6, s6
3589 ; CHECK-FP16-NEXT: vmov.i32 q10, #0xffff
3590 ; CHECK-FP16-NEXT: vmov.i32 q11, #0x0
3591 ; CHECK-FP16-NEXT: vmov.32 d17[0], r0
3592 ; CHECK-FP16-NEXT: vmov r0, s5
3593 ; CHECK-FP16-NEXT: vmov.32 d16[0], r0
3594 ; CHECK-FP16-NEXT: vmov r0, s14
3595 ; CHECK-FP16-NEXT: vmov.32 d19[0], r0
3596 ; CHECK-FP16-NEXT: vmov r0, s12
3597 ; CHECK-FP16-NEXT: vmov.32 d18[0], r0
3598 ; CHECK-FP16-NEXT: vmov r0, s10
3599 ; CHECK-FP16-NEXT: vmov.32 d17[1], r0
3600 ; CHECK-FP16-NEXT: vmov r0, s8
3601 ; CHECK-FP16-NEXT: vmov.32 d16[1], r0
3602 ; CHECK-FP16-NEXT: vmov r0, s6
3603 ; CHECK-FP16-NEXT: vmin.s32 q8, q8, q10
3604 ; CHECK-FP16-NEXT: vmax.s32 q8, q8, q11
3605 ; CHECK-FP16-NEXT: vmovn.i32 d1, q8
3606 ; CHECK-FP16-NEXT: vmov.32 d19[1], r0
3607 ; CHECK-FP16-NEXT: vmov r0, s4
3608 ; CHECK-FP16-NEXT: vmov.32 d18[1], r0
3609 ; CHECK-FP16-NEXT: vmin.s32 q9, q9, q10
3610 ; CHECK-FP16-NEXT: vmax.s32 q9, q9, q11
3611 ; CHECK-FP16-NEXT: vmovn.i32 d0, q9
3612 ; CHECK-FP16-NEXT: bx lr
3614 %conv = fptosi <8 x half> %x to <8 x i32>
3615 %spec.store.select = call <8 x i32> @llvm.smin.v8i32(<8 x i32> %conv, <8 x i32> <i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535, i32 65535>)
3616 %spec.store.select7 = call <8 x i32> @llvm.smax.v8i32(<8 x i32> %spec.store.select, <8 x i32> zeroinitializer)
3617 %conv6 = trunc <8 x i32> %spec.store.select7 to <8 x i16>
3618 ret <8 x i16> %conv6
3623 define <2 x i64> @stest_f64i64_mm(<2 x double> %x) {
3624 ; CHECK-LABEL: stest_f64i64_mm:
3625 ; CHECK: @ %bb.0: @ %entry
3626 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
3627 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
3628 ; CHECK-NEXT: .vsave {d8, d9}
3629 ; CHECK-NEXT: vpush {d8, d9}
3630 ; CHECK-NEXT: vorr q4, q0, q0
3631 ; CHECK-NEXT: vorr d0, d9, d9
3632 ; CHECK-NEXT: bl __fixdfti
3633 ; CHECK-NEXT: mov r5, r0
3634 ; CHECK-NEXT: mvn r8, #0
3635 ; CHECK-NEXT: subs r0, r0, r8
3636 ; CHECK-NEXT: mvn r6, #-2147483648
3637 ; CHECK-NEXT: sbcs r0, r1, r6
3638 ; CHECK-NEXT: mov r10, r1
3639 ; CHECK-NEXT: sbcs r0, r2, #0
3640 ; CHECK-NEXT: vorr d0, d8, d8
3641 ; CHECK-NEXT: sbcs r0, r3, #0
3642 ; CHECK-NEXT: mov r7, #0
3643 ; CHECK-NEXT: mov r0, #0
3644 ; CHECK-NEXT: mov r9, #0
3645 ; CHECK-NEXT: movwlt r0, #1
3646 ; CHECK-NEXT: cmp r0, #0
3647 ; CHECK-NEXT: moveq r3, r0
3648 ; CHECK-NEXT: movne r0, r2
3649 ; CHECK-NEXT: moveq r10, r6
3650 ; CHECK-NEXT: moveq r5, r8
3651 ; CHECK-NEXT: rsbs r1, r5, #0
3652 ; CHECK-NEXT: rscs r1, r10, #-2147483648
3653 ; CHECK-NEXT: sbcs r0, r8, r0
3654 ; CHECK-NEXT: sbcs r0, r8, r3
3655 ; CHECK-NEXT: movwlt r7, #1
3656 ; CHECK-NEXT: cmp r7, #0
3657 ; CHECK-NEXT: moveq r5, r7
3658 ; CHECK-NEXT: bl __fixdfti
3659 ; CHECK-NEXT: subs r4, r0, r8
3660 ; CHECK-NEXT: vmov.32 d1[0], r5
3661 ; CHECK-NEXT: sbcs r4, r1, r6
3662 ; CHECK-NEXT: sbcs r4, r2, #0
3663 ; CHECK-NEXT: sbcs r4, r3, #0
3664 ; CHECK-NEXT: mov r4, #0
3665 ; CHECK-NEXT: movwlt r4, #1
3666 ; CHECK-NEXT: cmp r4, #0
3667 ; CHECK-NEXT: moveq r3, r4
3668 ; CHECK-NEXT: movne r6, r1
3669 ; CHECK-NEXT: movne r4, r2
3670 ; CHECK-NEXT: moveq r0, r8
3671 ; CHECK-NEXT: rsbs r1, r0, #0
3672 ; CHECK-NEXT: rscs r1, r6, #-2147483648
3673 ; CHECK-NEXT: sbcs r1, r8, r4
3674 ; CHECK-NEXT: sbcs r1, r8, r3
3675 ; CHECK-NEXT: movwlt r9, #1
3676 ; CHECK-NEXT: cmp r9, #0
3677 ; CHECK-NEXT: moveq r0, r9
3678 ; CHECK-NEXT: mov r1, #-2147483648
3679 ; CHECK-NEXT: cmp r7, #0
3680 ; CHECK-NEXT: vmov.32 d0[0], r0
3681 ; CHECK-NEXT: moveq r10, r1
3682 ; CHECK-NEXT: cmp r9, #0
3683 ; CHECK-NEXT: vmov.32 d1[1], r10
3684 ; CHECK-NEXT: moveq r6, r1
3685 ; CHECK-NEXT: vmov.32 d0[1], r6
3686 ; CHECK-NEXT: vpop {d8, d9}
3687 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
3689 %conv = fptosi <2 x double> %x to <2 x i128>
3690 %spec.store.select = call <2 x i128> @llvm.smin.v2i128(<2 x i128> %conv, <2 x i128> <i128 9223372036854775807, i128 9223372036854775807>)
3691 %spec.store.select7 = call <2 x i128> @llvm.smax.v2i128(<2 x i128> %spec.store.select, <2 x i128> <i128 -9223372036854775808, i128 -9223372036854775808>)
3692 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
3693 ret <2 x i64> %conv6
3696 define <2 x i64> @utest_f64i64_mm(<2 x double> %x) {
3697 ; CHECK-LABEL: utest_f64i64_mm:
3698 ; CHECK: @ %bb.0: @ %entry
3699 ; CHECK-NEXT: .save {r4, r5, r6, r7, r11, lr}
3700 ; CHECK-NEXT: push {r4, r5, r6, r7, r11, lr}
3701 ; CHECK-NEXT: .vsave {d8, d9}
3702 ; CHECK-NEXT: vpush {d8, d9}
3703 ; CHECK-NEXT: vorr q4, q0, q0
3704 ; CHECK-NEXT: vorr d0, d9, d9
3705 ; CHECK-NEXT: bl __fixunsdfti
3706 ; CHECK-NEXT: mov r5, r0
3707 ; CHECK-NEXT: subs r0, r2, #1
3708 ; CHECK-NEXT: vorr d0, d8, d8
3709 ; CHECK-NEXT: sbcs r0, r3, #0
3710 ; CHECK-NEXT: mov r7, #0
3711 ; CHECK-NEXT: mov r4, r1
3712 ; CHECK-NEXT: movwlo r7, #1
3713 ; CHECK-NEXT: cmp r7, #0
3714 ; CHECK-NEXT: mov r6, #0
3715 ; CHECK-NEXT: moveq r5, r7
3716 ; CHECK-NEXT: bl __fixunsdfti
3717 ; CHECK-NEXT: subs r2, r2, #1
3718 ; CHECK-NEXT: vmov.32 d1[0], r5
3719 ; CHECK-NEXT: sbcs r2, r3, #0
3720 ; CHECK-NEXT: movwlo r6, #1
3721 ; CHECK-NEXT: cmp r6, #0
3722 ; CHECK-NEXT: moveq r0, r6
3723 ; CHECK-NEXT: cmp r7, #0
3724 ; CHECK-NEXT: movne r7, r4
3725 ; CHECK-NEXT: vmov.32 d0[0], r0
3726 ; CHECK-NEXT: cmp r6, #0
3727 ; CHECK-NEXT: vmov.32 d1[1], r7
3728 ; CHECK-NEXT: movne r6, r1
3729 ; CHECK-NEXT: vmov.32 d0[1], r6
3730 ; CHECK-NEXT: vpop {d8, d9}
3731 ; CHECK-NEXT: pop {r4, r5, r6, r7, r11, pc}
3733 %conv = fptoui <2 x double> %x to <2 x i128>
3734 %spec.store.select = call <2 x i128> @llvm.umin.v2i128(<2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>)
3735 %conv6 = trunc <2 x i128> %spec.store.select to <2 x i64>
3736 ret <2 x i64> %conv6
3739 define <2 x i64> @ustest_f64i64_mm(<2 x double> %x) {
3740 ; CHECK-LABEL: ustest_f64i64_mm:
3741 ; CHECK: @ %bb.0: @ %entry
3742 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
3743 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, lr}
3744 ; CHECK-NEXT: .vsave {d8, d9}
3745 ; CHECK-NEXT: vpush {d8, d9}
3746 ; CHECK-NEXT: vorr q4, q0, q0
3747 ; CHECK-NEXT: bl __fixdfti
3748 ; CHECK-NEXT: mov r6, r0
3749 ; CHECK-NEXT: subs r0, r2, #1
3750 ; CHECK-NEXT: vorr d0, d9, d9
3751 ; CHECK-NEXT: sbcs r0, r3, #0
3752 ; CHECK-NEXT: mov r7, #0
3753 ; CHECK-NEXT: mov r5, r3
3754 ; CHECK-NEXT: movwlt r7, #1
3755 ; CHECK-NEXT: cmp r7, #0
3756 ; CHECK-NEXT: moveq r6, r7
3757 ; CHECK-NEXT: moveq r5, r7
3758 ; CHECK-NEXT: cmp r5, #0
3759 ; CHECK-NEXT: mov r8, r1
3760 ; CHECK-NEXT: mov r4, #0
3761 ; CHECK-NEXT: movwmi r6, #0
3762 ; CHECK-NEXT: bl __fixdfti
3763 ; CHECK-NEXT: subs r2, r2, #1
3764 ; CHECK-NEXT: vmov.32 d0[0], r6
3765 ; CHECK-NEXT: sbcs r2, r3, #0
3766 ; CHECK-NEXT: movwlt r4, #1
3767 ; CHECK-NEXT: cmp r4, #0
3768 ; CHECK-NEXT: moveq r0, r4
3769 ; CHECK-NEXT: moveq r3, r4
3770 ; CHECK-NEXT: cmp r3, #0
3771 ; CHECK-NEXT: movwmi r0, #0
3772 ; CHECK-NEXT: cmp r4, #0
3773 ; CHECK-NEXT: movne r4, r1
3774 ; CHECK-NEXT: cmp r3, #0
3775 ; CHECK-NEXT: vmov.32 d1[0], r0
3776 ; CHECK-NEXT: movwmi r4, #0
3777 ; CHECK-NEXT: cmp r7, #0
3778 ; CHECK-NEXT: movne r7, r8
3779 ; CHECK-NEXT: cmp r5, #0
3780 ; CHECK-NEXT: vmov.32 d1[1], r4
3781 ; CHECK-NEXT: movwmi r7, #0
3782 ; CHECK-NEXT: vmov.32 d0[1], r7
3783 ; CHECK-NEXT: vpop {d8, d9}
3784 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, pc}
3786 %conv = fptosi <2 x double> %x to <2 x i128>
3787 %spec.store.select = call <2 x i128> @llvm.smin.v2i128(<2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>)
3788 %spec.store.select7 = call <2 x i128> @llvm.smax.v2i128(<2 x i128> %spec.store.select, <2 x i128> zeroinitializer)
3789 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
3790 ret <2 x i64> %conv6
3793 define <2 x i64> @stest_f32i64_mm(<2 x float> %x) {
3794 ; CHECK-LABEL: stest_f32i64_mm:
3795 ; CHECK: @ %bb.0: @ %entry
3796 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
3797 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
3798 ; CHECK-NEXT: .vsave {d8}
3799 ; CHECK-NEXT: vpush {d8}
3800 ; CHECK-NEXT: vmov.f64 d8, d0
3801 ; CHECK-NEXT: vmov.f32 s0, s17
3802 ; CHECK-NEXT: bl __fixsfti
3803 ; CHECK-NEXT: mov r5, r0
3804 ; CHECK-NEXT: mvn r8, #0
3805 ; CHECK-NEXT: subs r0, r0, r8
3806 ; CHECK-NEXT: mvn r6, #-2147483648
3807 ; CHECK-NEXT: sbcs r0, r1, r6
3808 ; CHECK-NEXT: vmov.f32 s0, s16
3809 ; CHECK-NEXT: sbcs r0, r2, #0
3810 ; CHECK-NEXT: mov r10, r1
3811 ; CHECK-NEXT: sbcs r0, r3, #0
3812 ; CHECK-NEXT: mov r7, #0
3813 ; CHECK-NEXT: mov r0, #0
3814 ; CHECK-NEXT: mov r9, #0
3815 ; CHECK-NEXT: movwlt r0, #1
3816 ; CHECK-NEXT: cmp r0, #0
3817 ; CHECK-NEXT: moveq r3, r0
3818 ; CHECK-NEXT: movne r0, r2
3819 ; CHECK-NEXT: moveq r10, r6
3820 ; CHECK-NEXT: moveq r5, r8
3821 ; CHECK-NEXT: rsbs r1, r5, #0
3822 ; CHECK-NEXT: rscs r1, r10, #-2147483648
3823 ; CHECK-NEXT: sbcs r0, r8, r0
3824 ; CHECK-NEXT: sbcs r0, r8, r3
3825 ; CHECK-NEXT: movwlt r7, #1
3826 ; CHECK-NEXT: cmp r7, #0
3827 ; CHECK-NEXT: moveq r5, r7
3828 ; CHECK-NEXT: bl __fixsfti
3829 ; CHECK-NEXT: subs r4, r0, r8
3830 ; CHECK-NEXT: vmov.32 d1[0], r5
3831 ; CHECK-NEXT: sbcs r4, r1, r6
3832 ; CHECK-NEXT: sbcs r4, r2, #0
3833 ; CHECK-NEXT: sbcs r4, r3, #0
3834 ; CHECK-NEXT: mov r4, #0
3835 ; CHECK-NEXT: movwlt r4, #1
3836 ; CHECK-NEXT: cmp r4, #0
3837 ; CHECK-NEXT: moveq r3, r4
3838 ; CHECK-NEXT: movne r6, r1
3839 ; CHECK-NEXT: movne r4, r2
3840 ; CHECK-NEXT: moveq r0, r8
3841 ; CHECK-NEXT: rsbs r1, r0, #0
3842 ; CHECK-NEXT: rscs r1, r6, #-2147483648
3843 ; CHECK-NEXT: sbcs r1, r8, r4
3844 ; CHECK-NEXT: sbcs r1, r8, r3
3845 ; CHECK-NEXT: movwlt r9, #1
3846 ; CHECK-NEXT: cmp r9, #0
3847 ; CHECK-NEXT: moveq r0, r9
3848 ; CHECK-NEXT: mov r1, #-2147483648
3849 ; CHECK-NEXT: cmp r7, #0
3850 ; CHECK-NEXT: vmov.32 d0[0], r0
3851 ; CHECK-NEXT: moveq r10, r1
3852 ; CHECK-NEXT: cmp r9, #0
3853 ; CHECK-NEXT: vmov.32 d1[1], r10
3854 ; CHECK-NEXT: moveq r6, r1
3855 ; CHECK-NEXT: vmov.32 d0[1], r6
3856 ; CHECK-NEXT: vpop {d8}
3857 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
3859 %conv = fptosi <2 x float> %x to <2 x i128>
3860 %spec.store.select = call <2 x i128> @llvm.smin.v2i128(<2 x i128> %conv, <2 x i128> <i128 9223372036854775807, i128 9223372036854775807>)
3861 %spec.store.select7 = call <2 x i128> @llvm.smax.v2i128(<2 x i128> %spec.store.select, <2 x i128> <i128 -9223372036854775808, i128 -9223372036854775808>)
3862 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
3863 ret <2 x i64> %conv6
3866 define <2 x i64> @utest_f32i64_mm(<2 x float> %x) {
3867 ; CHECK-LABEL: utest_f32i64_mm:
3868 ; CHECK: @ %bb.0: @ %entry
3869 ; CHECK-NEXT: .save {r4, r5, r6, r7, r11, lr}
3870 ; CHECK-NEXT: push {r4, r5, r6, r7, r11, lr}
3871 ; CHECK-NEXT: .vsave {d8}
3872 ; CHECK-NEXT: vpush {d8}
3873 ; CHECK-NEXT: vmov.f64 d8, d0
3874 ; CHECK-NEXT: vmov.f32 s0, s17
3875 ; CHECK-NEXT: bl __fixunssfti
3876 ; CHECK-NEXT: vmov.f32 s0, s16
3877 ; CHECK-NEXT: mov r5, r0
3878 ; CHECK-NEXT: subs r0, r2, #1
3879 ; CHECK-NEXT: mov r7, #0
3880 ; CHECK-NEXT: sbcs r0, r3, #0
3881 ; CHECK-NEXT: mov r4, r1
3882 ; CHECK-NEXT: movwlo r7, #1
3883 ; CHECK-NEXT: cmp r7, #0
3884 ; CHECK-NEXT: mov r6, #0
3885 ; CHECK-NEXT: moveq r5, r7
3886 ; CHECK-NEXT: bl __fixunssfti
3887 ; CHECK-NEXT: subs r2, r2, #1
3888 ; CHECK-NEXT: vmov.32 d1[0], r5
3889 ; CHECK-NEXT: sbcs r2, r3, #0
3890 ; CHECK-NEXT: movwlo r6, #1
3891 ; CHECK-NEXT: cmp r6, #0
3892 ; CHECK-NEXT: moveq r0, r6
3893 ; CHECK-NEXT: cmp r7, #0
3894 ; CHECK-NEXT: movne r7, r4
3895 ; CHECK-NEXT: vmov.32 d0[0], r0
3896 ; CHECK-NEXT: cmp r6, #0
3897 ; CHECK-NEXT: vmov.32 d1[1], r7
3898 ; CHECK-NEXT: movne r6, r1
3899 ; CHECK-NEXT: vmov.32 d0[1], r6
3900 ; CHECK-NEXT: vpop {d8}
3901 ; CHECK-NEXT: pop {r4, r5, r6, r7, r11, pc}
3903 %conv = fptoui <2 x float> %x to <2 x i128>
3904 %spec.store.select = call <2 x i128> @llvm.umin.v2i128(<2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>)
3905 %conv6 = trunc <2 x i128> %spec.store.select to <2 x i64>
3906 ret <2 x i64> %conv6
3909 define <2 x i64> @ustest_f32i64_mm(<2 x float> %x) {
3910 ; CHECK-LABEL: ustest_f32i64_mm:
3911 ; CHECK: @ %bb.0: @ %entry
3912 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
3913 ; CHECK-NEXT: push {r4, r5, r6, r7, r8, lr}
3914 ; CHECK-NEXT: .vsave {d8}
3915 ; CHECK-NEXT: vpush {d8}
3916 ; CHECK-NEXT: vmov.f64 d8, d0
3917 ; CHECK-NEXT: bl __fixsfti
3918 ; CHECK-NEXT: vmov.f32 s0, s17
3919 ; CHECK-NEXT: mov r6, r0
3920 ; CHECK-NEXT: subs r0, r2, #1
3921 ; CHECK-NEXT: mov r7, #0
3922 ; CHECK-NEXT: sbcs r0, r3, #0
3923 ; CHECK-NEXT: mov r5, r3
3924 ; CHECK-NEXT: movwlt r7, #1
3925 ; CHECK-NEXT: cmp r7, #0
3926 ; CHECK-NEXT: moveq r6, r7
3927 ; CHECK-NEXT: moveq r5, r7
3928 ; CHECK-NEXT: cmp r5, #0
3929 ; CHECK-NEXT: mov r8, r1
3930 ; CHECK-NEXT: mov r4, #0
3931 ; CHECK-NEXT: movwmi r6, #0
3932 ; CHECK-NEXT: bl __fixsfti
3933 ; CHECK-NEXT: subs r2, r2, #1
3934 ; CHECK-NEXT: vmov.32 d0[0], r6
3935 ; CHECK-NEXT: sbcs r2, r3, #0
3936 ; CHECK-NEXT: movwlt r4, #1
3937 ; CHECK-NEXT: cmp r4, #0
3938 ; CHECK-NEXT: moveq r0, r4
3939 ; CHECK-NEXT: moveq r3, r4
3940 ; CHECK-NEXT: cmp r3, #0
3941 ; CHECK-NEXT: movwmi r0, #0
3942 ; CHECK-NEXT: cmp r4, #0
3943 ; CHECK-NEXT: movne r4, r1
3944 ; CHECK-NEXT: cmp r3, #0
3945 ; CHECK-NEXT: vmov.32 d1[0], r0
3946 ; CHECK-NEXT: movwmi r4, #0
3947 ; CHECK-NEXT: cmp r7, #0
3948 ; CHECK-NEXT: movne r7, r8
3949 ; CHECK-NEXT: cmp r5, #0
3950 ; CHECK-NEXT: vmov.32 d1[1], r4
3951 ; CHECK-NEXT: movwmi r7, #0
3952 ; CHECK-NEXT: vmov.32 d0[1], r7
3953 ; CHECK-NEXT: vpop {d8}
3954 ; CHECK-NEXT: pop {r4, r5, r6, r7, r8, pc}
3956 %conv = fptosi <2 x float> %x to <2 x i128>
3957 %spec.store.select = call <2 x i128> @llvm.smin.v2i128(<2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>)
3958 %spec.store.select7 = call <2 x i128> @llvm.smax.v2i128(<2 x i128> %spec.store.select, <2 x i128> zeroinitializer)
3959 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
3960 ret <2 x i64> %conv6
3963 define <2 x i64> @stest_f16i64_mm(<2 x half> %x) {
3964 ; CHECK-NEON-LABEL: stest_f16i64_mm:
3965 ; CHECK-NEON: @ %bb.0: @ %entry
3966 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3967 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3968 ; CHECK-NEON-NEXT: .pad #4
3969 ; CHECK-NEON-NEXT: sub sp, sp, #4
3970 ; CHECK-NEON-NEXT: .vsave {d8}
3971 ; CHECK-NEON-NEXT: vpush {d8}
3972 ; CHECK-NEON-NEXT: vmov r0, s0
3973 ; CHECK-NEON-NEXT: vmov.f32 s16, s1
3974 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3975 ; CHECK-NEON-NEXT: mov r8, r0
3976 ; CHECK-NEON-NEXT: vmov r0, s16
3977 ; CHECK-NEON-NEXT: bl __aeabi_h2f
3978 ; CHECK-NEON-NEXT: vmov s0, r0
3979 ; CHECK-NEON-NEXT: bl __fixsfti
3980 ; CHECK-NEON-NEXT: mov r5, r0
3981 ; CHECK-NEON-NEXT: mvn r9, #0
3982 ; CHECK-NEON-NEXT: subs r0, r0, r9
3983 ; CHECK-NEON-NEXT: mvn r7, #-2147483648
3984 ; CHECK-NEON-NEXT: sbcs r0, r1, r7
3985 ; CHECK-NEON-NEXT: mov r11, r1
3986 ; CHECK-NEON-NEXT: sbcs r0, r2, #0
3987 ; CHECK-NEON-NEXT: vmov s0, r8
3988 ; CHECK-NEON-NEXT: sbcs r0, r3, #0
3989 ; CHECK-NEON-NEXT: mov r6, #0
3990 ; CHECK-NEON-NEXT: mov r0, #0
3991 ; CHECK-NEON-NEXT: mov r10, #0
3992 ; CHECK-NEON-NEXT: movwlt r0, #1
3993 ; CHECK-NEON-NEXT: cmp r0, #0
3994 ; CHECK-NEON-NEXT: moveq r3, r0
3995 ; CHECK-NEON-NEXT: movne r0, r2
3996 ; CHECK-NEON-NEXT: moveq r11, r7
3997 ; CHECK-NEON-NEXT: moveq r5, r9
3998 ; CHECK-NEON-NEXT: rsbs r1, r5, #0
3999 ; CHECK-NEON-NEXT: rscs r1, r11, #-2147483648
4000 ; CHECK-NEON-NEXT: sbcs r0, r9, r0
4001 ; CHECK-NEON-NEXT: sbcs r0, r9, r3
4002 ; CHECK-NEON-NEXT: movwlt r6, #1
4003 ; CHECK-NEON-NEXT: cmp r6, #0
4004 ; CHECK-NEON-NEXT: moveq r5, r6
4005 ; CHECK-NEON-NEXT: bl __fixsfti
4006 ; CHECK-NEON-NEXT: subs r4, r0, r9
4007 ; CHECK-NEON-NEXT: vmov.32 d1[0], r5
4008 ; CHECK-NEON-NEXT: sbcs r4, r1, r7
4009 ; CHECK-NEON-NEXT: sbcs r4, r2, #0
4010 ; CHECK-NEON-NEXT: sbcs r4, r3, #0
4011 ; CHECK-NEON-NEXT: mov r4, #0
4012 ; CHECK-NEON-NEXT: movwlt r4, #1
4013 ; CHECK-NEON-NEXT: cmp r4, #0
4014 ; CHECK-NEON-NEXT: moveq r3, r4
4015 ; CHECK-NEON-NEXT: movne r7, r1
4016 ; CHECK-NEON-NEXT: movne r4, r2
4017 ; CHECK-NEON-NEXT: moveq r0, r9
4018 ; CHECK-NEON-NEXT: rsbs r1, r0, #0
4019 ; CHECK-NEON-NEXT: rscs r1, r7, #-2147483648
4020 ; CHECK-NEON-NEXT: sbcs r1, r9, r4
4021 ; CHECK-NEON-NEXT: sbcs r1, r9, r3
4022 ; CHECK-NEON-NEXT: movwlt r10, #1
4023 ; CHECK-NEON-NEXT: cmp r10, #0
4024 ; CHECK-NEON-NEXT: moveq r0, r10
4025 ; CHECK-NEON-NEXT: mov r1, #-2147483648
4026 ; CHECK-NEON-NEXT: cmp r6, #0
4027 ; CHECK-NEON-NEXT: vmov.32 d0[0], r0
4028 ; CHECK-NEON-NEXT: moveq r11, r1
4029 ; CHECK-NEON-NEXT: cmp r10, #0
4030 ; CHECK-NEON-NEXT: vmov.32 d1[1], r11
4031 ; CHECK-NEON-NEXT: moveq r7, r1
4032 ; CHECK-NEON-NEXT: vmov.32 d0[1], r7
4033 ; CHECK-NEON-NEXT: vpop {d8}
4034 ; CHECK-NEON-NEXT: add sp, sp, #4
4035 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, r11, pc}
4037 ; CHECK-FP16-LABEL: stest_f16i64_mm:
4038 ; CHECK-FP16: @ %bb.0: @ %entry
4039 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
4040 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, r9, r10, lr}
4041 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
4042 ; CHECK-FP16-NEXT: vmov.u16 r7, d0[0]
4043 ; CHECK-FP16-NEXT: vmov s0, r0
4044 ; CHECK-FP16-NEXT: bl __fixhfti
4045 ; CHECK-FP16-NEXT: mov r5, r0
4046 ; CHECK-FP16-NEXT: mvn r8, #0
4047 ; CHECK-FP16-NEXT: subs r0, r0, r8
4048 ; CHECK-FP16-NEXT: mvn r6, #-2147483648
4049 ; CHECK-FP16-NEXT: sbcs r0, r1, r6
4050 ; CHECK-FP16-NEXT: mov r10, r1
4051 ; CHECK-FP16-NEXT: sbcs r0, r2, #0
4052 ; CHECK-FP16-NEXT: vmov s0, r7
4053 ; CHECK-FP16-NEXT: sbcs r0, r3, #0
4054 ; CHECK-FP16-NEXT: mov r7, #0
4055 ; CHECK-FP16-NEXT: mov r0, #0
4056 ; CHECK-FP16-NEXT: mov r9, #0
4057 ; CHECK-FP16-NEXT: movwlt r0, #1
4058 ; CHECK-FP16-NEXT: cmp r0, #0
4059 ; CHECK-FP16-NEXT: moveq r3, r0
4060 ; CHECK-FP16-NEXT: movne r0, r2
4061 ; CHECK-FP16-NEXT: moveq r10, r6
4062 ; CHECK-FP16-NEXT: moveq r5, r8
4063 ; CHECK-FP16-NEXT: rsbs r1, r5, #0
4064 ; CHECK-FP16-NEXT: rscs r1, r10, #-2147483648
4065 ; CHECK-FP16-NEXT: sbcs r0, r8, r0
4066 ; CHECK-FP16-NEXT: sbcs r0, r8, r3
4067 ; CHECK-FP16-NEXT: movwlt r7, #1
4068 ; CHECK-FP16-NEXT: cmp r7, #0
4069 ; CHECK-FP16-NEXT: moveq r5, r7
4070 ; CHECK-FP16-NEXT: bl __fixhfti
4071 ; CHECK-FP16-NEXT: subs r4, r0, r8
4072 ; CHECK-FP16-NEXT: vmov.32 d1[0], r5
4073 ; CHECK-FP16-NEXT: sbcs r4, r1, r6
4074 ; CHECK-FP16-NEXT: sbcs r4, r2, #0
4075 ; CHECK-FP16-NEXT: sbcs r4, r3, #0
4076 ; CHECK-FP16-NEXT: mov r4, #0
4077 ; CHECK-FP16-NEXT: movwlt r4, #1
4078 ; CHECK-FP16-NEXT: cmp r4, #0
4079 ; CHECK-FP16-NEXT: moveq r3, r4
4080 ; CHECK-FP16-NEXT: movne r6, r1
4081 ; CHECK-FP16-NEXT: movne r4, r2
4082 ; CHECK-FP16-NEXT: moveq r0, r8
4083 ; CHECK-FP16-NEXT: rsbs r1, r0, #0
4084 ; CHECK-FP16-NEXT: rscs r1, r6, #-2147483648
4085 ; CHECK-FP16-NEXT: sbcs r1, r8, r4
4086 ; CHECK-FP16-NEXT: sbcs r1, r8, r3
4087 ; CHECK-FP16-NEXT: movwlt r9, #1
4088 ; CHECK-FP16-NEXT: cmp r9, #0
4089 ; CHECK-FP16-NEXT: moveq r0, r9
4090 ; CHECK-FP16-NEXT: mov r1, #-2147483648
4091 ; CHECK-FP16-NEXT: cmp r7, #0
4092 ; CHECK-FP16-NEXT: vmov.32 d0[0], r0
4093 ; CHECK-FP16-NEXT: moveq r10, r1
4094 ; CHECK-FP16-NEXT: cmp r9, #0
4095 ; CHECK-FP16-NEXT: vmov.32 d1[1], r10
4096 ; CHECK-FP16-NEXT: moveq r6, r1
4097 ; CHECK-FP16-NEXT: vmov.32 d0[1], r6
4098 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, r9, r10, pc}
4100 %conv = fptosi <2 x half> %x to <2 x i128>
4101 %spec.store.select = call <2 x i128> @llvm.smin.v2i128(<2 x i128> %conv, <2 x i128> <i128 9223372036854775807, i128 9223372036854775807>)
4102 %spec.store.select7 = call <2 x i128> @llvm.smax.v2i128(<2 x i128> %spec.store.select, <2 x i128> <i128 -9223372036854775808, i128 -9223372036854775808>)
4103 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
4104 ret <2 x i64> %conv6
4107 define <2 x i64> @utesth_f16i64_mm(<2 x half> %x) {
4108 ; CHECK-NEON-LABEL: utesth_f16i64_mm:
4109 ; CHECK-NEON: @ %bb.0: @ %entry
4110 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r11, lr}
4111 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r11, lr}
4112 ; CHECK-NEON-NEXT: .vsave {d8}
4113 ; CHECK-NEON-NEXT: vpush {d8}
4114 ; CHECK-NEON-NEXT: vmov r0, s0
4115 ; CHECK-NEON-NEXT: vmov.f32 s16, s1
4116 ; CHECK-NEON-NEXT: bl __aeabi_h2f
4117 ; CHECK-NEON-NEXT: mov r5, r0
4118 ; CHECK-NEON-NEXT: vmov r0, s16
4119 ; CHECK-NEON-NEXT: bl __aeabi_h2f
4120 ; CHECK-NEON-NEXT: vmov s0, r0
4121 ; CHECK-NEON-NEXT: bl __fixunssfti
4122 ; CHECK-NEON-NEXT: mov r6, r0
4123 ; CHECK-NEON-NEXT: subs r0, r2, #1
4124 ; CHECK-NEON-NEXT: vmov s0, r5
4125 ; CHECK-NEON-NEXT: sbcs r0, r3, #0
4126 ; CHECK-NEON-NEXT: mov r5, #0
4127 ; CHECK-NEON-NEXT: mov r4, r1
4128 ; CHECK-NEON-NEXT: movwlo r5, #1
4129 ; CHECK-NEON-NEXT: cmp r5, #0
4130 ; CHECK-NEON-NEXT: mov r7, #0
4131 ; CHECK-NEON-NEXT: moveq r6, r5
4132 ; CHECK-NEON-NEXT: bl __fixunssfti
4133 ; CHECK-NEON-NEXT: subs r2, r2, #1
4134 ; CHECK-NEON-NEXT: vmov.32 d1[0], r6
4135 ; CHECK-NEON-NEXT: sbcs r2, r3, #0
4136 ; CHECK-NEON-NEXT: movwlo r7, #1
4137 ; CHECK-NEON-NEXT: cmp r7, #0
4138 ; CHECK-NEON-NEXT: moveq r0, r7
4139 ; CHECK-NEON-NEXT: cmp r5, #0
4140 ; CHECK-NEON-NEXT: movne r5, r4
4141 ; CHECK-NEON-NEXT: vmov.32 d0[0], r0
4142 ; CHECK-NEON-NEXT: cmp r7, #0
4143 ; CHECK-NEON-NEXT: vmov.32 d1[1], r5
4144 ; CHECK-NEON-NEXT: movne r7, r1
4145 ; CHECK-NEON-NEXT: vmov.32 d0[1], r7
4146 ; CHECK-NEON-NEXT: vpop {d8}
4147 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r11, pc}
4149 ; CHECK-FP16-LABEL: utesth_f16i64_mm:
4150 ; CHECK-FP16: @ %bb.0: @ %entry
4151 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r11, lr}
4152 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r11, lr}
4153 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[1]
4154 ; CHECK-FP16-NEXT: vmov.u16 r7, d0[0]
4155 ; CHECK-FP16-NEXT: vmov s0, r0
4156 ; CHECK-FP16-NEXT: bl __fixunshfti
4157 ; CHECK-FP16-NEXT: mov r5, r0
4158 ; CHECK-FP16-NEXT: subs r0, r2, #1
4159 ; CHECK-FP16-NEXT: vmov s0, r7
4160 ; CHECK-FP16-NEXT: sbcs r0, r3, #0
4161 ; CHECK-FP16-NEXT: mov r7, #0
4162 ; CHECK-FP16-NEXT: mov r4, r1
4163 ; CHECK-FP16-NEXT: movwlo r7, #1
4164 ; CHECK-FP16-NEXT: cmp r7, #0
4165 ; CHECK-FP16-NEXT: mov r6, #0
4166 ; CHECK-FP16-NEXT: moveq r5, r7
4167 ; CHECK-FP16-NEXT: bl __fixunshfti
4168 ; CHECK-FP16-NEXT: subs r2, r2, #1
4169 ; CHECK-FP16-NEXT: vmov.32 d1[0], r5
4170 ; CHECK-FP16-NEXT: sbcs r2, r3, #0
4171 ; CHECK-FP16-NEXT: movwlo r6, #1
4172 ; CHECK-FP16-NEXT: cmp r6, #0
4173 ; CHECK-FP16-NEXT: moveq r0, r6
4174 ; CHECK-FP16-NEXT: cmp r7, #0
4175 ; CHECK-FP16-NEXT: movne r7, r4
4176 ; CHECK-FP16-NEXT: vmov.32 d0[0], r0
4177 ; CHECK-FP16-NEXT: cmp r6, #0
4178 ; CHECK-FP16-NEXT: vmov.32 d1[1], r7
4179 ; CHECK-FP16-NEXT: movne r6, r1
4180 ; CHECK-FP16-NEXT: vmov.32 d0[1], r6
4181 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r11, pc}
4183 %conv = fptoui <2 x half> %x to <2 x i128>
4184 %spec.store.select = call <2 x i128> @llvm.umin.v2i128(<2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>)
4185 %conv6 = trunc <2 x i128> %spec.store.select to <2 x i64>
4186 ret <2 x i64> %conv6
4189 define <2 x i64> @ustest_f16i64_mm(<2 x half> %x) {
4190 ; CHECK-NEON-LABEL: ustest_f16i64_mm:
4191 ; CHECK-NEON: @ %bb.0: @ %entry
4192 ; CHECK-NEON-NEXT: .save {r4, r5, r6, r7, r8, lr}
4193 ; CHECK-NEON-NEXT: push {r4, r5, r6, r7, r8, lr}
4194 ; CHECK-NEON-NEXT: .vsave {d8}
4195 ; CHECK-NEON-NEXT: vpush {d8}
4196 ; CHECK-NEON-NEXT: vmov r0, s1
4197 ; CHECK-NEON-NEXT: vmov.f32 s16, s0
4198 ; CHECK-NEON-NEXT: bl __aeabi_h2f
4199 ; CHECK-NEON-NEXT: mov r7, r0
4200 ; CHECK-NEON-NEXT: vmov r0, s16
4201 ; CHECK-NEON-NEXT: bl __aeabi_h2f
4202 ; CHECK-NEON-NEXT: vmov s0, r0
4203 ; CHECK-NEON-NEXT: bl __fixsfti
4204 ; CHECK-NEON-NEXT: mov r6, r0
4205 ; CHECK-NEON-NEXT: subs r0, r2, #1
4206 ; CHECK-NEON-NEXT: vmov s0, r7
4207 ; CHECK-NEON-NEXT: sbcs r0, r3, #0
4208 ; CHECK-NEON-NEXT: mov r7, #0
4209 ; CHECK-NEON-NEXT: mov r5, r3
4210 ; CHECK-NEON-NEXT: movwlt r7, #1
4211 ; CHECK-NEON-NEXT: cmp r7, #0
4212 ; CHECK-NEON-NEXT: moveq r6, r7
4213 ; CHECK-NEON-NEXT: moveq r5, r7
4214 ; CHECK-NEON-NEXT: cmp r5, #0
4215 ; CHECK-NEON-NEXT: mov r8, r1
4216 ; CHECK-NEON-NEXT: mov r4, #0
4217 ; CHECK-NEON-NEXT: movwmi r6, #0
4218 ; CHECK-NEON-NEXT: bl __fixsfti
4219 ; CHECK-NEON-NEXT: subs r2, r2, #1
4220 ; CHECK-NEON-NEXT: vmov.32 d0[0], r6
4221 ; CHECK-NEON-NEXT: sbcs r2, r3, #0
4222 ; CHECK-NEON-NEXT: movwlt r4, #1
4223 ; CHECK-NEON-NEXT: cmp r4, #0
4224 ; CHECK-NEON-NEXT: moveq r0, r4
4225 ; CHECK-NEON-NEXT: moveq r3, r4
4226 ; CHECK-NEON-NEXT: cmp r3, #0
4227 ; CHECK-NEON-NEXT: movwmi r0, #0
4228 ; CHECK-NEON-NEXT: cmp r4, #0
4229 ; CHECK-NEON-NEXT: movne r4, r1
4230 ; CHECK-NEON-NEXT: cmp r3, #0
4231 ; CHECK-NEON-NEXT: vmov.32 d1[0], r0
4232 ; CHECK-NEON-NEXT: movwmi r4, #0
4233 ; CHECK-NEON-NEXT: cmp r7, #0
4234 ; CHECK-NEON-NEXT: movne r7, r8
4235 ; CHECK-NEON-NEXT: cmp r5, #0
4236 ; CHECK-NEON-NEXT: vmov.32 d1[1], r4
4237 ; CHECK-NEON-NEXT: movwmi r7, #0
4238 ; CHECK-NEON-NEXT: vmov.32 d0[1], r7
4239 ; CHECK-NEON-NEXT: vpop {d8}
4240 ; CHECK-NEON-NEXT: pop {r4, r5, r6, r7, r8, pc}
4242 ; CHECK-FP16-LABEL: ustest_f16i64_mm:
4243 ; CHECK-FP16: @ %bb.0: @ %entry
4244 ; CHECK-FP16-NEXT: .save {r4, r5, r6, r7, r8, lr}
4245 ; CHECK-FP16-NEXT: push {r4, r5, r6, r7, r8, lr}
4246 ; CHECK-FP16-NEXT: vmov.u16 r0, d0[0]
4247 ; CHECK-FP16-NEXT: vmov.u16 r7, d0[1]
4248 ; CHECK-FP16-NEXT: vmov s0, r0
4249 ; CHECK-FP16-NEXT: bl __fixhfti
4250 ; CHECK-FP16-NEXT: mov r6, r0
4251 ; CHECK-FP16-NEXT: subs r0, r2, #1
4252 ; CHECK-FP16-NEXT: vmov s0, r7
4253 ; CHECK-FP16-NEXT: sbcs r0, r3, #0
4254 ; CHECK-FP16-NEXT: mov r7, #0
4255 ; CHECK-FP16-NEXT: mov r5, r3
4256 ; CHECK-FP16-NEXT: movwlt r7, #1
4257 ; CHECK-FP16-NEXT: cmp r7, #0
4258 ; CHECK-FP16-NEXT: moveq r6, r7
4259 ; CHECK-FP16-NEXT: moveq r5, r7
4260 ; CHECK-FP16-NEXT: cmp r5, #0
4261 ; CHECK-FP16-NEXT: mov r8, r1
4262 ; CHECK-FP16-NEXT: mov r4, #0
4263 ; CHECK-FP16-NEXT: movwmi r6, #0
4264 ; CHECK-FP16-NEXT: bl __fixhfti
4265 ; CHECK-FP16-NEXT: subs r2, r2, #1
4266 ; CHECK-FP16-NEXT: vmov.32 d0[0], r6
4267 ; CHECK-FP16-NEXT: sbcs r2, r3, #0
4268 ; CHECK-FP16-NEXT: movwlt r4, #1
4269 ; CHECK-FP16-NEXT: cmp r4, #0
4270 ; CHECK-FP16-NEXT: moveq r0, r4
4271 ; CHECK-FP16-NEXT: moveq r3, r4
4272 ; CHECK-FP16-NEXT: cmp r3, #0
4273 ; CHECK-FP16-NEXT: movwmi r0, #0
4274 ; CHECK-FP16-NEXT: cmp r4, #0
4275 ; CHECK-FP16-NEXT: movne r4, r1
4276 ; CHECK-FP16-NEXT: cmp r3, #0
4277 ; CHECK-FP16-NEXT: vmov.32 d1[0], r0
4278 ; CHECK-FP16-NEXT: movwmi r4, #0
4279 ; CHECK-FP16-NEXT: cmp r7, #0
4280 ; CHECK-FP16-NEXT: movne r7, r8
4281 ; CHECK-FP16-NEXT: cmp r5, #0
4282 ; CHECK-FP16-NEXT: vmov.32 d1[1], r4
4283 ; CHECK-FP16-NEXT: movwmi r7, #0
4284 ; CHECK-FP16-NEXT: vmov.32 d0[1], r7
4285 ; CHECK-FP16-NEXT: pop {r4, r5, r6, r7, r8, pc}
4287 %conv = fptosi <2 x half> %x to <2 x i128>
4288 %spec.store.select = call <2 x i128> @llvm.smin.v2i128(<2 x i128> %conv, <2 x i128> <i128 18446744073709551616, i128 18446744073709551616>)
4289 %spec.store.select7 = call <2 x i128> @llvm.smax.v2i128(<2 x i128> %spec.store.select, <2 x i128> zeroinitializer)
4290 %conv6 = trunc <2 x i128> %spec.store.select7 to <2 x i64>
4291 ret <2 x i64> %conv6
4294 declare <2 x i32> @llvm.smin.v2i32(<2 x i32>, <2 x i32>)
4295 declare <2 x i32> @llvm.smax.v2i32(<2 x i32>, <2 x i32>)
4296 declare <2 x i32> @llvm.umin.v2i32(<2 x i32>, <2 x i32>)
4297 declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>)
4298 declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>)
4299 declare <4 x i32> @llvm.umin.v4i32(<4 x i32>, <4 x i32>)
4300 declare <8 x i32> @llvm.smin.v8i32(<8 x i32>, <8 x i32>)
4301 declare <8 x i32> @llvm.smax.v8i32(<8 x i32>, <8 x i32>)
4302 declare <8 x i32> @llvm.umin.v8i32(<8 x i32>, <8 x i32>)
4303 declare <2 x i64> @llvm.smin.v2i64(<2 x i64>, <2 x i64>)
4304 declare <2 x i64> @llvm.smax.v2i64(<2 x i64>, <2 x i64>)
4305 declare <2 x i64> @llvm.umin.v2i64(<2 x i64>, <2 x i64>)
4306 declare <4 x i64> @llvm.smin.v4i64(<4 x i64>, <4 x i64>)
4307 declare <4 x i64> @llvm.smax.v4i64(<4 x i64>, <4 x i64>)
4308 declare <4 x i64> @llvm.umin.v4i64(<4 x i64>, <4 x i64>)
4309 declare <2 x i128> @llvm.smin.v2i128(<2 x i128>, <2 x i128>)
4310 declare <2 x i128> @llvm.smax.v2i128(<2 x i128>, <2 x i128>)
4311 declare <2 x i128> @llvm.umin.v2i128(<2 x i128>, <2 x i128>)