1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve,+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-MVE
3 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-MVEFP
6 ; Float to signed 32-bit -- Vector size variation
9 declare <1 x i32> @llvm.fptosi.sat.v1f32.v1i32 (<1 x float>)
10 declare <2 x i32> @llvm.fptosi.sat.v2f32.v2i32 (<2 x float>)
11 declare <3 x i32> @llvm.fptosi.sat.v3f32.v3i32 (<3 x float>)
12 declare <4 x i32> @llvm.fptosi.sat.v4f32.v4i32 (<4 x float>)
13 declare <5 x i32> @llvm.fptosi.sat.v5f32.v5i32 (<5 x float>)
14 declare <6 x i32> @llvm.fptosi.sat.v6f32.v6i32 (<6 x float>)
15 declare <7 x i32> @llvm.fptosi.sat.v7f32.v7i32 (<7 x float>)
16 declare <8 x i32> @llvm.fptosi.sat.v8f32.v8i32 (<8 x float>)
18 define arm_aapcs_vfpcc <1 x i32> @test_signed_v1f32_v1i32(<1 x float> %f) {
19 ; CHECK-LABEL: test_signed_v1f32_v1i32:
21 ; CHECK-NEXT: vcvt.s32.f32 s0, s0
22 ; CHECK-NEXT: vmov r0, s0
24 %x = call <1 x i32> @llvm.fptosi.sat.v1f32.v1i32(<1 x float> %f)
28 define arm_aapcs_vfpcc <2 x i32> @test_signed_v2f32_v2i32(<2 x float> %f) {
29 ; CHECK-LABEL: test_signed_v2f32_v2i32:
31 ; CHECK-NEXT: .save {r4, r5, r7, lr}
32 ; CHECK-NEXT: push {r4, r5, r7, lr}
33 ; CHECK-NEXT: .vsave {d8, d9, d10}
34 ; CHECK-NEXT: vpush {d8, d9, d10}
35 ; CHECK-NEXT: vmov q4, q0
36 ; CHECK-NEXT: vmov r0, s17
37 ; CHECK-NEXT: bl __aeabi_f2lz
38 ; CHECK-NEXT: mov r5, r0
39 ; CHECK-NEXT: vmov r0, s16
40 ; CHECK-NEXT: vldr s18, .LCPI1_0
41 ; CHECK-NEXT: mov r4, r1
42 ; CHECK-NEXT: vldr s20, .LCPI1_1
43 ; CHECK-NEXT: vcmp.f32 s17, s18
44 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
46 ; CHECK-NEXT: movlt.w r5, #-2147483648
47 ; CHECK-NEXT: vcmp.f32 s17, s20
48 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
50 ; CHECK-NEXT: mvngt r5, #-2147483648
51 ; CHECK-NEXT: vcmp.f32 s17, s17
52 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
54 ; CHECK-NEXT: movvs r5, #0
55 ; CHECK-NEXT: bl __aeabi_f2lz
56 ; CHECK-NEXT: vcmp.f32 s16, s18
57 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
58 ; CHECK-NEXT: vcmp.f32 s16, s20
60 ; CHECK-NEXT: movlt.w r0, #-2147483648
61 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
62 ; CHECK-NEXT: vcmp.f32 s16, s16
64 ; CHECK-NEXT: mvngt r0, #-2147483648
65 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
66 ; CHECK-NEXT: vcmp.f32 s17, s18
68 ; CHECK-NEXT: movvs r0, #0
69 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
70 ; CHECK-NEXT: vcmp.f32 s17, s20
72 ; CHECK-NEXT: movlt.w r4, #-1
73 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
74 ; CHECK-NEXT: vcmp.f32 s17, s17
76 ; CHECK-NEXT: movgt r4, #0
77 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
78 ; CHECK-NEXT: vcmp.f32 s16, s18
80 ; CHECK-NEXT: movvs r4, #0
81 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
83 ; CHECK-NEXT: movlt.w r1, #-1
84 ; CHECK-NEXT: vcmp.f32 s16, s20
85 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r5
86 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
88 ; CHECK-NEXT: movgt r1, #0
89 ; CHECK-NEXT: vcmp.f32 s16, s16
90 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
92 ; CHECK-NEXT: movvs r1, #0
93 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r4
94 ; CHECK-NEXT: vpop {d8, d9, d10}
95 ; CHECK-NEXT: pop {r4, r5, r7, pc}
96 ; CHECK-NEXT: .p2align 2
97 ; CHECK-NEXT: @ %bb.1:
98 ; CHECK-NEXT: .LCPI1_0:
99 ; CHECK-NEXT: .long 0xcf000000 @ float -2.14748365E+9
100 ; CHECK-NEXT: .LCPI1_1:
101 ; CHECK-NEXT: .long 0x4effffff @ float 2.14748352E+9
102 %x = call <2 x i32> @llvm.fptosi.sat.v2f32.v2i32(<2 x float> %f)
106 define arm_aapcs_vfpcc <3 x i32> @test_signed_v3f32_v3i32(<3 x float> %f) {
107 ; CHECK-MVE-LABEL: test_signed_v3f32_v3i32:
108 ; CHECK-MVE: @ %bb.0:
109 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
110 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
111 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s3
112 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s1
113 ; CHECK-MVE-NEXT: vmov r0, s2
114 ; CHECK-MVE-NEXT: vmov r1, s0
115 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
116 ; CHECK-MVE-NEXT: vmov r0, s4
117 ; CHECK-MVE-NEXT: vmov r1, s6
118 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r1, r0
119 ; CHECK-MVE-NEXT: bx lr
121 ; CHECK-MVEFP-LABEL: test_signed_v3f32_v3i32:
122 ; CHECK-MVEFP: @ %bb.0:
123 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
124 ; CHECK-MVEFP-NEXT: bx lr
125 %x = call <3 x i32> @llvm.fptosi.sat.v3f32.v3i32(<3 x float> %f)
129 define arm_aapcs_vfpcc <4 x i32> @test_signed_v4f32_v4i32(<4 x float> %f) {
130 ; CHECK-MVE-LABEL: test_signed_v4f32_v4i32:
131 ; CHECK-MVE: @ %bb.0:
132 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
133 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
134 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s3
135 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s1
136 ; CHECK-MVE-NEXT: vmov r0, s2
137 ; CHECK-MVE-NEXT: vmov r1, s0
138 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
139 ; CHECK-MVE-NEXT: vmov r0, s4
140 ; CHECK-MVE-NEXT: vmov r1, s6
141 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r1, r0
142 ; CHECK-MVE-NEXT: bx lr
144 ; CHECK-MVEFP-LABEL: test_signed_v4f32_v4i32:
145 ; CHECK-MVEFP: @ %bb.0:
146 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
147 ; CHECK-MVEFP-NEXT: bx lr
148 %x = call <4 x i32> @llvm.fptosi.sat.v4f32.v4i32(<4 x float> %f)
152 define arm_aapcs_vfpcc <5 x i32> @test_signed_v5f32_v5i32(<5 x float> %f) {
153 ; CHECK-MVE-LABEL: test_signed_v5f32_v5i32:
154 ; CHECK-MVE: @ %bb.0:
155 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
156 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
157 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s3
158 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s1
159 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
160 ; CHECK-MVE-NEXT: vmov r1, s2
161 ; CHECK-MVE-NEXT: vmov r2, s0
162 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r2, r1
163 ; CHECK-MVE-NEXT: vmov r1, s6
164 ; CHECK-MVE-NEXT: vmov r2, s8
165 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r2, r1
166 ; CHECK-MVE-NEXT: vstrw.32 q0, [r0]
167 ; CHECK-MVE-NEXT: vstr s4, [r0, #16]
168 ; CHECK-MVE-NEXT: bx lr
170 ; CHECK-MVEFP-LABEL: test_signed_v5f32_v5i32:
171 ; CHECK-MVEFP: @ %bb.0:
172 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q1, q1
173 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
174 ; CHECK-MVEFP-NEXT: vmov r1, s4
175 ; CHECK-MVEFP-NEXT: str r1, [r0, #16]
176 ; CHECK-MVEFP-NEXT: vstrw.32 q0, [r0]
177 ; CHECK-MVEFP-NEXT: bx lr
178 %x = call <5 x i32> @llvm.fptosi.sat.v5f32.v5i32(<5 x float> %f)
182 define arm_aapcs_vfpcc <6 x i32> @test_signed_v6f32_v6i32(<6 x float> %f) {
183 ; CHECK-MVE-LABEL: test_signed_v6f32_v6i32:
184 ; CHECK-MVE: @ %bb.0:
185 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
186 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
187 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s3
188 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s1
189 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s5
190 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
191 ; CHECK-MVE-NEXT: vmov r1, s2
192 ; CHECK-MVE-NEXT: vmov r2, s0
193 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r2, r1
194 ; CHECK-MVE-NEXT: vmov r1, s8
195 ; CHECK-MVE-NEXT: vmov r2, s10
196 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r2, r1
197 ; CHECK-MVE-NEXT: vstr s6, [r0, #20]
198 ; CHECK-MVE-NEXT: vstrw.32 q0, [r0]
199 ; CHECK-MVE-NEXT: vstr s4, [r0, #16]
200 ; CHECK-MVE-NEXT: bx lr
202 ; CHECK-MVEFP-LABEL: test_signed_v6f32_v6i32:
203 ; CHECK-MVEFP: @ %bb.0:
204 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q1, q1
205 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
206 ; CHECK-MVEFP-NEXT: vmov.f32 s6, s5
207 ; CHECK-MVEFP-NEXT: vmov r2, s4
208 ; CHECK-MVEFP-NEXT: vmov r1, s6
209 ; CHECK-MVEFP-NEXT: strd r2, r1, [r0, #16]
210 ; CHECK-MVEFP-NEXT: vstrw.32 q0, [r0]
211 ; CHECK-MVEFP-NEXT: bx lr
212 %x = call <6 x i32> @llvm.fptosi.sat.v6f32.v6i32(<6 x float> %f)
216 define arm_aapcs_vfpcc <7 x i32> @test_signed_v7f32_v7i32(<7 x float> %f) {
217 ; CHECK-MVE-LABEL: test_signed_v7f32_v7i32:
218 ; CHECK-MVE: @ %bb.0:
219 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
220 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
221 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s3
222 ; CHECK-MVE-NEXT: vcvt.s32.f32 s12, s1
223 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s5
224 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
225 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s6
226 ; CHECK-MVE-NEXT: vmov r1, s2
227 ; CHECK-MVE-NEXT: vmov r2, s0
228 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r2, r1
229 ; CHECK-MVE-NEXT: vmov r1, s10
230 ; CHECK-MVE-NEXT: vmov r2, s12
231 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r2, r1
232 ; CHECK-MVE-NEXT: vstr s8, [r0, #20]
233 ; CHECK-MVE-NEXT: vstr s4, [r0, #16]
234 ; CHECK-MVE-NEXT: vstrw.32 q0, [r0]
235 ; CHECK-MVE-NEXT: vstr s6, [r0, #24]
236 ; CHECK-MVE-NEXT: bx lr
238 ; CHECK-MVEFP-LABEL: test_signed_v7f32_v7i32:
239 ; CHECK-MVEFP: @ %bb.0:
240 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q1, q1
241 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
242 ; CHECK-MVEFP-NEXT: vmov.f32 s10, s5
243 ; CHECK-MVEFP-NEXT: vmov r2, s4
244 ; CHECK-MVEFP-NEXT: vmov r3, s6
245 ; CHECK-MVEFP-NEXT: vmov r1, s10
246 ; CHECK-MVEFP-NEXT: strd r2, r1, [r0, #16]
247 ; CHECK-MVEFP-NEXT: str r3, [r0, #24]
248 ; CHECK-MVEFP-NEXT: vstrw.32 q0, [r0]
249 ; CHECK-MVEFP-NEXT: bx lr
250 %x = call <7 x i32> @llvm.fptosi.sat.v7f32.v7i32(<7 x float> %f)
254 define arm_aapcs_vfpcc <8 x i32> @test_signed_v8f32_v8i32(<8 x float> %f) {
255 ; CHECK-MVE-LABEL: test_signed_v8f32_v8i32:
256 ; CHECK-MVE: @ %bb.0:
257 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
258 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
259 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s3
260 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s1
261 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s6
262 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
263 ; CHECK-MVE-NEXT: vcvt.s32.f32 s12, s7
264 ; CHECK-MVE-NEXT: vcvt.s32.f32 s14, s5
265 ; CHECK-MVE-NEXT: vmov r0, s2
266 ; CHECK-MVE-NEXT: vmov r1, s0
267 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
268 ; CHECK-MVE-NEXT: vmov r0, s8
269 ; CHECK-MVE-NEXT: vmov r1, s10
270 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r1, r0
271 ; CHECK-MVE-NEXT: vmov r0, s6
272 ; CHECK-MVE-NEXT: vmov r1, s4
273 ; CHECK-MVE-NEXT: vmov q1[2], q1[0], r1, r0
274 ; CHECK-MVE-NEXT: vmov r0, s12
275 ; CHECK-MVE-NEXT: vmov r1, s14
276 ; CHECK-MVE-NEXT: vmov q1[3], q1[1], r1, r0
277 ; CHECK-MVE-NEXT: bx lr
279 ; CHECK-MVEFP-LABEL: test_signed_v8f32_v8i32:
280 ; CHECK-MVEFP: @ %bb.0:
281 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
282 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q1, q1
283 ; CHECK-MVEFP-NEXT: bx lr
284 %x = call <8 x i32> @llvm.fptosi.sat.v8f32.v8i32(<8 x float> %f)
289 ; Double to signed 32-bit -- Vector size variation
292 declare <1 x i32> @llvm.fptosi.sat.v1f64.v1i32 (<1 x double>)
293 declare <2 x i32> @llvm.fptosi.sat.v2f64.v2i32 (<2 x double>)
294 declare <3 x i32> @llvm.fptosi.sat.v3f64.v3i32 (<3 x double>)
295 declare <4 x i32> @llvm.fptosi.sat.v4f64.v4i32 (<4 x double>)
296 declare <5 x i32> @llvm.fptosi.sat.v5f64.v5i32 (<5 x double>)
297 declare <6 x i32> @llvm.fptosi.sat.v6f64.v6i32 (<6 x double>)
299 define arm_aapcs_vfpcc <1 x i32> @test_signed_v1f64_v1i32(<1 x double> %f) {
300 ; CHECK-LABEL: test_signed_v1f64_v1i32:
302 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
303 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, lr}
304 ; CHECK-NEXT: vldr d1, .LCPI8_0
305 ; CHECK-NEXT: vmov r5, r4, d0
306 ; CHECK-NEXT: vmov r2, r3, d1
307 ; CHECK-NEXT: mov r0, r5
308 ; CHECK-NEXT: mov r1, r4
309 ; CHECK-NEXT: bl __aeabi_dcmpgt
310 ; CHECK-NEXT: vldr d0, .LCPI8_1
311 ; CHECK-NEXT: mov r8, r0
312 ; CHECK-NEXT: mov r0, r5
313 ; CHECK-NEXT: mov r1, r4
314 ; CHECK-NEXT: vmov r2, r3, d0
315 ; CHECK-NEXT: bl __aeabi_dcmpge
316 ; CHECK-NEXT: mov r7, r0
317 ; CHECK-NEXT: mov r0, r5
318 ; CHECK-NEXT: mov r1, r4
319 ; CHECK-NEXT: bl __aeabi_d2iz
320 ; CHECK-NEXT: mov r6, r0
321 ; CHECK-NEXT: cmp r7, #0
323 ; CHECK-NEXT: moveq.w r6, #-2147483648
324 ; CHECK-NEXT: mov r0, r5
325 ; CHECK-NEXT: mov r1, r4
326 ; CHECK-NEXT: mov r2, r5
327 ; CHECK-NEXT: mov r3, r4
328 ; CHECK-NEXT: cmp.w r8, #0
330 ; CHECK-NEXT: mvnne r6, #-2147483648
331 ; CHECK-NEXT: bl __aeabi_dcmpun
332 ; CHECK-NEXT: cmp r0, #0
334 ; CHECK-NEXT: movne r6, #0
335 ; CHECK-NEXT: mov r0, r6
336 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, pc}
337 ; CHECK-NEXT: .p2align 3
338 ; CHECK-NEXT: @ %bb.1:
339 ; CHECK-NEXT: .LCPI8_0:
340 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
341 ; CHECK-NEXT: .long 1105199103
342 ; CHECK-NEXT: .LCPI8_1:
343 ; CHECK-NEXT: .long 0 @ double -2147483648
344 ; CHECK-NEXT: .long 3252682752
345 %x = call <1 x i32> @llvm.fptosi.sat.v1f64.v1i32(<1 x double> %f)
349 define arm_aapcs_vfpcc <2 x i32> @test_signed_v2f64_v2i32(<2 x double> %f) {
350 ; CHECK-LABEL: test_signed_v2f64_v2i32:
352 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
353 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
354 ; CHECK-NEXT: .pad #4
355 ; CHECK-NEXT: sub sp, #4
356 ; CHECK-NEXT: .vsave {d8, d9}
357 ; CHECK-NEXT: vpush {d8, d9}
358 ; CHECK-NEXT: .pad #24
359 ; CHECK-NEXT: sub sp, #24
360 ; CHECK-NEXT: vmov q4, q0
361 ; CHECK-NEXT: vldr d0, .LCPI9_0
362 ; CHECK-NEXT: vmov r8, r7, d9
363 ; CHECK-NEXT: vmov r2, r3, d0
364 ; CHECK-NEXT: mov r0, r8
365 ; CHECK-NEXT: mov r1, r7
366 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
367 ; CHECK-NEXT: bl __aeabi_dcmpge
368 ; CHECK-NEXT: clz r0, r0
369 ; CHECK-NEXT: vldr d0, .LCPI9_1
370 ; CHECK-NEXT: mov r1, r7
371 ; CHECK-NEXT: lsrs r4, r0, #5
372 ; CHECK-NEXT: mov r0, r8
373 ; CHECK-NEXT: vmov r6, r5, d0
374 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
375 ; CHECK-NEXT: bl __aeabi_d2lz
376 ; CHECK-NEXT: mov r11, r0
377 ; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill
378 ; CHECK-NEXT: mov r0, r8
379 ; CHECK-NEXT: mov r1, r7
380 ; CHECK-NEXT: mov r2, r6
381 ; CHECK-NEXT: mov r3, r5
382 ; CHECK-NEXT: cmp r4, #0
384 ; CHECK-NEXT: movne.w r11, #-2147483648
385 ; CHECK-NEXT: bl __aeabi_dcmpgt
386 ; CHECK-NEXT: cmp r0, #0
388 ; CHECK-NEXT: movne r0, #1
389 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
390 ; CHECK-NEXT: cmp r0, #0
391 ; CHECK-NEXT: mov r0, r8
392 ; CHECK-NEXT: mov r1, r7
393 ; CHECK-NEXT: mov r2, r8
394 ; CHECK-NEXT: mov r3, r7
396 ; CHECK-NEXT: mvnne r11, #-2147483648
397 ; CHECK-NEXT: bl __aeabi_dcmpun
398 ; CHECK-NEXT: vmov r10, r7, d8
399 ; CHECK-NEXT: mov r8, r0
400 ; CHECK-NEXT: cmp r0, #0
401 ; CHECK-NEXT: mov r2, r6
402 ; CHECK-NEXT: mov r3, r5
404 ; CHECK-NEXT: movne.w r8, #1
405 ; CHECK-NEXT: cmp.w r8, #0
407 ; CHECK-NEXT: movne.w r11, #0
408 ; CHECK-NEXT: mov r0, r10
409 ; CHECK-NEXT: mov r1, r7
410 ; CHECK-NEXT: bl __aeabi_dcmpgt
411 ; CHECK-NEXT: mov r6, r0
412 ; CHECK-NEXT: cmp r0, #0
414 ; CHECK-NEXT: movne r6, #1
415 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
416 ; CHECK-NEXT: mov r0, r10
417 ; CHECK-NEXT: mov r1, r7
418 ; CHECK-NEXT: bl __aeabi_dcmpge
419 ; CHECK-NEXT: clz r0, r0
420 ; CHECK-NEXT: mov r1, r7
421 ; CHECK-NEXT: lsr.w r9, r0, #5
422 ; CHECK-NEXT: mov r0, r10
423 ; CHECK-NEXT: bl __aeabi_d2lz
424 ; CHECK-NEXT: mov r5, r0
425 ; CHECK-NEXT: mov r4, r1
426 ; CHECK-NEXT: cmp.w r9, #0
428 ; CHECK-NEXT: movne.w r5, #-2147483648
429 ; CHECK-NEXT: mov r0, r10
430 ; CHECK-NEXT: mov r1, r7
431 ; CHECK-NEXT: mov r2, r10
432 ; CHECK-NEXT: mov r3, r7
433 ; CHECK-NEXT: cmp r6, #0
435 ; CHECK-NEXT: mvnne r5, #-2147483648
436 ; CHECK-NEXT: bl __aeabi_dcmpun
437 ; CHECK-NEXT: cmp r0, #0
439 ; CHECK-NEXT: movne r0, #1
440 ; CHECK-NEXT: cmp r0, #0
442 ; CHECK-NEXT: movne r5, #0
443 ; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload
444 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r11
445 ; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload
446 ; CHECK-NEXT: cmp r1, #0
448 ; CHECK-NEXT: movne.w r2, #-1
449 ; CHECK-NEXT: ldr r1, [sp, #16] @ 4-byte Reload
450 ; CHECK-NEXT: cmp r1, #0
452 ; CHECK-NEXT: movne r2, #0
453 ; CHECK-NEXT: cmp.w r8, #0
455 ; CHECK-NEXT: movne r2, #0
456 ; CHECK-NEXT: cmp.w r9, #0
458 ; CHECK-NEXT: movne.w r4, #-1
459 ; CHECK-NEXT: cmp r6, #0
461 ; CHECK-NEXT: movne r4, #0
462 ; CHECK-NEXT: cmp r0, #0
464 ; CHECK-NEXT: movne r4, #0
465 ; CHECK-NEXT: vmov q0[3], q0[1], r4, r2
466 ; CHECK-NEXT: add sp, #24
467 ; CHECK-NEXT: vpop {d8, d9}
468 ; CHECK-NEXT: add sp, #4
469 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
470 ; CHECK-NEXT: .p2align 3
471 ; CHECK-NEXT: @ %bb.1:
472 ; CHECK-NEXT: .LCPI9_0:
473 ; CHECK-NEXT: .long 0 @ double -2147483648
474 ; CHECK-NEXT: .long 3252682752
475 ; CHECK-NEXT: .LCPI9_1:
476 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
477 ; CHECK-NEXT: .long 1105199103
478 %x = call <2 x i32> @llvm.fptosi.sat.v2f64.v2i32(<2 x double> %f)
482 define arm_aapcs_vfpcc <3 x i32> @test_signed_v3f64_v3i32(<3 x double> %f) {
483 ; CHECK-LABEL: test_signed_v3f64_v3i32:
485 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
486 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
487 ; CHECK-NEXT: .pad #4
488 ; CHECK-NEXT: sub sp, #4
489 ; CHECK-NEXT: .vsave {d8, d9}
490 ; CHECK-NEXT: vpush {d8, d9}
491 ; CHECK-NEXT: .pad #24
492 ; CHECK-NEXT: sub sp, #24
493 ; CHECK-NEXT: vmov.f32 s16, s0
494 ; CHECK-NEXT: vmov.f32 s17, s1
495 ; CHECK-NEXT: vldr d0, .LCPI10_0
496 ; CHECK-NEXT: vmov r4, r6, d1
497 ; CHECK-NEXT: vmov r2, r11, d0
498 ; CHECK-NEXT: vmov.f32 s18, s4
499 ; CHECK-NEXT: vmov.f32 s19, s5
500 ; CHECK-NEXT: str r2, [sp, #20] @ 4-byte Spill
501 ; CHECK-NEXT: mov r0, r4
502 ; CHECK-NEXT: mov r1, r6
503 ; CHECK-NEXT: mov r3, r11
504 ; CHECK-NEXT: str.w r11, [sp, #12] @ 4-byte Spill
505 ; CHECK-NEXT: bl __aeabi_dcmpgt
506 ; CHECK-NEXT: vldr d0, .LCPI10_1
507 ; CHECK-NEXT: mov r1, r6
508 ; CHECK-NEXT: str r0, [sp, #4] @ 4-byte Spill
509 ; CHECK-NEXT: mov r0, r4
510 ; CHECK-NEXT: vmov r2, r8, d0
511 ; CHECK-NEXT: str r2, [sp, #16] @ 4-byte Spill
512 ; CHECK-NEXT: str.w r8, [sp, #8] @ 4-byte Spill
513 ; CHECK-NEXT: mov r3, r8
514 ; CHECK-NEXT: bl __aeabi_dcmpge
515 ; CHECK-NEXT: mov r9, r0
516 ; CHECK-NEXT: mov r0, r4
517 ; CHECK-NEXT: mov r1, r6
518 ; CHECK-NEXT: bl __aeabi_d2lz
519 ; CHECK-NEXT: mov r10, r0
520 ; CHECK-NEXT: cmp.w r9, #0
522 ; CHECK-NEXT: moveq.w r10, #-2147483648
523 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
524 ; CHECK-NEXT: mov r1, r6
525 ; CHECK-NEXT: mov r2, r4
526 ; CHECK-NEXT: cmp r0, #0
527 ; CHECK-NEXT: mov r0, r4
528 ; CHECK-NEXT: mov r3, r6
529 ; CHECK-NEXT: vmov r5, r7, d9
531 ; CHECK-NEXT: mvnne r10, #-2147483648
532 ; CHECK-NEXT: bl __aeabi_dcmpun
533 ; CHECK-NEXT: cmp r0, #0
535 ; CHECK-NEXT: movne.w r10, #0
536 ; CHECK-NEXT: ldr r2, [sp, #20] @ 4-byte Reload
537 ; CHECK-NEXT: mov r0, r5
538 ; CHECK-NEXT: mov r1, r7
539 ; CHECK-NEXT: mov r3, r11
540 ; CHECK-NEXT: bl __aeabi_dcmpgt
541 ; CHECK-NEXT: ldr r2, [sp, #16] @ 4-byte Reload
542 ; CHECK-NEXT: mov r4, r0
543 ; CHECK-NEXT: mov r0, r5
544 ; CHECK-NEXT: mov r1, r7
545 ; CHECK-NEXT: mov r3, r8
546 ; CHECK-NEXT: bl __aeabi_dcmpge
547 ; CHECK-NEXT: mov r11, r0
548 ; CHECK-NEXT: mov r0, r5
549 ; CHECK-NEXT: mov r1, r7
550 ; CHECK-NEXT: bl __aeabi_d2lz
551 ; CHECK-NEXT: mov r6, r0
552 ; CHECK-NEXT: cmp.w r11, #0
554 ; CHECK-NEXT: moveq.w r6, #-2147483648
555 ; CHECK-NEXT: mov r0, r5
556 ; CHECK-NEXT: mov r1, r7
557 ; CHECK-NEXT: mov r2, r5
558 ; CHECK-NEXT: mov r3, r7
559 ; CHECK-NEXT: cmp r4, #0
560 ; CHECK-NEXT: vmov r9, r8, d8
562 ; CHECK-NEXT: mvnne r6, #-2147483648
563 ; CHECK-NEXT: bl __aeabi_dcmpun
564 ; CHECK-NEXT: cmp r0, #0
566 ; CHECK-NEXT: movne r6, #0
567 ; CHECK-NEXT: ldr r2, [sp, #20] @ 4-byte Reload
568 ; CHECK-NEXT: mov r0, r9
569 ; CHECK-NEXT: ldr r3, [sp, #12] @ 4-byte Reload
570 ; CHECK-NEXT: mov r1, r8
571 ; CHECK-NEXT: bl __aeabi_dcmpgt
572 ; CHECK-NEXT: ldr r2, [sp, #16] @ 4-byte Reload
573 ; CHECK-NEXT: mov r4, r0
574 ; CHECK-NEXT: ldr r3, [sp, #8] @ 4-byte Reload
575 ; CHECK-NEXT: mov r0, r9
576 ; CHECK-NEXT: mov r1, r8
577 ; CHECK-NEXT: bl __aeabi_dcmpge
578 ; CHECK-NEXT: mov r5, r0
579 ; CHECK-NEXT: mov r0, r9
580 ; CHECK-NEXT: mov r1, r8
581 ; CHECK-NEXT: bl __aeabi_d2lz
582 ; CHECK-NEXT: mov r7, r0
583 ; CHECK-NEXT: cmp r5, #0
585 ; CHECK-NEXT: moveq.w r7, #-2147483648
586 ; CHECK-NEXT: mov r0, r9
587 ; CHECK-NEXT: mov r1, r8
588 ; CHECK-NEXT: mov r2, r9
589 ; CHECK-NEXT: mov r3, r8
590 ; CHECK-NEXT: cmp r4, #0
592 ; CHECK-NEXT: mvnne r7, #-2147483648
593 ; CHECK-NEXT: bl __aeabi_dcmpun
594 ; CHECK-NEXT: vmov.32 q0[1], r10
595 ; CHECK-NEXT: cmp r0, #0
597 ; CHECK-NEXT: movne r7, #0
598 ; CHECK-NEXT: vmov q0[2], q0[0], r7, r6
599 ; CHECK-NEXT: add sp, #24
600 ; CHECK-NEXT: vpop {d8, d9}
601 ; CHECK-NEXT: add sp, #4
602 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
603 ; CHECK-NEXT: .p2align 3
604 ; CHECK-NEXT: @ %bb.1:
605 ; CHECK-NEXT: .LCPI10_0:
606 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
607 ; CHECK-NEXT: .long 1105199103
608 ; CHECK-NEXT: .LCPI10_1:
609 ; CHECK-NEXT: .long 0 @ double -2147483648
610 ; CHECK-NEXT: .long 3252682752
611 %x = call <3 x i32> @llvm.fptosi.sat.v3f64.v3i32(<3 x double> %f)
615 define arm_aapcs_vfpcc <4 x i32> @test_signed_v4f64_v4i32(<4 x double> %f) {
616 ; CHECK-LABEL: test_signed_v4f64_v4i32:
618 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
619 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
620 ; CHECK-NEXT: .pad #4
621 ; CHECK-NEXT: sub sp, #4
622 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
623 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
624 ; CHECK-NEXT: .pad #32
625 ; CHECK-NEXT: sub sp, #32
626 ; CHECK-NEXT: vmov q4, q0
627 ; CHECK-NEXT: vldr d0, .LCPI11_0
628 ; CHECK-NEXT: vmov q5, q1
629 ; CHECK-NEXT: vmov r5, r6, d10
630 ; CHECK-NEXT: vmov r9, r3, d0
631 ; CHECK-NEXT: str r3, [sp, #24] @ 4-byte Spill
632 ; CHECK-NEXT: mov r0, r5
633 ; CHECK-NEXT: mov r1, r6
634 ; CHECK-NEXT: mov r2, r9
635 ; CHECK-NEXT: bl __aeabi_dcmpgt
636 ; CHECK-NEXT: vldr d0, .LCPI11_1
637 ; CHECK-NEXT: mov r4, r0
638 ; CHECK-NEXT: mov r0, r5
639 ; CHECK-NEXT: mov r1, r6
640 ; CHECK-NEXT: vmov r2, r3, d0
641 ; CHECK-NEXT: str r3, [sp, #20] @ 4-byte Spill
642 ; CHECK-NEXT: str r2, [sp, #28] @ 4-byte Spill
643 ; CHECK-NEXT: bl __aeabi_dcmpge
644 ; CHECK-NEXT: mov r8, r0
645 ; CHECK-NEXT: mov r0, r5
646 ; CHECK-NEXT: mov r1, r6
647 ; CHECK-NEXT: bl __aeabi_d2lz
648 ; CHECK-NEXT: vmov r11, r1, d11
649 ; CHECK-NEXT: cmp.w r8, #0
650 ; CHECK-NEXT: mov r2, r5
651 ; CHECK-NEXT: mov r3, r6
652 ; CHECK-NEXT: vmov r7, r10, d8
653 ; CHECK-NEXT: str r1, [sp, #12] @ 4-byte Spill
655 ; CHECK-NEXT: moveq.w r0, #-2147483648
656 ; CHECK-NEXT: cmp r4, #0
658 ; CHECK-NEXT: mvnne r0, #-2147483648
659 ; CHECK-NEXT: mov r4, r0
660 ; CHECK-NEXT: mov r0, r5
661 ; CHECK-NEXT: mov r1, r6
662 ; CHECK-NEXT: bl __aeabi_dcmpun
663 ; CHECK-NEXT: cmp r0, #0
665 ; CHECK-NEXT: movne r4, #0
666 ; CHECK-NEXT: ldr.w r8, [sp, #24] @ 4-byte Reload
667 ; CHECK-NEXT: mov r0, r7
668 ; CHECK-NEXT: mov r1, r10
669 ; CHECK-NEXT: mov r2, r9
670 ; CHECK-NEXT: str r4, [sp, #16] @ 4-byte Spill
671 ; CHECK-NEXT: mov r3, r8
672 ; CHECK-NEXT: str.w r9, [sp, #8] @ 4-byte Spill
673 ; CHECK-NEXT: bl __aeabi_dcmpgt
674 ; CHECK-NEXT: ldr r4, [sp, #20] @ 4-byte Reload
675 ; CHECK-NEXT: mov r1, r10
676 ; CHECK-NEXT: ldr r2, [sp, #28] @ 4-byte Reload
677 ; CHECK-NEXT: str r0, [sp, #4] @ 4-byte Spill
678 ; CHECK-NEXT: mov r0, r7
679 ; CHECK-NEXT: mov r3, r4
680 ; CHECK-NEXT: bl __aeabi_dcmpge
681 ; CHECK-NEXT: mov r5, r0
682 ; CHECK-NEXT: mov r0, r7
683 ; CHECK-NEXT: mov r1, r10
684 ; CHECK-NEXT: bl __aeabi_d2lz
685 ; CHECK-NEXT: mov r6, r0
686 ; CHECK-NEXT: cmp r5, #0
688 ; CHECK-NEXT: moveq.w r6, #-2147483648
689 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
690 ; CHECK-NEXT: mov r1, r10
691 ; CHECK-NEXT: mov r2, r7
692 ; CHECK-NEXT: cmp r0, #0
693 ; CHECK-NEXT: mov r0, r7
694 ; CHECK-NEXT: mov r3, r10
696 ; CHECK-NEXT: mvnne r6, #-2147483648
697 ; CHECK-NEXT: bl __aeabi_dcmpun
698 ; CHECK-NEXT: cmp r0, #0
700 ; CHECK-NEXT: movne r6, #0
701 ; CHECK-NEXT: ldr r5, [sp, #12] @ 4-byte Reload
702 ; CHECK-NEXT: mov r0, r11
703 ; CHECK-NEXT: mov r2, r9
704 ; CHECK-NEXT: mov r3, r8
705 ; CHECK-NEXT: mov r1, r5
706 ; CHECK-NEXT: bl __aeabi_dcmpgt
707 ; CHECK-NEXT: ldr.w r9, [sp, #28] @ 4-byte Reload
708 ; CHECK-NEXT: mov r10, r0
709 ; CHECK-NEXT: mov r0, r11
710 ; CHECK-NEXT: mov r1, r5
711 ; CHECK-NEXT: mov r3, r4
712 ; CHECK-NEXT: mov r2, r9
713 ; CHECK-NEXT: bl __aeabi_dcmpge
714 ; CHECK-NEXT: mov r4, r0
715 ; CHECK-NEXT: mov r0, r11
716 ; CHECK-NEXT: mov r1, r5
717 ; CHECK-NEXT: bl __aeabi_d2lz
718 ; CHECK-NEXT: mov r8, r0
719 ; CHECK-NEXT: cmp r4, #0
721 ; CHECK-NEXT: moveq.w r8, #-2147483648
722 ; CHECK-NEXT: mov r0, r11
723 ; CHECK-NEXT: mov r1, r5
724 ; CHECK-NEXT: mov r2, r11
725 ; CHECK-NEXT: mov r3, r5
726 ; CHECK-NEXT: cmp.w r10, #0
727 ; CHECK-NEXT: vmov r7, r4, d9
729 ; CHECK-NEXT: mvnne r8, #-2147483648
730 ; CHECK-NEXT: bl __aeabi_dcmpun
731 ; CHECK-NEXT: cmp r0, #0
733 ; CHECK-NEXT: movne.w r8, #0
734 ; CHECK-NEXT: ldr r2, [sp, #8] @ 4-byte Reload
735 ; CHECK-NEXT: mov r0, r7
736 ; CHECK-NEXT: ldr r3, [sp, #24] @ 4-byte Reload
737 ; CHECK-NEXT: mov r1, r4
738 ; CHECK-NEXT: bl __aeabi_dcmpgt
739 ; CHECK-NEXT: ldr r3, [sp, #20] @ 4-byte Reload
740 ; CHECK-NEXT: mov r10, r0
741 ; CHECK-NEXT: mov r0, r7
742 ; CHECK-NEXT: mov r1, r4
743 ; CHECK-NEXT: mov r2, r9
744 ; CHECK-NEXT: bl __aeabi_dcmpge
745 ; CHECK-NEXT: mov r11, r0
746 ; CHECK-NEXT: mov r0, r7
747 ; CHECK-NEXT: mov r1, r4
748 ; CHECK-NEXT: bl __aeabi_d2lz
749 ; CHECK-NEXT: mov r5, r0
750 ; CHECK-NEXT: cmp.w r11, #0
752 ; CHECK-NEXT: moveq.w r5, #-2147483648
753 ; CHECK-NEXT: mov r0, r7
754 ; CHECK-NEXT: mov r1, r4
755 ; CHECK-NEXT: mov r2, r7
756 ; CHECK-NEXT: mov r3, r4
757 ; CHECK-NEXT: cmp.w r10, #0
759 ; CHECK-NEXT: mvnne r5, #-2147483648
760 ; CHECK-NEXT: bl __aeabi_dcmpun
761 ; CHECK-NEXT: cmp r0, #0
763 ; CHECK-NEXT: movne r5, #0
764 ; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload
765 ; CHECK-NEXT: vmov q0[2], q0[0], r6, r0
766 ; CHECK-NEXT: vmov q0[3], q0[1], r5, r8
767 ; CHECK-NEXT: add sp, #32
768 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
769 ; CHECK-NEXT: add sp, #4
770 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
771 ; CHECK-NEXT: .p2align 3
772 ; CHECK-NEXT: @ %bb.1:
773 ; CHECK-NEXT: .LCPI11_0:
774 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
775 ; CHECK-NEXT: .long 1105199103
776 ; CHECK-NEXT: .LCPI11_1:
777 ; CHECK-NEXT: .long 0 @ double -2147483648
778 ; CHECK-NEXT: .long 3252682752
779 %x = call <4 x i32> @llvm.fptosi.sat.v4f64.v4i32(<4 x double> %f)
783 define arm_aapcs_vfpcc <5 x i32> @test_signed_v5f64_v5i32(<5 x double> %f) {
784 ; CHECK-LABEL: test_signed_v5f64_v5i32:
786 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
787 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
788 ; CHECK-NEXT: .pad #4
789 ; CHECK-NEXT: sub sp, #4
790 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
791 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
792 ; CHECK-NEXT: .pad #32
793 ; CHECK-NEXT: sub sp, #32
794 ; CHECK-NEXT: vmov.f32 s16, s0
795 ; CHECK-NEXT: mov r7, r0
796 ; CHECK-NEXT: vmov.f32 s17, s1
797 ; CHECK-NEXT: vldr d0, .LCPI12_0
798 ; CHECK-NEXT: vmov r5, r4, d4
799 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
800 ; CHECK-NEXT: vmov r2, r3, d0
801 ; CHECK-NEXT: vmov.f32 s20, s6
802 ; CHECK-NEXT: vmov.f32 s18, s4
803 ; CHECK-NEXT: vmov.f32 s22, s2
804 ; CHECK-NEXT: vmov.f32 s21, s7
805 ; CHECK-NEXT: vmov.f32 s19, s5
806 ; CHECK-NEXT: vmov.f32 s23, s3
807 ; CHECK-NEXT: mov r0, r5
808 ; CHECK-NEXT: mov r1, r4
809 ; CHECK-NEXT: strd r2, r3, [sp, #20] @ 8-byte Folded Spill
810 ; CHECK-NEXT: bl __aeabi_dcmpgt
811 ; CHECK-NEXT: vldr d0, .LCPI12_1
812 ; CHECK-NEXT: mov r1, r4
813 ; CHECK-NEXT: str r0, [sp, #12] @ 4-byte Spill
814 ; CHECK-NEXT: mov r0, r5
815 ; CHECK-NEXT: vmov r2, r3, d0
816 ; CHECK-NEXT: str r3, [sp, #4] @ 4-byte Spill
817 ; CHECK-NEXT: str r2, [sp, #28] @ 4-byte Spill
818 ; CHECK-NEXT: bl __aeabi_dcmpge
819 ; CHECK-NEXT: mov r10, r0
820 ; CHECK-NEXT: mov r0, r5
821 ; CHECK-NEXT: mov r1, r4
822 ; CHECK-NEXT: bl __aeabi_d2lz
823 ; CHECK-NEXT: mov r11, r0
824 ; CHECK-NEXT: vmov r8, r0, d11
825 ; CHECK-NEXT: cmp.w r10, #0
826 ; CHECK-NEXT: mov r1, r4
827 ; CHECK-NEXT: mov r2, r5
828 ; CHECK-NEXT: mov r3, r4
829 ; CHECK-NEXT: vmov r9, r6, d10
830 ; CHECK-NEXT: str r0, [sp, #8] @ 4-byte Spill
832 ; CHECK-NEXT: moveq.w r11, #-2147483648
833 ; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload
834 ; CHECK-NEXT: cmp r0, #0
835 ; CHECK-NEXT: mov r0, r5
837 ; CHECK-NEXT: mvnne r11, #-2147483648
838 ; CHECK-NEXT: bl __aeabi_dcmpun
839 ; CHECK-NEXT: cmp r0, #0
841 ; CHECK-NEXT: movne.w r11, #0
842 ; CHECK-NEXT: str.w r11, [r7, #16]
843 ; CHECK-NEXT: mov r0, r9
844 ; CHECK-NEXT: ldr.w r10, [sp, #20] @ 4-byte Reload
845 ; CHECK-NEXT: mov r1, r6
846 ; CHECK-NEXT: ldr r7, [sp, #24] @ 4-byte Reload
847 ; CHECK-NEXT: mov r2, r10
848 ; CHECK-NEXT: mov r3, r7
849 ; CHECK-NEXT: bl __aeabi_dcmpgt
850 ; CHECK-NEXT: ldr r4, [sp, #28] @ 4-byte Reload
851 ; CHECK-NEXT: mov r1, r6
852 ; CHECK-NEXT: ldr.w r11, [sp, #4] @ 4-byte Reload
853 ; CHECK-NEXT: str r0, [sp, #12] @ 4-byte Spill
854 ; CHECK-NEXT: mov r0, r9
855 ; CHECK-NEXT: mov r2, r4
856 ; CHECK-NEXT: mov r3, r11
857 ; CHECK-NEXT: bl __aeabi_dcmpge
858 ; CHECK-NEXT: mov r5, r0
859 ; CHECK-NEXT: mov r0, r9
860 ; CHECK-NEXT: mov r1, r6
861 ; CHECK-NEXT: bl __aeabi_d2lz
862 ; CHECK-NEXT: cmp r5, #0
864 ; CHECK-NEXT: moveq.w r0, #-2147483648
865 ; CHECK-NEXT: ldr r1, [sp, #12] @ 4-byte Reload
866 ; CHECK-NEXT: mov r2, r9
867 ; CHECK-NEXT: mov r3, r6
868 ; CHECK-NEXT: cmp r1, #0
870 ; CHECK-NEXT: mvnne r0, #-2147483648
871 ; CHECK-NEXT: mov r5, r0
872 ; CHECK-NEXT: mov r0, r9
873 ; CHECK-NEXT: mov r1, r6
874 ; CHECK-NEXT: bl __aeabi_dcmpun
875 ; CHECK-NEXT: cmp r0, #0
877 ; CHECK-NEXT: movne r5, #0
878 ; CHECK-NEXT: str r5, [sp, #12] @ 4-byte Spill
879 ; CHECK-NEXT: mov r0, r8
880 ; CHECK-NEXT: ldr r5, [sp, #8] @ 4-byte Reload
881 ; CHECK-NEXT: mov r2, r10
882 ; CHECK-NEXT: mov r3, r7
883 ; CHECK-NEXT: mov r1, r5
884 ; CHECK-NEXT: bl __aeabi_dcmpgt
885 ; CHECK-NEXT: mov r9, r0
886 ; CHECK-NEXT: mov r0, r8
887 ; CHECK-NEXT: mov r1, r5
888 ; CHECK-NEXT: mov r2, r4
889 ; CHECK-NEXT: mov r3, r11
890 ; CHECK-NEXT: mov r6, r11
891 ; CHECK-NEXT: bl __aeabi_dcmpge
892 ; CHECK-NEXT: mov r7, r0
893 ; CHECK-NEXT: mov r0, r8
894 ; CHECK-NEXT: mov r1, r5
895 ; CHECK-NEXT: bl __aeabi_d2lz
896 ; CHECK-NEXT: mov r10, r0
897 ; CHECK-NEXT: cmp r7, #0
899 ; CHECK-NEXT: moveq.w r10, #-2147483648
900 ; CHECK-NEXT: mov r0, r8
901 ; CHECK-NEXT: mov r1, r5
902 ; CHECK-NEXT: mov r2, r8
903 ; CHECK-NEXT: mov r3, r5
904 ; CHECK-NEXT: cmp.w r9, #0
905 ; CHECK-NEXT: vmov r11, r4, d9
907 ; CHECK-NEXT: mvnne r10, #-2147483648
908 ; CHECK-NEXT: bl __aeabi_dcmpun
909 ; CHECK-NEXT: cmp r0, #0
911 ; CHECK-NEXT: movne.w r10, #0
912 ; CHECK-NEXT: ldrd r2, r3, [sp, #20] @ 8-byte Folded Reload
913 ; CHECK-NEXT: mov r0, r11
914 ; CHECK-NEXT: mov r1, r4
915 ; CHECK-NEXT: bl __aeabi_dcmpgt
916 ; CHECK-NEXT: ldr r2, [sp, #28] @ 4-byte Reload
917 ; CHECK-NEXT: mov r8, r0
918 ; CHECK-NEXT: mov r0, r11
919 ; CHECK-NEXT: mov r1, r4
920 ; CHECK-NEXT: mov r3, r6
921 ; CHECK-NEXT: bl __aeabi_dcmpge
922 ; CHECK-NEXT: mov r9, r0
923 ; CHECK-NEXT: mov r0, r11
924 ; CHECK-NEXT: mov r1, r4
925 ; CHECK-NEXT: bl __aeabi_d2lz
926 ; CHECK-NEXT: mov r7, r0
927 ; CHECK-NEXT: cmp.w r9, #0
929 ; CHECK-NEXT: moveq.w r7, #-2147483648
930 ; CHECK-NEXT: mov r0, r11
931 ; CHECK-NEXT: mov r1, r4
932 ; CHECK-NEXT: mov r2, r11
933 ; CHECK-NEXT: mov r3, r4
934 ; CHECK-NEXT: cmp.w r8, #0
936 ; CHECK-NEXT: mvnne r7, #-2147483648
937 ; CHECK-NEXT: bl __aeabi_dcmpun
938 ; CHECK-NEXT: vmov r5, r4, d8
939 ; CHECK-NEXT: cmp r0, #0
941 ; CHECK-NEXT: movne r7, #0
942 ; CHECK-NEXT: ldrd r2, r3, [sp, #20] @ 8-byte Folded Reload
943 ; CHECK-NEXT: mov r0, r5
944 ; CHECK-NEXT: mov r1, r4
945 ; CHECK-NEXT: bl __aeabi_dcmpgt
946 ; CHECK-NEXT: ldr r2, [sp, #28] @ 4-byte Reload
947 ; CHECK-NEXT: mov r8, r0
948 ; CHECK-NEXT: mov r0, r5
949 ; CHECK-NEXT: mov r1, r4
950 ; CHECK-NEXT: mov r3, r6
951 ; CHECK-NEXT: bl __aeabi_dcmpge
952 ; CHECK-NEXT: mov r9, r0
953 ; CHECK-NEXT: mov r0, r5
954 ; CHECK-NEXT: mov r1, r4
955 ; CHECK-NEXT: bl __aeabi_d2lz
956 ; CHECK-NEXT: mov r6, r0
957 ; CHECK-NEXT: cmp.w r9, #0
959 ; CHECK-NEXT: moveq.w r6, #-2147483648
960 ; CHECK-NEXT: mov r0, r5
961 ; CHECK-NEXT: mov r1, r4
962 ; CHECK-NEXT: mov r2, r5
963 ; CHECK-NEXT: mov r3, r4
964 ; CHECK-NEXT: cmp.w r8, #0
966 ; CHECK-NEXT: mvnne r6, #-2147483648
967 ; CHECK-NEXT: bl __aeabi_dcmpun
968 ; CHECK-NEXT: cmp r0, #0
970 ; CHECK-NEXT: movne r6, #0
971 ; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload
972 ; CHECK-NEXT: vmov q0[2], q0[0], r6, r7
973 ; CHECK-NEXT: vmov q0[3], q0[1], r10, r0
974 ; CHECK-NEXT: ldr r0, [sp, #16] @ 4-byte Reload
975 ; CHECK-NEXT: vstrw.32 q0, [r0]
976 ; CHECK-NEXT: add sp, #32
977 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
978 ; CHECK-NEXT: add sp, #4
979 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
980 ; CHECK-NEXT: .p2align 3
981 ; CHECK-NEXT: @ %bb.1:
982 ; CHECK-NEXT: .LCPI12_0:
983 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
984 ; CHECK-NEXT: .long 1105199103
985 ; CHECK-NEXT: .LCPI12_1:
986 ; CHECK-NEXT: .long 0 @ double -2147483648
987 ; CHECK-NEXT: .long 3252682752
988 %x = call <5 x i32> @llvm.fptosi.sat.v5f64.v5i32(<5 x double> %f)
992 define arm_aapcs_vfpcc <6 x i32> @test_signed_v6f64_v6i32(<6 x double> %f) {
993 ; CHECK-LABEL: test_signed_v6f64_v6i32:
995 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
996 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
997 ; CHECK-NEXT: .pad #4
998 ; CHECK-NEXT: sub sp, #4
999 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12}
1000 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12}
1001 ; CHECK-NEXT: .pad #40
1002 ; CHECK-NEXT: sub sp, #40
1003 ; CHECK-NEXT: vmov.f32 s16, s0
1004 ; CHECK-NEXT: str r0, [sp, #20] @ 4-byte Spill
1005 ; CHECK-NEXT: vmov.f32 s17, s1
1006 ; CHECK-NEXT: vldr d0, .LCPI13_0
1007 ; CHECK-NEXT: vmov r9, r4, d5
1008 ; CHECK-NEXT: vmov r2, r6, d0
1009 ; CHECK-NEXT: vmov.f32 s22, s8
1010 ; CHECK-NEXT: vmov.f32 s20, s6
1011 ; CHECK-NEXT: vmov.f32 s18, s4
1012 ; CHECK-NEXT: vmov.f32 s24, s2
1013 ; CHECK-NEXT: vmov.f32 s23, s9
1014 ; CHECK-NEXT: vmov.f32 s21, s7
1015 ; CHECK-NEXT: vmov.f32 s19, s5
1016 ; CHECK-NEXT: vmov.f32 s25, s3
1017 ; CHECK-NEXT: str r2, [sp, #24] @ 4-byte Spill
1018 ; CHECK-NEXT: mov r0, r9
1019 ; CHECK-NEXT: mov r1, r4
1020 ; CHECK-NEXT: mov r3, r6
1021 ; CHECK-NEXT: str r6, [sp, #28] @ 4-byte Spill
1022 ; CHECK-NEXT: bl __aeabi_dcmpgt
1023 ; CHECK-NEXT: vldr d0, .LCPI13_1
1024 ; CHECK-NEXT: mov r1, r4
1025 ; CHECK-NEXT: str r0, [sp, #4] @ 4-byte Spill
1026 ; CHECK-NEXT: mov r0, r9
1027 ; CHECK-NEXT: vmov r2, r3, d0
1028 ; CHECK-NEXT: strd r2, r3, [sp, #32] @ 8-byte Folded Spill
1029 ; CHECK-NEXT: bl __aeabi_dcmpge
1030 ; CHECK-NEXT: mov r11, r0
1031 ; CHECK-NEXT: mov r0, r9
1032 ; CHECK-NEXT: mov r1, r4
1033 ; CHECK-NEXT: bl __aeabi_d2lz
1034 ; CHECK-NEXT: mov r10, r0
1035 ; CHECK-NEXT: vmov r8, r0, d10
1036 ; CHECK-NEXT: cmp.w r11, #0
1037 ; CHECK-NEXT: mov r2, r9
1038 ; CHECK-NEXT: mov r3, r4
1039 ; CHECK-NEXT: vmov r7, r5, d11
1040 ; CHECK-NEXT: str r0, [sp, #8] @ 4-byte Spill
1041 ; CHECK-NEXT: vmov r1, r0, d12
1042 ; CHECK-NEXT: strd r1, r0, [sp, #12] @ 8-byte Folded Spill
1044 ; CHECK-NEXT: moveq.w r10, #-2147483648
1045 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
1046 ; CHECK-NEXT: mov r1, r4
1047 ; CHECK-NEXT: cmp r0, #0
1048 ; CHECK-NEXT: mov r0, r9
1050 ; CHECK-NEXT: mvnne r10, #-2147483648
1051 ; CHECK-NEXT: bl __aeabi_dcmpun
1052 ; CHECK-NEXT: cmp r0, #0
1054 ; CHECK-NEXT: movne.w r10, #0
1055 ; CHECK-NEXT: ldr.w r11, [sp, #20] @ 4-byte Reload
1056 ; CHECK-NEXT: mov r0, r7
1057 ; CHECK-NEXT: mov r1, r5
1058 ; CHECK-NEXT: mov r3, r6
1059 ; CHECK-NEXT: str.w r10, [r11, #20]
1060 ; CHECK-NEXT: ldr.w r10, [sp, #24] @ 4-byte Reload
1061 ; CHECK-NEXT: mov r2, r10
1062 ; CHECK-NEXT: bl __aeabi_dcmpgt
1063 ; CHECK-NEXT: ldrd r2, r3, [sp, #32] @ 8-byte Folded Reload
1064 ; CHECK-NEXT: mov r9, r0
1065 ; CHECK-NEXT: mov r0, r7
1066 ; CHECK-NEXT: mov r1, r5
1067 ; CHECK-NEXT: bl __aeabi_dcmpge
1068 ; CHECK-NEXT: mov r4, r0
1069 ; CHECK-NEXT: mov r0, r7
1070 ; CHECK-NEXT: mov r1, r5
1071 ; CHECK-NEXT: bl __aeabi_d2lz
1072 ; CHECK-NEXT: mov r6, r0
1073 ; CHECK-NEXT: cmp r4, #0
1075 ; CHECK-NEXT: moveq.w r6, #-2147483648
1076 ; CHECK-NEXT: mov r0, r7
1077 ; CHECK-NEXT: mov r1, r5
1078 ; CHECK-NEXT: mov r2, r7
1079 ; CHECK-NEXT: mov r3, r5
1080 ; CHECK-NEXT: cmp.w r9, #0
1082 ; CHECK-NEXT: mvnne r6, #-2147483648
1083 ; CHECK-NEXT: bl __aeabi_dcmpun
1084 ; CHECK-NEXT: cmp r0, #0
1086 ; CHECK-NEXT: movne r6, #0
1087 ; CHECK-NEXT: str.w r6, [r11, #16]
1088 ; CHECK-NEXT: mov r0, r8
1089 ; CHECK-NEXT: ldr r4, [sp, #8] @ 4-byte Reload
1090 ; CHECK-NEXT: mov r2, r10
1091 ; CHECK-NEXT: ldr.w r11, [sp, #28] @ 4-byte Reload
1092 ; CHECK-NEXT: mov r1, r4
1093 ; CHECK-NEXT: mov r3, r11
1094 ; CHECK-NEXT: bl __aeabi_dcmpgt
1095 ; CHECK-NEXT: ldr r7, [sp, #32] @ 4-byte Reload
1096 ; CHECK-NEXT: mov r9, r0
1097 ; CHECK-NEXT: ldr r5, [sp, #36] @ 4-byte Reload
1098 ; CHECK-NEXT: mov r0, r8
1099 ; CHECK-NEXT: mov r1, r4
1100 ; CHECK-NEXT: mov r2, r7
1101 ; CHECK-NEXT: mov r3, r5
1102 ; CHECK-NEXT: bl __aeabi_dcmpge
1103 ; CHECK-NEXT: mov r6, r0
1104 ; CHECK-NEXT: mov r0, r8
1105 ; CHECK-NEXT: mov r1, r4
1106 ; CHECK-NEXT: bl __aeabi_d2lz
1107 ; CHECK-NEXT: mov r10, r0
1108 ; CHECK-NEXT: cmp r6, #0
1110 ; CHECK-NEXT: moveq.w r10, #-2147483648
1111 ; CHECK-NEXT: mov r0, r8
1112 ; CHECK-NEXT: mov r1, r4
1113 ; CHECK-NEXT: mov r2, r8
1114 ; CHECK-NEXT: mov r3, r4
1115 ; CHECK-NEXT: cmp.w r9, #0
1117 ; CHECK-NEXT: mvnne r10, #-2147483648
1118 ; CHECK-NEXT: bl __aeabi_dcmpun
1119 ; CHECK-NEXT: cmp r0, #0
1121 ; CHECK-NEXT: movne.w r10, #0
1122 ; CHECK-NEXT: ldr r4, [sp, #12] @ 4-byte Reload
1123 ; CHECK-NEXT: mov r3, r11
1124 ; CHECK-NEXT: ldr r6, [sp, #16] @ 4-byte Reload
1125 ; CHECK-NEXT: ldr r2, [sp, #24] @ 4-byte Reload
1126 ; CHECK-NEXT: mov r0, r4
1127 ; CHECK-NEXT: mov r1, r6
1128 ; CHECK-NEXT: bl __aeabi_dcmpgt
1129 ; CHECK-NEXT: mov r9, r0
1130 ; CHECK-NEXT: mov r0, r4
1131 ; CHECK-NEXT: mov r1, r6
1132 ; CHECK-NEXT: mov r2, r7
1133 ; CHECK-NEXT: mov r3, r5
1134 ; CHECK-NEXT: bl __aeabi_dcmpge
1135 ; CHECK-NEXT: mov r11, r0
1136 ; CHECK-NEXT: mov r0, r4
1137 ; CHECK-NEXT: mov r1, r6
1138 ; CHECK-NEXT: mov r5, r6
1139 ; CHECK-NEXT: bl __aeabi_d2lz
1140 ; CHECK-NEXT: mov r8, r0
1141 ; CHECK-NEXT: cmp.w r11, #0
1143 ; CHECK-NEXT: moveq.w r8, #-2147483648
1144 ; CHECK-NEXT: mov r0, r4
1145 ; CHECK-NEXT: mov r1, r5
1146 ; CHECK-NEXT: mov r2, r4
1147 ; CHECK-NEXT: mov r3, r5
1148 ; CHECK-NEXT: cmp.w r9, #0
1149 ; CHECK-NEXT: vmov r7, r6, d9
1151 ; CHECK-NEXT: mvnne r8, #-2147483648
1152 ; CHECK-NEXT: bl __aeabi_dcmpun
1153 ; CHECK-NEXT: cmp r0, #0
1155 ; CHECK-NEXT: movne.w r8, #0
1156 ; CHECK-NEXT: ldr.w r11, [sp, #24] @ 4-byte Reload
1157 ; CHECK-NEXT: mov r0, r7
1158 ; CHECK-NEXT: ldr r3, [sp, #28] @ 4-byte Reload
1159 ; CHECK-NEXT: mov r1, r6
1160 ; CHECK-NEXT: mov r2, r11
1161 ; CHECK-NEXT: bl __aeabi_dcmpgt
1162 ; CHECK-NEXT: ldrd r2, r3, [sp, #32] @ 8-byte Folded Reload
1163 ; CHECK-NEXT: mov r9, r0
1164 ; CHECK-NEXT: mov r0, r7
1165 ; CHECK-NEXT: mov r1, r6
1166 ; CHECK-NEXT: bl __aeabi_dcmpge
1167 ; CHECK-NEXT: mov r5, r0
1168 ; CHECK-NEXT: mov r0, r7
1169 ; CHECK-NEXT: mov r1, r6
1170 ; CHECK-NEXT: bl __aeabi_d2lz
1171 ; CHECK-NEXT: mov r4, r0
1172 ; CHECK-NEXT: cmp r5, #0
1174 ; CHECK-NEXT: moveq.w r4, #-2147483648
1175 ; CHECK-NEXT: mov r0, r7
1176 ; CHECK-NEXT: mov r1, r6
1177 ; CHECK-NEXT: mov r2, r7
1178 ; CHECK-NEXT: mov r3, r6
1179 ; CHECK-NEXT: cmp.w r9, #0
1181 ; CHECK-NEXT: mvnne r4, #-2147483648
1182 ; CHECK-NEXT: bl __aeabi_dcmpun
1183 ; CHECK-NEXT: vmov r7, r6, d8
1184 ; CHECK-NEXT: cmp r0, #0
1186 ; CHECK-NEXT: movne r4, #0
1187 ; CHECK-NEXT: ldr r3, [sp, #28] @ 4-byte Reload
1188 ; CHECK-NEXT: mov r2, r11
1189 ; CHECK-NEXT: mov r0, r7
1190 ; CHECK-NEXT: mov r1, r6
1191 ; CHECK-NEXT: bl __aeabi_dcmpgt
1192 ; CHECK-NEXT: ldrd r2, r3, [sp, #32] @ 8-byte Folded Reload
1193 ; CHECK-NEXT: mov r9, r0
1194 ; CHECK-NEXT: mov r0, r7
1195 ; CHECK-NEXT: mov r1, r6
1196 ; CHECK-NEXT: bl __aeabi_dcmpge
1197 ; CHECK-NEXT: mov r11, r0
1198 ; CHECK-NEXT: mov r0, r7
1199 ; CHECK-NEXT: mov r1, r6
1200 ; CHECK-NEXT: bl __aeabi_d2lz
1201 ; CHECK-NEXT: mov r5, r0
1202 ; CHECK-NEXT: cmp.w r11, #0
1204 ; CHECK-NEXT: moveq.w r5, #-2147483648
1205 ; CHECK-NEXT: mov r0, r7
1206 ; CHECK-NEXT: mov r1, r6
1207 ; CHECK-NEXT: mov r2, r7
1208 ; CHECK-NEXT: mov r3, r6
1209 ; CHECK-NEXT: cmp.w r9, #0
1211 ; CHECK-NEXT: mvnne r5, #-2147483648
1212 ; CHECK-NEXT: bl __aeabi_dcmpun
1213 ; CHECK-NEXT: cmp r0, #0
1215 ; CHECK-NEXT: movne r5, #0
1216 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r4
1217 ; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload
1218 ; CHECK-NEXT: vmov q0[3], q0[1], r8, r10
1219 ; CHECK-NEXT: vstrw.32 q0, [r0]
1220 ; CHECK-NEXT: add sp, #40
1221 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12}
1222 ; CHECK-NEXT: add sp, #4
1223 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
1224 ; CHECK-NEXT: .p2align 3
1225 ; CHECK-NEXT: @ %bb.1:
1226 ; CHECK-NEXT: .LCPI13_0:
1227 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
1228 ; CHECK-NEXT: .long 1105199103
1229 ; CHECK-NEXT: .LCPI13_1:
1230 ; CHECK-NEXT: .long 0 @ double -2147483648
1231 ; CHECK-NEXT: .long 3252682752
1232 %x = call <6 x i32> @llvm.fptosi.sat.v6f64.v6i32(<6 x double> %f)
1237 ; FP16 to signed 32-bit -- Vector size variation
1240 declare <1 x i32> @llvm.fptosi.sat.v1f16.v1i32 (<1 x half>)
1241 declare <2 x i32> @llvm.fptosi.sat.v2f16.v2i32 (<2 x half>)
1242 declare <3 x i32> @llvm.fptosi.sat.v3f16.v3i32 (<3 x half>)
1243 declare <4 x i32> @llvm.fptosi.sat.v4f16.v4i32 (<4 x half>)
1244 declare <5 x i32> @llvm.fptosi.sat.v5f16.v5i32 (<5 x half>)
1245 declare <6 x i32> @llvm.fptosi.sat.v6f16.v6i32 (<6 x half>)
1246 declare <7 x i32> @llvm.fptosi.sat.v7f16.v7i32 (<7 x half>)
1247 declare <8 x i32> @llvm.fptosi.sat.v8f16.v8i32 (<8 x half>)
1249 define arm_aapcs_vfpcc <1 x i32> @test_signed_v1f16_v1i32(<1 x half> %f) {
1250 ; CHECK-LABEL: test_signed_v1f16_v1i32:
1252 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
1253 ; CHECK-NEXT: vmov r0, s0
1255 %x = call <1 x i32> @llvm.fptosi.sat.v1f16.v1i32(<1 x half> %f)
1259 define arm_aapcs_vfpcc <2 x i32> @test_signed_v2f16_v2i32(<2 x half> %f) {
1260 ; CHECK-LABEL: test_signed_v2f16_v2i32:
1262 ; CHECK-NEXT: .save {r4, r5, r7, lr}
1263 ; CHECK-NEXT: push {r4, r5, r7, lr}
1264 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
1265 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
1266 ; CHECK-NEXT: vmov q4, q0
1267 ; CHECK-NEXT: vcvtt.f32.f16 s18, s16
1268 ; CHECK-NEXT: vmov r0, s18
1269 ; CHECK-NEXT: bl __aeabi_f2lz
1270 ; CHECK-NEXT: vcvtb.f32.f16 s16, s16
1271 ; CHECK-NEXT: mov r5, r0
1272 ; CHECK-NEXT: vmov r0, s16
1273 ; CHECK-NEXT: vldr s20, .LCPI15_0
1274 ; CHECK-NEXT: vldr s22, .LCPI15_1
1275 ; CHECK-NEXT: mov r4, r1
1276 ; CHECK-NEXT: vcmp.f32 s18, s20
1277 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1279 ; CHECK-NEXT: movlt.w r5, #-2147483648
1280 ; CHECK-NEXT: vcmp.f32 s18, s22
1281 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1283 ; CHECK-NEXT: mvngt r5, #-2147483648
1284 ; CHECK-NEXT: vcmp.f32 s18, s18
1285 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1287 ; CHECK-NEXT: movvs r5, #0
1288 ; CHECK-NEXT: bl __aeabi_f2lz
1289 ; CHECK-NEXT: vcmp.f32 s16, s20
1290 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1291 ; CHECK-NEXT: vcmp.f32 s16, s22
1293 ; CHECK-NEXT: movlt.w r0, #-2147483648
1294 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1295 ; CHECK-NEXT: vcmp.f32 s16, s16
1297 ; CHECK-NEXT: mvngt r0, #-2147483648
1298 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1299 ; CHECK-NEXT: vcmp.f32 s18, s20
1301 ; CHECK-NEXT: movvs r0, #0
1302 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1303 ; CHECK-NEXT: vcmp.f32 s18, s22
1305 ; CHECK-NEXT: movlt.w r4, #-1
1306 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1307 ; CHECK-NEXT: vcmp.f32 s18, s18
1309 ; CHECK-NEXT: movgt r4, #0
1310 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1311 ; CHECK-NEXT: vcmp.f32 s16, s20
1313 ; CHECK-NEXT: movvs r4, #0
1314 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1316 ; CHECK-NEXT: movlt.w r1, #-1
1317 ; CHECK-NEXT: vcmp.f32 s16, s22
1318 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r5
1319 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1321 ; CHECK-NEXT: movgt r1, #0
1322 ; CHECK-NEXT: vcmp.f32 s16, s16
1323 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1325 ; CHECK-NEXT: movvs r1, #0
1326 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r4
1327 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
1328 ; CHECK-NEXT: pop {r4, r5, r7, pc}
1329 ; CHECK-NEXT: .p2align 2
1330 ; CHECK-NEXT: @ %bb.1:
1331 ; CHECK-NEXT: .LCPI15_0:
1332 ; CHECK-NEXT: .long 0xcf000000 @ float -2.14748365E+9
1333 ; CHECK-NEXT: .LCPI15_1:
1334 ; CHECK-NEXT: .long 0x4effffff @ float 2.14748352E+9
1335 %x = call <2 x i32> @llvm.fptosi.sat.v2f16.v2i32(<2 x half> %f)
1339 define arm_aapcs_vfpcc <3 x i32> @test_signed_v3f16_v3i32(<3 x half> %f) {
1340 ; CHECK-LABEL: test_signed_v3f16_v3i32:
1342 ; CHECK-NEXT: vcvt.s32.f16 s6, s0
1343 ; CHECK-NEXT: vcvt.s32.f16 s0, s1
1344 ; CHECK-NEXT: vcvt.s32.f16 s4, s2
1345 ; CHECK-NEXT: vmov r0, s0
1346 ; CHECK-NEXT: vmov.32 q0[1], r0
1347 ; CHECK-NEXT: vmov r0, s4
1348 ; CHECK-NEXT: vmov r1, s6
1349 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
1351 %x = call <3 x i32> @llvm.fptosi.sat.v3f16.v3i32(<3 x half> %f)
1355 define arm_aapcs_vfpcc <4 x i32> @test_signed_v4f16_v4i32(<4 x half> %f) {
1356 ; CHECK-LABEL: test_signed_v4f16_v4i32:
1358 ; CHECK-NEXT: vmovx.f16 s2, s1
1359 ; CHECK-NEXT: vcvt.s32.f16 s4, s2
1360 ; CHECK-NEXT: vmovx.f16 s2, s0
1361 ; CHECK-NEXT: vcvt.s32.f16 s6, s2
1362 ; CHECK-NEXT: vcvt.s32.f16 s2, s1
1363 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
1364 ; CHECK-NEXT: vmov r0, s2
1365 ; CHECK-NEXT: vmov r1, s0
1366 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
1367 ; CHECK-NEXT: vmov r0, s4
1368 ; CHECK-NEXT: vmov r1, s6
1369 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
1371 %x = call <4 x i32> @llvm.fptosi.sat.v4f16.v4i32(<4 x half> %f)
1375 define arm_aapcs_vfpcc <5 x i32> @test_signed_v5f16_v5i32(<5 x half> %f) {
1376 ; CHECK-LABEL: test_signed_v5f16_v5i32:
1378 ; CHECK-NEXT: vmovx.f16 s6, s0
1379 ; CHECK-NEXT: vmovx.f16 s4, s1
1380 ; CHECK-NEXT: vcvt.s32.f16 s8, s1
1381 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
1382 ; CHECK-NEXT: vcvt.s32.f16 s4, s4
1383 ; CHECK-NEXT: vcvt.s32.f16 s6, s6
1384 ; CHECK-NEXT: vmov r1, s8
1385 ; CHECK-NEXT: vcvt.s32.f16 s2, s2
1386 ; CHECK-NEXT: vmov r2, s0
1387 ; CHECK-NEXT: vmov q2[2], q2[0], r2, r1
1388 ; CHECK-NEXT: vmov r1, s4
1389 ; CHECK-NEXT: vmov r2, s6
1390 ; CHECK-NEXT: vmov q2[3], q2[1], r2, r1
1391 ; CHECK-NEXT: vmov r1, s2
1392 ; CHECK-NEXT: str r1, [r0, #16]
1393 ; CHECK-NEXT: vstrw.32 q2, [r0]
1395 %x = call <5 x i32> @llvm.fptosi.sat.v5f16.v5i32(<5 x half> %f)
1399 define arm_aapcs_vfpcc <6 x i32> @test_signed_v6f16_v6i32(<6 x half> %f) {
1400 ; CHECK-LABEL: test_signed_v6f16_v6i32:
1402 ; CHECK-NEXT: vmovx.f16 s8, s0
1403 ; CHECK-NEXT: vmovx.f16 s6, s1
1404 ; CHECK-NEXT: vcvt.s32.f16 s10, s1
1405 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
1406 ; CHECK-NEXT: vcvt.s32.f16 s4, s2
1407 ; CHECK-NEXT: vmovx.f16 s2, s2
1408 ; CHECK-NEXT: vcvt.s32.f16 s6, s6
1409 ; CHECK-NEXT: vcvt.s32.f16 s8, s8
1410 ; CHECK-NEXT: vmov r1, s10
1411 ; CHECK-NEXT: vcvt.s32.f16 s2, s2
1412 ; CHECK-NEXT: vmov r2, s0
1413 ; CHECK-NEXT: vmov q3[2], q3[0], r2, r1
1414 ; CHECK-NEXT: vmov r1, s6
1415 ; CHECK-NEXT: vmov r2, s8
1416 ; CHECK-NEXT: vmov q3[3], q3[1], r2, r1
1417 ; CHECK-NEXT: vmov r1, s2
1418 ; CHECK-NEXT: vmov r2, s4
1419 ; CHECK-NEXT: strd r2, r1, [r0, #16]
1420 ; CHECK-NEXT: vstrw.32 q3, [r0]
1422 %x = call <6 x i32> @llvm.fptosi.sat.v6f16.v6i32(<6 x half> %f)
1426 define arm_aapcs_vfpcc <7 x i32> @test_signed_v7f16_v7i32(<7 x half> %f) {
1427 ; CHECK-LABEL: test_signed_v7f16_v7i32:
1429 ; CHECK-NEXT: vmovx.f16 s10, s0
1430 ; CHECK-NEXT: vmovx.f16 s8, s1
1431 ; CHECK-NEXT: vcvt.s32.f16 s12, s1
1432 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
1433 ; CHECK-NEXT: vcvt.s32.f16 s4, s2
1434 ; CHECK-NEXT: vmovx.f16 s2, s2
1435 ; CHECK-NEXT: vcvt.s32.f16 s8, s8
1436 ; CHECK-NEXT: vcvt.s32.f16 s10, s10
1437 ; CHECK-NEXT: vmov r1, s12
1438 ; CHECK-NEXT: vcvt.s32.f16 s2, s2
1439 ; CHECK-NEXT: vmov r2, s0
1440 ; CHECK-NEXT: vcvt.s32.f16 s6, s3
1441 ; CHECK-NEXT: vmov q3[2], q3[0], r2, r1
1442 ; CHECK-NEXT: vmov r1, s8
1443 ; CHECK-NEXT: vmov r2, s10
1444 ; CHECK-NEXT: vmov q3[3], q3[1], r2, r1
1445 ; CHECK-NEXT: vmov r1, s2
1446 ; CHECK-NEXT: vmov r2, s4
1447 ; CHECK-NEXT: vmov r3, s6
1448 ; CHECK-NEXT: strd r2, r1, [r0, #16]
1449 ; CHECK-NEXT: str r3, [r0, #24]
1450 ; CHECK-NEXT: vstrw.32 q3, [r0]
1452 %x = call <7 x i32> @llvm.fptosi.sat.v7f16.v7i32(<7 x half> %f)
1456 define arm_aapcs_vfpcc <8 x i32> @test_signed_v8f16_v8i32(<8 x half> %f) {
1457 ; CHECK-LABEL: test_signed_v8f16_v8i32:
1459 ; CHECK-NEXT: vmovx.f16 s4, s3
1460 ; CHECK-NEXT: vmovx.f16 s6, s0
1461 ; CHECK-NEXT: vcvt.s32.f16 s8, s4
1462 ; CHECK-NEXT: vmovx.f16 s4, s2
1463 ; CHECK-NEXT: vcvt.s32.f16 s10, s4
1464 ; CHECK-NEXT: vmovx.f16 s4, s1
1465 ; CHECK-NEXT: vcvt.s32.f16 s14, s2
1466 ; CHECK-NEXT: vcvt.s32.f16 s2, s1
1467 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
1468 ; CHECK-NEXT: vcvt.s32.f16 s4, s4
1469 ; CHECK-NEXT: vcvt.s32.f16 s6, s6
1470 ; CHECK-NEXT: vmov r0, s2
1471 ; CHECK-NEXT: vmov r1, s0
1472 ; CHECK-NEXT: vcvt.s32.f16 s12, s3
1473 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
1474 ; CHECK-NEXT: vmov r0, s4
1475 ; CHECK-NEXT: vmov r1, s6
1476 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
1477 ; CHECK-NEXT: vmov r0, s12
1478 ; CHECK-NEXT: vmov r1, s14
1479 ; CHECK-NEXT: vmov q1[2], q1[0], r1, r0
1480 ; CHECK-NEXT: vmov r0, s8
1481 ; CHECK-NEXT: vmov r1, s10
1482 ; CHECK-NEXT: vmov q1[3], q1[1], r1, r0
1484 %x = call <8 x i32> @llvm.fptosi.sat.v8f16.v8i32(<8 x half> %f)
1489 ; 2-Vector float to signed integer -- result size variation
1492 declare <4 x i1> @llvm.fptosi.sat.v4f32.v4i1 (<4 x float>)
1493 declare <4 x i8> @llvm.fptosi.sat.v4f32.v4i8 (<4 x float>)
1494 declare <4 x i13> @llvm.fptosi.sat.v4f32.v4i13 (<4 x float>)
1495 declare <4 x i16> @llvm.fptosi.sat.v4f32.v4i16 (<4 x float>)
1496 declare <4 x i19> @llvm.fptosi.sat.v4f32.v4i19 (<4 x float>)
1497 declare <4 x i50> @llvm.fptosi.sat.v4f32.v4i50 (<4 x float>)
1498 declare <4 x i64> @llvm.fptosi.sat.v4f32.v4i64 (<4 x float>)
1499 declare <4 x i100> @llvm.fptosi.sat.v4f32.v4i100(<4 x float>)
1500 declare <4 x i128> @llvm.fptosi.sat.v4f32.v4i128(<4 x float>)
1502 define arm_aapcs_vfpcc <4 x i1> @test_signed_v4f32_v4i1(<4 x float> %f) {
1503 ; CHECK-LABEL: test_signed_v4f32_v4i1:
1505 ; CHECK-NEXT: vmov.f32 s4, #-1.000000e+00
1506 ; CHECK-NEXT: vldr s6, .LCPI22_0
1507 ; CHECK-NEXT: vmaxnm.f32 s12, s0, s4
1508 ; CHECK-NEXT: vmaxnm.f32 s8, s3, s4
1509 ; CHECK-NEXT: vminnm.f32 s12, s12, s6
1510 ; CHECK-NEXT: vmaxnm.f32 s10, s2, s4
1511 ; CHECK-NEXT: vcvt.s32.f32 s12, s12
1512 ; CHECK-NEXT: vmaxnm.f32 s4, s1, s4
1513 ; CHECK-NEXT: vminnm.f32 s4, s4, s6
1514 ; CHECK-NEXT: vminnm.f32 s10, s10, s6
1515 ; CHECK-NEXT: vcvt.s32.f32 s4, s4
1516 ; CHECK-NEXT: movs r1, #0
1517 ; CHECK-NEXT: vcmp.f32 s0, s0
1518 ; CHECK-NEXT: vminnm.f32 s8, s8, s6
1519 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1520 ; CHECK-NEXT: vcvt.s32.f32 s10, s10
1521 ; CHECK-NEXT: vcmp.f32 s1, s1
1522 ; CHECK-NEXT: vcvt.s32.f32 s8, s8
1523 ; CHECK-NEXT: vmov r2, s12
1525 ; CHECK-NEXT: movvs r2, #0
1526 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1527 ; CHECK-NEXT: and r2, r2, #1
1528 ; CHECK-NEXT: vcmp.f32 s2, s2
1529 ; CHECK-NEXT: rsb.w r2, r2, #0
1530 ; CHECK-NEXT: bfi r1, r2, #0, #1
1531 ; CHECK-NEXT: vmov r2, s4
1533 ; CHECK-NEXT: movvs r2, #0
1534 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1535 ; CHECK-NEXT: and r2, r2, #1
1536 ; CHECK-NEXT: vcmp.f32 s3, s3
1537 ; CHECK-NEXT: rsb.w r2, r2, #0
1538 ; CHECK-NEXT: bfi r1, r2, #1, #1
1539 ; CHECK-NEXT: vmov r2, s10
1541 ; CHECK-NEXT: movvs r2, #0
1542 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1543 ; CHECK-NEXT: and r2, r2, #1
1544 ; CHECK-NEXT: rsb.w r2, r2, #0
1545 ; CHECK-NEXT: bfi r1, r2, #2, #1
1546 ; CHECK-NEXT: vmov r2, s8
1548 ; CHECK-NEXT: movvs r2, #0
1549 ; CHECK-NEXT: and r2, r2, #1
1550 ; CHECK-NEXT: rsbs r2, r2, #0
1551 ; CHECK-NEXT: bfi r1, r2, #3, #1
1552 ; CHECK-NEXT: strb r1, [r0]
1554 ; CHECK-NEXT: .p2align 2
1555 ; CHECK-NEXT: @ %bb.1:
1556 ; CHECK-NEXT: .LCPI22_0:
1557 ; CHECK-NEXT: .long 0x00000000 @ float 0
1558 %x = call <4 x i1> @llvm.fptosi.sat.v4f32.v4i1(<4 x float> %f)
1562 define arm_aapcs_vfpcc <4 x i8> @test_signed_v4f32_v4i8(<4 x float> %f) {
1563 ; CHECK-MVE-LABEL: test_signed_v4f32_v4i8:
1564 ; CHECK-MVE: @ %bb.0:
1565 ; CHECK-MVE-NEXT: vldr s4, .LCPI23_0
1566 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
1567 ; CHECK-MVE-NEXT: vldr s6, .LCPI23_1
1568 ; CHECK-MVE-NEXT: vmaxnm.f32 s12, s2, s4
1569 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s0, s4
1570 ; CHECK-MVE-NEXT: vminnm.f32 s12, s12, s6
1571 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s1, s4
1572 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
1573 ; CHECK-MVE-NEXT: vmaxnm.f32 s4, s3, s4
1574 ; CHECK-MVE-NEXT: vcvt.s32.f32 s12, s12
1575 ; CHECK-MVE-NEXT: vminnm.f32 s8, s8, s6
1576 ; CHECK-MVE-NEXT: vminnm.f32 s4, s4, s6
1577 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
1578 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s8
1579 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1580 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
1581 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
1582 ; CHECK-MVE-NEXT: vmov r0, s12
1583 ; CHECK-MVE-NEXT: it vs
1584 ; CHECK-MVE-NEXT: movvs r0, #0
1585 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1586 ; CHECK-MVE-NEXT: vmov r1, s10
1587 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
1588 ; CHECK-MVE-NEXT: it vs
1589 ; CHECK-MVE-NEXT: movvs r1, #0
1590 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1591 ; CHECK-MVE-NEXT: vmov r2, s4
1592 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
1593 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
1594 ; CHECK-MVE-NEXT: vmov r3, s8
1595 ; CHECK-MVE-NEXT: it vs
1596 ; CHECK-MVE-NEXT: movvs r2, #0
1597 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1598 ; CHECK-MVE-NEXT: it vs
1599 ; CHECK-MVE-NEXT: movvs r3, #0
1600 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r3, r2
1601 ; CHECK-MVE-NEXT: bx lr
1602 ; CHECK-MVE-NEXT: .p2align 2
1603 ; CHECK-MVE-NEXT: @ %bb.1:
1604 ; CHECK-MVE-NEXT: .LCPI23_0:
1605 ; CHECK-MVE-NEXT: .long 0xc3000000 @ float -128
1606 ; CHECK-MVE-NEXT: .LCPI23_1:
1607 ; CHECK-MVE-NEXT: .long 0x42fe0000 @ float 127
1609 ; CHECK-MVEFP-LABEL: test_signed_v4f32_v4i8:
1610 ; CHECK-MVEFP: @ %bb.0:
1611 ; CHECK-MVEFP-NEXT: vmov.i32 q1, #0x7f
1612 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
1613 ; CHECK-MVEFP-NEXT: vmvn.i32 q2, #0x7f
1614 ; CHECK-MVEFP-NEXT: vmin.s32 q0, q0, q1
1615 ; CHECK-MVEFP-NEXT: vmax.s32 q0, q0, q2
1616 ; CHECK-MVEFP-NEXT: bx lr
1617 %x = call <4 x i8> @llvm.fptosi.sat.v4f32.v4i8(<4 x float> %f)
1621 define arm_aapcs_vfpcc <4 x i13> @test_signed_v4f32_v4i13(<4 x float> %f) {
1622 ; CHECK-MVE-LABEL: test_signed_v4f32_v4i13:
1623 ; CHECK-MVE: @ %bb.0:
1624 ; CHECK-MVE-NEXT: vldr s4, .LCPI24_0
1625 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
1626 ; CHECK-MVE-NEXT: vldr s6, .LCPI24_1
1627 ; CHECK-MVE-NEXT: vmaxnm.f32 s12, s2, s4
1628 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s0, s4
1629 ; CHECK-MVE-NEXT: vminnm.f32 s12, s12, s6
1630 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s1, s4
1631 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
1632 ; CHECK-MVE-NEXT: vmaxnm.f32 s4, s3, s4
1633 ; CHECK-MVE-NEXT: vcvt.s32.f32 s12, s12
1634 ; CHECK-MVE-NEXT: vminnm.f32 s8, s8, s6
1635 ; CHECK-MVE-NEXT: vminnm.f32 s4, s4, s6
1636 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
1637 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s8
1638 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1639 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
1640 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
1641 ; CHECK-MVE-NEXT: vmov r0, s12
1642 ; CHECK-MVE-NEXT: it vs
1643 ; CHECK-MVE-NEXT: movvs r0, #0
1644 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1645 ; CHECK-MVE-NEXT: vmov r1, s10
1646 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
1647 ; CHECK-MVE-NEXT: it vs
1648 ; CHECK-MVE-NEXT: movvs r1, #0
1649 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1650 ; CHECK-MVE-NEXT: vmov r2, s4
1651 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
1652 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
1653 ; CHECK-MVE-NEXT: vmov r3, s8
1654 ; CHECK-MVE-NEXT: it vs
1655 ; CHECK-MVE-NEXT: movvs r2, #0
1656 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1657 ; CHECK-MVE-NEXT: it vs
1658 ; CHECK-MVE-NEXT: movvs r3, #0
1659 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r3, r2
1660 ; CHECK-MVE-NEXT: bx lr
1661 ; CHECK-MVE-NEXT: .p2align 2
1662 ; CHECK-MVE-NEXT: @ %bb.1:
1663 ; CHECK-MVE-NEXT: .LCPI24_0:
1664 ; CHECK-MVE-NEXT: .long 0xc5800000 @ float -4096
1665 ; CHECK-MVE-NEXT: .LCPI24_1:
1666 ; CHECK-MVE-NEXT: .long 0x457ff000 @ float 4095
1668 ; CHECK-MVEFP-LABEL: test_signed_v4f32_v4i13:
1669 ; CHECK-MVEFP: @ %bb.0:
1670 ; CHECK-MVEFP-NEXT: vmov.i32 q1, #0xfff
1671 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
1672 ; CHECK-MVEFP-NEXT: vmvn.i32 q2, #0xfff
1673 ; CHECK-MVEFP-NEXT: vmin.s32 q0, q0, q1
1674 ; CHECK-MVEFP-NEXT: vmax.s32 q0, q0, q2
1675 ; CHECK-MVEFP-NEXT: bx lr
1676 %x = call <4 x i13> @llvm.fptosi.sat.v4f32.v4i13(<4 x float> %f)
1680 define arm_aapcs_vfpcc <4 x i16> @test_signed_v4f32_v4i16(<4 x float> %f) {
1681 ; CHECK-MVE-LABEL: test_signed_v4f32_v4i16:
1682 ; CHECK-MVE: @ %bb.0:
1683 ; CHECK-MVE-NEXT: vldr s4, .LCPI25_0
1684 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
1685 ; CHECK-MVE-NEXT: vldr s6, .LCPI25_1
1686 ; CHECK-MVE-NEXT: vmaxnm.f32 s12, s2, s4
1687 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s0, s4
1688 ; CHECK-MVE-NEXT: vminnm.f32 s12, s12, s6
1689 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s1, s4
1690 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
1691 ; CHECK-MVE-NEXT: vmaxnm.f32 s4, s3, s4
1692 ; CHECK-MVE-NEXT: vcvt.s32.f32 s12, s12
1693 ; CHECK-MVE-NEXT: vminnm.f32 s8, s8, s6
1694 ; CHECK-MVE-NEXT: vminnm.f32 s4, s4, s6
1695 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
1696 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s8
1697 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1698 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
1699 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
1700 ; CHECK-MVE-NEXT: vmov r0, s12
1701 ; CHECK-MVE-NEXT: it vs
1702 ; CHECK-MVE-NEXT: movvs r0, #0
1703 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1704 ; CHECK-MVE-NEXT: vmov r1, s10
1705 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
1706 ; CHECK-MVE-NEXT: it vs
1707 ; CHECK-MVE-NEXT: movvs r1, #0
1708 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1709 ; CHECK-MVE-NEXT: vmov r2, s4
1710 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
1711 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
1712 ; CHECK-MVE-NEXT: vmov r3, s8
1713 ; CHECK-MVE-NEXT: it vs
1714 ; CHECK-MVE-NEXT: movvs r2, #0
1715 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1716 ; CHECK-MVE-NEXT: it vs
1717 ; CHECK-MVE-NEXT: movvs r3, #0
1718 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r3, r2
1719 ; CHECK-MVE-NEXT: bx lr
1720 ; CHECK-MVE-NEXT: .p2align 2
1721 ; CHECK-MVE-NEXT: @ %bb.1:
1722 ; CHECK-MVE-NEXT: .LCPI25_0:
1723 ; CHECK-MVE-NEXT: .long 0xc7000000 @ float -32768
1724 ; CHECK-MVE-NEXT: .LCPI25_1:
1725 ; CHECK-MVE-NEXT: .long 0x46fffe00 @ float 32767
1727 ; CHECK-MVEFP-LABEL: test_signed_v4f32_v4i16:
1728 ; CHECK-MVEFP: @ %bb.0:
1729 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
1730 ; CHECK-MVEFP-NEXT: vqmovnb.s32 q0, q0
1731 ; CHECK-MVEFP-NEXT: vmovlb.s16 q0, q0
1732 ; CHECK-MVEFP-NEXT: bx lr
1733 %x = call <4 x i16> @llvm.fptosi.sat.v4f32.v4i16(<4 x float> %f)
1737 define arm_aapcs_vfpcc <4 x i19> @test_signed_v4f32_v4i19(<4 x float> %f) {
1738 ; CHECK-MVE-LABEL: test_signed_v4f32_v4i19:
1739 ; CHECK-MVE: @ %bb.0:
1740 ; CHECK-MVE-NEXT: vldr s4, .LCPI26_0
1741 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
1742 ; CHECK-MVE-NEXT: vldr s6, .LCPI26_1
1743 ; CHECK-MVE-NEXT: vmaxnm.f32 s12, s2, s4
1744 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s0, s4
1745 ; CHECK-MVE-NEXT: vminnm.f32 s12, s12, s6
1746 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s1, s4
1747 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
1748 ; CHECK-MVE-NEXT: vmaxnm.f32 s4, s3, s4
1749 ; CHECK-MVE-NEXT: vcvt.s32.f32 s12, s12
1750 ; CHECK-MVE-NEXT: vminnm.f32 s8, s8, s6
1751 ; CHECK-MVE-NEXT: vminnm.f32 s4, s4, s6
1752 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
1753 ; CHECK-MVE-NEXT: vcvt.s32.f32 s8, s8
1754 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1755 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s4
1756 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
1757 ; CHECK-MVE-NEXT: vmov r0, s12
1758 ; CHECK-MVE-NEXT: it vs
1759 ; CHECK-MVE-NEXT: movvs r0, #0
1760 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1761 ; CHECK-MVE-NEXT: vmov r1, s10
1762 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
1763 ; CHECK-MVE-NEXT: it vs
1764 ; CHECK-MVE-NEXT: movvs r1, #0
1765 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1766 ; CHECK-MVE-NEXT: vmov r2, s4
1767 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
1768 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
1769 ; CHECK-MVE-NEXT: vmov r3, s8
1770 ; CHECK-MVE-NEXT: it vs
1771 ; CHECK-MVE-NEXT: movvs r2, #0
1772 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
1773 ; CHECK-MVE-NEXT: it vs
1774 ; CHECK-MVE-NEXT: movvs r3, #0
1775 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r3, r2
1776 ; CHECK-MVE-NEXT: bx lr
1777 ; CHECK-MVE-NEXT: .p2align 2
1778 ; CHECK-MVE-NEXT: @ %bb.1:
1779 ; CHECK-MVE-NEXT: .LCPI26_0:
1780 ; CHECK-MVE-NEXT: .long 0xc8800000 @ float -262144
1781 ; CHECK-MVE-NEXT: .LCPI26_1:
1782 ; CHECK-MVE-NEXT: .long 0x487fffc0 @ float 262143
1784 ; CHECK-MVEFP-LABEL: test_signed_v4f32_v4i19:
1785 ; CHECK-MVEFP: @ %bb.0:
1786 ; CHECK-MVEFP-NEXT: movs r0, #0
1787 ; CHECK-MVEFP-NEXT: vmov.i32 q1, #0x3ffff
1788 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
1789 ; CHECK-MVEFP-NEXT: movt r0, #65532
1790 ; CHECK-MVEFP-NEXT: vmin.s32 q0, q0, q1
1791 ; CHECK-MVEFP-NEXT: vdup.32 q1, r0
1792 ; CHECK-MVEFP-NEXT: vmax.s32 q0, q0, q1
1793 ; CHECK-MVEFP-NEXT: bx lr
1794 %x = call <4 x i19> @llvm.fptosi.sat.v4f32.v4i19(<4 x float> %f)
1798 define arm_aapcs_vfpcc <4 x i32> @test_signed_v4f32_v4i32_duplicate(<4 x float> %f) {
1799 ; CHECK-MVE-LABEL: test_signed_v4f32_v4i32_duplicate:
1800 ; CHECK-MVE: @ %bb.0:
1801 ; CHECK-MVE-NEXT: vcvt.s32.f32 s2, s2
1802 ; CHECK-MVE-NEXT: vcvt.s32.f32 s0, s0
1803 ; CHECK-MVE-NEXT: vcvt.s32.f32 s4, s3
1804 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s1
1805 ; CHECK-MVE-NEXT: vmov r0, s2
1806 ; CHECK-MVE-NEXT: vmov r1, s0
1807 ; CHECK-MVE-NEXT: vmov q0[2], q0[0], r1, r0
1808 ; CHECK-MVE-NEXT: vmov r0, s4
1809 ; CHECK-MVE-NEXT: vmov r1, s6
1810 ; CHECK-MVE-NEXT: vmov q0[3], q0[1], r1, r0
1811 ; CHECK-MVE-NEXT: bx lr
1813 ; CHECK-MVEFP-LABEL: test_signed_v4f32_v4i32_duplicate:
1814 ; CHECK-MVEFP: @ %bb.0:
1815 ; CHECK-MVEFP-NEXT: vcvt.s32.f32 q0, q0
1816 ; CHECK-MVEFP-NEXT: bx lr
1817 %x = call <4 x i32> @llvm.fptosi.sat.v4f32.v4i32(<4 x float> %f)
1821 define arm_aapcs_vfpcc <4 x i50> @test_signed_v4f32_v4i50(<4 x float> %f) {
1822 ; CHECK-LABEL: test_signed_v4f32_v4i50:
1824 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, lr}
1825 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, lr}
1826 ; CHECK-NEXT: .pad #4
1827 ; CHECK-NEXT: sub sp, #4
1828 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
1829 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
1830 ; CHECK-NEXT: vmov q4, q0
1831 ; CHECK-NEXT: mov r8, r0
1832 ; CHECK-NEXT: vmov r0, s17
1833 ; CHECK-NEXT: bl __aeabi_f2lz
1834 ; CHECK-NEXT: mov r9, r0
1835 ; CHECK-NEXT: vmov r0, s19
1836 ; CHECK-NEXT: vldr s20, .LCPI28_0
1837 ; CHECK-NEXT: mov r7, r1
1838 ; CHECK-NEXT: vmov r4, s16
1839 ; CHECK-NEXT: vcmp.f32 s17, s20
1840 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1841 ; CHECK-NEXT: itt lt
1842 ; CHECK-NEXT: movlt r7, #0
1843 ; CHECK-NEXT: movtlt r7, #65534
1844 ; CHECK-NEXT: bl __aeabi_f2lz
1845 ; CHECK-NEXT: vldr s22, .LCPI28_1
1846 ; CHECK-NEXT: vcmp.f32 s19, s20
1847 ; CHECK-NEXT: mov r6, r0
1848 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1849 ; CHECK-NEXT: mov r5, r1
1850 ; CHECK-NEXT: mov r0, r4
1851 ; CHECK-NEXT: vcmp.f32 s17, s22
1852 ; CHECK-NEXT: itt lt
1853 ; CHECK-NEXT: movlt r5, #0
1854 ; CHECK-NEXT: movtlt r5, #65534
1855 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1856 ; CHECK-NEXT: itt gt
1857 ; CHECK-NEXT: movwgt r7, #65535
1858 ; CHECK-NEXT: movtgt r7, #1
1859 ; CHECK-NEXT: bl __aeabi_f2lz
1860 ; CHECK-NEXT: vcmp.f32 s16, s20
1861 ; CHECK-NEXT: mov r4, r1
1862 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1863 ; CHECK-NEXT: vcmp.f32 s19, s22
1865 ; CHECK-NEXT: movlt r0, #0
1866 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1867 ; CHECK-NEXT: vcmp.f32 s16, s22
1868 ; CHECK-NEXT: itt gt
1869 ; CHECK-NEXT: movwgt r5, #65535
1870 ; CHECK-NEXT: movtgt r5, #1
1871 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1872 ; CHECK-NEXT: vcmp.f32 s16, s16
1874 ; CHECK-NEXT: movgt.w r0, #-1
1875 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1876 ; CHECK-NEXT: vcmp.f32 s19, s20
1878 ; CHECK-NEXT: movvs r0, #0
1879 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1880 ; CHECK-NEXT: vcmp.f32 s19, s22
1881 ; CHECK-NEXT: str.w r0, [r8]
1883 ; CHECK-NEXT: movlt r6, #0
1884 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1885 ; CHECK-NEXT: vcmp.f32 s19, s19
1887 ; CHECK-NEXT: movgt.w r6, #-1
1888 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1889 ; CHECK-NEXT: vcmp.f32 s17, s17
1890 ; CHECK-NEXT: itt vs
1891 ; CHECK-NEXT: movvs r6, #0
1892 ; CHECK-NEXT: movvs r5, #0
1893 ; CHECK-NEXT: lsls r0, r5, #22
1894 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1895 ; CHECK-NEXT: vcmp.f32 s17, s20
1896 ; CHECK-NEXT: orr.w r0, r0, r6, lsr #10
1897 ; CHECK-NEXT: str.w r0, [r8, #20]
1899 ; CHECK-NEXT: movvs r7, #0
1900 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1902 ; CHECK-NEXT: movlt.w r9, #0
1903 ; CHECK-NEXT: vcmp.f32 s17, s22
1904 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1906 ; CHECK-NEXT: movgt.w r9, #-1
1907 ; CHECK-NEXT: vcmp.f32 s17, s17
1908 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1910 ; CHECK-NEXT: movvs.w r9, #0
1911 ; CHECK-NEXT: lsr.w r0, r9, #14
1912 ; CHECK-NEXT: orr.w r1, r0, r7, lsl #18
1913 ; CHECK-NEXT: vmov r0, s18
1914 ; CHECK-NEXT: str.w r1, [r8, #8]
1915 ; CHECK-NEXT: bl __aeabi_f2lz
1916 ; CHECK-NEXT: vcmp.f32 s18, s20
1917 ; CHECK-NEXT: lsrs r2, r5, #10
1918 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1919 ; CHECK-NEXT: vcmp.f32 s18, s22
1920 ; CHECK-NEXT: itt lt
1921 ; CHECK-NEXT: movlt r1, #0
1922 ; CHECK-NEXT: movtlt r1, #65534
1923 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1924 ; CHECK-NEXT: vcmp.f32 s16, s20
1925 ; CHECK-NEXT: itt gt
1926 ; CHECK-NEXT: movwgt r1, #65535
1927 ; CHECK-NEXT: movtgt r1, #1
1928 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1929 ; CHECK-NEXT: vcmp.f32 s16, s22
1930 ; CHECK-NEXT: itt lt
1931 ; CHECK-NEXT: movlt r4, #0
1932 ; CHECK-NEXT: movtlt r4, #65534
1933 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1934 ; CHECK-NEXT: vcmp.f32 s18, s20
1935 ; CHECK-NEXT: itt gt
1936 ; CHECK-NEXT: movwgt r4, #65535
1937 ; CHECK-NEXT: movtgt r4, #1
1938 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1939 ; CHECK-NEXT: vcmp.f32 s18, s22
1940 ; CHECK-NEXT: strb.w r2, [r8, #24]
1942 ; CHECK-NEXT: movlt r0, #0
1943 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1944 ; CHECK-NEXT: vcmp.f32 s18, s18
1946 ; CHECK-NEXT: movgt.w r0, #-1
1947 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1948 ; CHECK-NEXT: ubfx r2, r7, #14, #4
1949 ; CHECK-NEXT: vcmp.f32 s16, s16
1951 ; CHECK-NEXT: movvs r0, #0
1952 ; CHECK-NEXT: orr.w r2, r2, r0, lsl #4
1953 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1954 ; CHECK-NEXT: str.w r2, [r8, #12]
1956 ; CHECK-NEXT: movvs r4, #0
1957 ; CHECK-NEXT: vcmp.f32 s18, s18
1958 ; CHECK-NEXT: bfc r4, #18, #14
1959 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
1960 ; CHECK-NEXT: orr.w r2, r4, r9, lsl #18
1961 ; CHECK-NEXT: str.w r2, [r8, #4]
1963 ; CHECK-NEXT: movvs r1, #0
1964 ; CHECK-NEXT: lsrs r0, r0, #28
1965 ; CHECK-NEXT: bfc r1, #18, #14
1966 ; CHECK-NEXT: orr.w r0, r0, r1, lsl #4
1967 ; CHECK-NEXT: orr.w r0, r0, r6, lsl #22
1968 ; CHECK-NEXT: str.w r0, [r8, #16]
1969 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
1970 ; CHECK-NEXT: add sp, #4
1971 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, pc}
1972 ; CHECK-NEXT: .p2align 2
1973 ; CHECK-NEXT: @ %bb.1:
1974 ; CHECK-NEXT: .LCPI28_0:
1975 ; CHECK-NEXT: .long 0xd8000000 @ float -5.62949953E+14
1976 ; CHECK-NEXT: .LCPI28_1:
1977 ; CHECK-NEXT: .long 0x57ffffff @ float 5.6294992E+14
1978 %x = call <4 x i50> @llvm.fptosi.sat.v4f32.v4i50(<4 x float> %f)
1982 define arm_aapcs_vfpcc <4 x i64> @test_signed_v4f32_v4i64(<4 x float> %f) {
1983 ; CHECK-LABEL: test_signed_v4f32_v4i64:
1985 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
1986 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, lr}
1987 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
1988 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
1989 ; CHECK-NEXT: vmov q4, q0
1990 ; CHECK-NEXT: vmov r0, s19
1991 ; CHECK-NEXT: bl __aeabi_f2lz
1992 ; CHECK-NEXT: mov r10, r0
1993 ; CHECK-NEXT: vmov r0, s18
1994 ; CHECK-NEXT: vldr s22, .LCPI29_0
1995 ; CHECK-NEXT: mov r9, r1
1996 ; CHECK-NEXT: vldr s20, .LCPI29_1
1997 ; CHECK-NEXT: vmov r8, s16
1998 ; CHECK-NEXT: vcmp.f32 s19, s22
1999 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2001 ; CHECK-NEXT: movlt.w r10, #0
2002 ; CHECK-NEXT: vcmp.f32 s19, s20
2003 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2005 ; CHECK-NEXT: movgt.w r10, #-1
2006 ; CHECK-NEXT: vcmp.f32 s19, s19
2007 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2008 ; CHECK-NEXT: vmov r4, s17
2010 ; CHECK-NEXT: movvs.w r10, #0
2011 ; CHECK-NEXT: bl __aeabi_f2lz
2012 ; CHECK-NEXT: vcmp.f32 s18, s22
2013 ; CHECK-NEXT: mov r7, r0
2014 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2015 ; CHECK-NEXT: vcmp.f32 s18, s20
2017 ; CHECK-NEXT: movlt r7, #0
2018 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2019 ; CHECK-NEXT: vcmp.f32 s18, s18
2021 ; CHECK-NEXT: movgt.w r7, #-1
2022 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2023 ; CHECK-NEXT: vcmp.f32 s19, s22
2025 ; CHECK-NEXT: movvs r7, #0
2026 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2027 ; CHECK-NEXT: vcmp.f32 s19, s20
2029 ; CHECK-NEXT: movlt.w r9, #-2147483648
2030 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2031 ; CHECK-NEXT: vcmp.f32 s19, s19
2033 ; CHECK-NEXT: mvngt r9, #-2147483648
2034 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2035 ; CHECK-NEXT: mov r6, r1
2036 ; CHECK-NEXT: vcmp.f32 s18, s22
2038 ; CHECK-NEXT: movvs.w r9, #0
2039 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2041 ; CHECK-NEXT: movlt.w r6, #-2147483648
2042 ; CHECK-NEXT: vcmp.f32 s18, s20
2043 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2044 ; CHECK-NEXT: mov r0, r4
2046 ; CHECK-NEXT: mvngt r6, #-2147483648
2047 ; CHECK-NEXT: vcmp.f32 s18, s18
2048 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2050 ; CHECK-NEXT: movvs r6, #0
2051 ; CHECK-NEXT: bl __aeabi_f2lz
2052 ; CHECK-NEXT: mov r5, r0
2053 ; CHECK-NEXT: vcmp.f32 s17, s22
2054 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2056 ; CHECK-NEXT: movlt r5, #0
2057 ; CHECK-NEXT: vcmp.f32 s17, s20
2058 ; CHECK-NEXT: mov r0, r8
2059 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2061 ; CHECK-NEXT: movgt.w r5, #-1
2062 ; CHECK-NEXT: vcmp.f32 s17, s17
2063 ; CHECK-NEXT: mov r4, r1
2064 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2066 ; CHECK-NEXT: movvs r5, #0
2067 ; CHECK-NEXT: bl __aeabi_f2lz
2068 ; CHECK-NEXT: vcmp.f32 s16, s22
2069 ; CHECK-NEXT: vmov q1[2], q1[0], r7, r10
2070 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2071 ; CHECK-NEXT: vcmp.f32 s16, s20
2073 ; CHECK-NEXT: movlt r0, #0
2074 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2075 ; CHECK-NEXT: vcmp.f32 s16, s16
2077 ; CHECK-NEXT: movgt.w r0, #-1
2078 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2079 ; CHECK-NEXT: vcmp.f32 s17, s22
2081 ; CHECK-NEXT: movvs r0, #0
2082 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2083 ; CHECK-NEXT: vcmp.f32 s17, s20
2085 ; CHECK-NEXT: movlt.w r4, #-2147483648
2086 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2087 ; CHECK-NEXT: vcmp.f32 s17, s17
2089 ; CHECK-NEXT: mvngt r4, #-2147483648
2090 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2091 ; CHECK-NEXT: vcmp.f32 s16, s22
2093 ; CHECK-NEXT: movvs r4, #0
2094 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2096 ; CHECK-NEXT: movlt.w r1, #-2147483648
2097 ; CHECK-NEXT: vcmp.f32 s16, s20
2098 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r5
2099 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2101 ; CHECK-NEXT: mvngt r1, #-2147483648
2102 ; CHECK-NEXT: vcmp.f32 s16, s16
2103 ; CHECK-NEXT: vmov q1[3], q1[1], r6, r9
2104 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2106 ; CHECK-NEXT: movvs r1, #0
2107 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r4
2108 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
2109 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, pc}
2110 ; CHECK-NEXT: .p2align 2
2111 ; CHECK-NEXT: @ %bb.1:
2112 ; CHECK-NEXT: .LCPI29_0:
2113 ; CHECK-NEXT: .long 0xdf000000 @ float -9.22337203E+18
2114 ; CHECK-NEXT: .LCPI29_1:
2115 ; CHECK-NEXT: .long 0x5effffff @ float 9.22337149E+18
2116 %x = call <4 x i64> @llvm.fptosi.sat.v4f32.v4i64(<4 x float> %f)
2120 define arm_aapcs_vfpcc <4 x i100> @test_signed_v4f32_v4i100(<4 x float> %f) {
2121 ; CHECK-LABEL: test_signed_v4f32_v4i100:
2123 ; CHECK-NEXT: .save {r4, r5, r6, r7, lr}
2124 ; CHECK-NEXT: push {r4, r5, r6, r7, lr}
2125 ; CHECK-NEXT: .pad #4
2126 ; CHECK-NEXT: sub sp, #4
2127 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
2128 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
2129 ; CHECK-NEXT: vmov q4, q0
2130 ; CHECK-NEXT: mov r4, r0
2131 ; CHECK-NEXT: vmov r0, s18
2132 ; CHECK-NEXT: vldr s20, .LCPI30_0
2133 ; CHECK-NEXT: vmov r7, s19
2134 ; CHECK-NEXT: vmov r5, s16
2135 ; CHECK-NEXT: bl __fixsfti
2136 ; CHECK-NEXT: vldr s22, .LCPI30_1
2137 ; CHECK-NEXT: mov r6, r3
2138 ; CHECK-NEXT: vcmp.f32 s18, s22
2139 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2140 ; CHECK-NEXT: vcmp.f32 s18, s20
2142 ; CHECK-NEXT: movlt r2, #0
2143 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2144 ; CHECK-NEXT: vcmp.f32 s18, s18
2146 ; CHECK-NEXT: movgt.w r2, #-1
2147 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2148 ; CHECK-NEXT: vcmp.f32 s18, s22
2150 ; CHECK-NEXT: movvs r2, #0
2151 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2152 ; CHECK-NEXT: vcmp.f32 s18, s20
2153 ; CHECK-NEXT: str.w r2, [r4, #33]
2155 ; CHECK-NEXT: movlt r1, #0
2156 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2157 ; CHECK-NEXT: vcmp.f32 s18, s18
2159 ; CHECK-NEXT: movgt.w r1, #-1
2160 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2161 ; CHECK-NEXT: vcmp.f32 s18, s22
2163 ; CHECK-NEXT: movvs r1, #0
2164 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2165 ; CHECK-NEXT: str.w r1, [r4, #29]
2167 ; CHECK-NEXT: movlt r0, #0
2168 ; CHECK-NEXT: vcmp.f32 s18, s20
2169 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2171 ; CHECK-NEXT: movgt.w r0, #-1
2172 ; CHECK-NEXT: vcmp.f32 s18, s18
2173 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2175 ; CHECK-NEXT: movvs r0, #0
2176 ; CHECK-NEXT: str.w r0, [r4, #25]
2177 ; CHECK-NEXT: mov r0, r5
2178 ; CHECK-NEXT: bl __fixsfti
2179 ; CHECK-NEXT: vcmp.f32 s16, s22
2180 ; CHECK-NEXT: mov r5, r3
2181 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2182 ; CHECK-NEXT: vcmp.f32 s16, s20
2184 ; CHECK-NEXT: movlt r2, #0
2185 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2186 ; CHECK-NEXT: vcmp.f32 s16, s16
2188 ; CHECK-NEXT: movgt.w r2, #-1
2189 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2190 ; CHECK-NEXT: vcmp.f32 s16, s22
2192 ; CHECK-NEXT: movvs r2, #0
2193 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2194 ; CHECK-NEXT: vcmp.f32 s16, s20
2195 ; CHECK-NEXT: str r2, [r4, #8]
2197 ; CHECK-NEXT: movlt r1, #0
2198 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2199 ; CHECK-NEXT: vcmp.f32 s16, s16
2201 ; CHECK-NEXT: movgt.w r1, #-1
2202 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2203 ; CHECK-NEXT: vcmp.f32 s16, s22
2205 ; CHECK-NEXT: movvs r1, #0
2206 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2207 ; CHECK-NEXT: str r1, [r4, #4]
2209 ; CHECK-NEXT: movlt r0, #0
2210 ; CHECK-NEXT: vcmp.f32 s16, s20
2211 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2213 ; CHECK-NEXT: movgt.w r0, #-1
2214 ; CHECK-NEXT: vcmp.f32 s16, s16
2215 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2217 ; CHECK-NEXT: movvs r0, #0
2218 ; CHECK-NEXT: str r0, [r4]
2219 ; CHECK-NEXT: mov r0, r7
2220 ; CHECK-NEXT: bl __fixsfti
2221 ; CHECK-NEXT: vcmp.f32 s19, s22
2222 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2223 ; CHECK-NEXT: vcmp.f32 s19, s20
2225 ; CHECK-NEXT: movlt r1, #0
2226 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2227 ; CHECK-NEXT: vcmp.f32 s19, s19
2229 ; CHECK-NEXT: movgt.w r1, #-1
2230 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2231 ; CHECK-NEXT: vcmp.f32 s19, s22
2233 ; CHECK-NEXT: movvs r1, #0
2234 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2235 ; CHECK-NEXT: vcmp.f32 s19, s20
2237 ; CHECK-NEXT: movlt r2, #0
2238 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2239 ; CHECK-NEXT: vcmp.f32 s19, s19
2241 ; CHECK-NEXT: movgt.w r2, #-1
2242 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2243 ; CHECK-NEXT: lsr.w r7, r1, #28
2244 ; CHECK-NEXT: vcmp.f32 s19, s22
2246 ; CHECK-NEXT: movvs r2, #0
2247 ; CHECK-NEXT: orr.w r7, r7, r2, lsl #4
2248 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2249 ; CHECK-NEXT: str.w r7, [r4, #45]
2251 ; CHECK-NEXT: movlt r0, #0
2252 ; CHECK-NEXT: vcmp.f32 s19, s20
2253 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2255 ; CHECK-NEXT: movgt.w r0, #-1
2256 ; CHECK-NEXT: vcmp.f32 s19, s19
2257 ; CHECK-NEXT: lsrs r2, r2, #28
2258 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2260 ; CHECK-NEXT: movvs r0, #0
2261 ; CHECK-NEXT: lsrs r7, r0, #28
2262 ; CHECK-NEXT: vcmp.f32 s19, s22
2263 ; CHECK-NEXT: orr.w r7, r7, r1, lsl #4
2264 ; CHECK-NEXT: vmov r1, s17
2265 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2266 ; CHECK-NEXT: vcmp.f32 s19, s20
2267 ; CHECK-NEXT: str.w r7, [r4, #41]
2269 ; CHECK-NEXT: mvnlt r3, #7
2270 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2271 ; CHECK-NEXT: vcmp.f32 s19, s19
2273 ; CHECK-NEXT: movgt r3, #7
2274 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2275 ; CHECK-NEXT: vcmp.f32 s18, s22
2277 ; CHECK-NEXT: movvs r3, #0
2278 ; CHECK-NEXT: orr.w r2, r2, r3, lsl #4
2279 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2280 ; CHECK-NEXT: strb.w r2, [r4, #49]
2282 ; CHECK-NEXT: mvnlt r6, #7
2283 ; CHECK-NEXT: vcmp.f32 s18, s20
2284 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2286 ; CHECK-NEXT: movgt r6, #7
2287 ; CHECK-NEXT: vcmp.f32 s18, s18
2288 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2290 ; CHECK-NEXT: movvs r6, #0
2291 ; CHECK-NEXT: and r2, r6, #15
2292 ; CHECK-NEXT: orr.w r0, r2, r0, lsl #4
2293 ; CHECK-NEXT: str.w r0, [r4, #37]
2294 ; CHECK-NEXT: mov r0, r1
2295 ; CHECK-NEXT: bl __fixsfti
2296 ; CHECK-NEXT: vcmp.f32 s17, s22
2297 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2298 ; CHECK-NEXT: vcmp.f32 s17, s20
2300 ; CHECK-NEXT: movlt r1, #0
2301 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2302 ; CHECK-NEXT: vcmp.f32 s17, s17
2304 ; CHECK-NEXT: movgt.w r1, #-1
2305 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2306 ; CHECK-NEXT: vcmp.f32 s17, s22
2308 ; CHECK-NEXT: movvs r1, #0
2309 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2310 ; CHECK-NEXT: vcmp.f32 s17, s20
2312 ; CHECK-NEXT: movlt r2, #0
2313 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2314 ; CHECK-NEXT: vcmp.f32 s17, s17
2316 ; CHECK-NEXT: movgt.w r2, #-1
2317 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2318 ; CHECK-NEXT: vcmp.f32 s17, s22
2320 ; CHECK-NEXT: movvs r2, #0
2321 ; CHECK-NEXT: lsrs r7, r1, #28
2322 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2323 ; CHECK-NEXT: vcmp.f32 s17, s20
2324 ; CHECK-NEXT: orr.w r7, r7, r2, lsl #4
2325 ; CHECK-NEXT: str r7, [r4, #20]
2327 ; CHECK-NEXT: movlt r0, #0
2328 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2329 ; CHECK-NEXT: vcmp.f32 s17, s17
2331 ; CHECK-NEXT: movgt.w r0, #-1
2332 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2333 ; CHECK-NEXT: vcmp.f32 s17, s22
2335 ; CHECK-NEXT: movvs r0, #0
2336 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2337 ; CHECK-NEXT: vcmp.f32 s17, s20
2338 ; CHECK-NEXT: lsr.w r7, r0, #28
2339 ; CHECK-NEXT: orr.w r1, r7, r1, lsl #4
2340 ; CHECK-NEXT: str r1, [r4, #16]
2342 ; CHECK-NEXT: mvnlt r3, #7
2343 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2344 ; CHECK-NEXT: vcmp.f32 s17, s17
2346 ; CHECK-NEXT: movgt r3, #7
2347 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2348 ; CHECK-NEXT: lsr.w r1, r2, #28
2349 ; CHECK-NEXT: vcmp.f32 s16, s22
2351 ; CHECK-NEXT: movvs r3, #0
2352 ; CHECK-NEXT: orr.w r1, r1, r3, lsl #4
2353 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2354 ; CHECK-NEXT: strb r1, [r4, #24]
2356 ; CHECK-NEXT: mvnlt r5, #7
2357 ; CHECK-NEXT: vcmp.f32 s16, s20
2358 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2360 ; CHECK-NEXT: movgt r5, #7
2361 ; CHECK-NEXT: vcmp.f32 s16, s16
2362 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2364 ; CHECK-NEXT: movvs r5, #0
2365 ; CHECK-NEXT: and r1, r5, #15
2366 ; CHECK-NEXT: orr.w r0, r1, r0, lsl #4
2367 ; CHECK-NEXT: str r0, [r4, #12]
2368 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
2369 ; CHECK-NEXT: add sp, #4
2370 ; CHECK-NEXT: pop {r4, r5, r6, r7, pc}
2371 ; CHECK-NEXT: .p2align 2
2372 ; CHECK-NEXT: @ %bb.1:
2373 ; CHECK-NEXT: .LCPI30_0:
2374 ; CHECK-NEXT: .long 0x70ffffff @ float 6.33825262E+29
2375 ; CHECK-NEXT: .LCPI30_1:
2376 ; CHECK-NEXT: .long 0xf1000000 @ float -6.338253E+29
2377 %x = call <4 x i100> @llvm.fptosi.sat.v4f32.v4i100(<4 x float> %f)
2381 define arm_aapcs_vfpcc <4 x i128> @test_signed_v4f32_v4i128(<4 x float> %f) {
2382 ; CHECK-LABEL: test_signed_v4f32_v4i128:
2384 ; CHECK-NEXT: .save {r4, r5, r6, r7, lr}
2385 ; CHECK-NEXT: push {r4, r5, r6, r7, lr}
2386 ; CHECK-NEXT: .pad #4
2387 ; CHECK-NEXT: sub sp, #4
2388 ; CHECK-NEXT: .vsave {d8, d9, d10, d11}
2389 ; CHECK-NEXT: vpush {d8, d9, d10, d11}
2390 ; CHECK-NEXT: vmov q4, q0
2391 ; CHECK-NEXT: mov r4, r0
2392 ; CHECK-NEXT: vmov r0, s19
2393 ; CHECK-NEXT: bl __fixsfti
2394 ; CHECK-NEXT: vmov r5, s18
2395 ; CHECK-NEXT: vldr s22, .LCPI31_0
2396 ; CHECK-NEXT: vldr s20, .LCPI31_1
2397 ; CHECK-NEXT: vmov r7, s16
2398 ; CHECK-NEXT: vcmp.f32 s19, s22
2399 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2400 ; CHECK-NEXT: vcmp.f32 s19, s20
2402 ; CHECK-NEXT: movlt.w r3, #-2147483648
2403 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2404 ; CHECK-NEXT: vcmp.f32 s19, s19
2406 ; CHECK-NEXT: mvngt r3, #-2147483648
2407 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2408 ; CHECK-NEXT: vcmp.f32 s19, s22
2410 ; CHECK-NEXT: movvs r3, #0
2411 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2412 ; CHECK-NEXT: vcmp.f32 s19, s20
2413 ; CHECK-NEXT: str r3, [r4, #60]
2415 ; CHECK-NEXT: movlt r2, #0
2416 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2417 ; CHECK-NEXT: vcmp.f32 s19, s19
2419 ; CHECK-NEXT: movgt.w r2, #-1
2420 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2421 ; CHECK-NEXT: vcmp.f32 s19, s22
2423 ; CHECK-NEXT: movvs r2, #0
2424 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2425 ; CHECK-NEXT: vcmp.f32 s19, s20
2426 ; CHECK-NEXT: str r2, [r4, #56]
2428 ; CHECK-NEXT: movlt r1, #0
2429 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2430 ; CHECK-NEXT: vcmp.f32 s19, s19
2432 ; CHECK-NEXT: movgt.w r1, #-1
2433 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2434 ; CHECK-NEXT: vcmp.f32 s19, s22
2436 ; CHECK-NEXT: movvs r1, #0
2437 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2438 ; CHECK-NEXT: str r1, [r4, #52]
2440 ; CHECK-NEXT: movlt r0, #0
2441 ; CHECK-NEXT: vcmp.f32 s19, s20
2442 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2444 ; CHECK-NEXT: movgt.w r0, #-1
2445 ; CHECK-NEXT: vcmp.f32 s19, s19
2446 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2448 ; CHECK-NEXT: movvs r0, #0
2449 ; CHECK-NEXT: str r0, [r4, #48]
2450 ; CHECK-NEXT: mov r0, r5
2451 ; CHECK-NEXT: vmov r6, s17
2452 ; CHECK-NEXT: bl __fixsfti
2453 ; CHECK-NEXT: vcmp.f32 s18, s22
2454 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2455 ; CHECK-NEXT: vcmp.f32 s18, s20
2457 ; CHECK-NEXT: movlt.w r3, #-2147483648
2458 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2459 ; CHECK-NEXT: vcmp.f32 s18, s18
2461 ; CHECK-NEXT: mvngt r3, #-2147483648
2462 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2463 ; CHECK-NEXT: vcmp.f32 s18, s22
2465 ; CHECK-NEXT: movvs r3, #0
2466 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2467 ; CHECK-NEXT: vcmp.f32 s18, s20
2468 ; CHECK-NEXT: str r3, [r4, #44]
2470 ; CHECK-NEXT: movlt r2, #0
2471 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2472 ; CHECK-NEXT: vcmp.f32 s18, s18
2474 ; CHECK-NEXT: movgt.w r2, #-1
2475 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2476 ; CHECK-NEXT: vcmp.f32 s18, s22
2478 ; CHECK-NEXT: movvs r2, #0
2479 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2480 ; CHECK-NEXT: vcmp.f32 s18, s20
2481 ; CHECK-NEXT: str r2, [r4, #40]
2483 ; CHECK-NEXT: movlt r1, #0
2484 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2485 ; CHECK-NEXT: vcmp.f32 s18, s18
2487 ; CHECK-NEXT: movgt.w r1, #-1
2488 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2489 ; CHECK-NEXT: vcmp.f32 s18, s22
2491 ; CHECK-NEXT: movvs r1, #0
2492 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2493 ; CHECK-NEXT: str r1, [r4, #36]
2495 ; CHECK-NEXT: movlt r0, #0
2496 ; CHECK-NEXT: vcmp.f32 s18, s20
2497 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2499 ; CHECK-NEXT: movgt.w r0, #-1
2500 ; CHECK-NEXT: vcmp.f32 s18, s18
2501 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2503 ; CHECK-NEXT: movvs r0, #0
2504 ; CHECK-NEXT: str r0, [r4, #32]
2505 ; CHECK-NEXT: mov r0, r6
2506 ; CHECK-NEXT: bl __fixsfti
2507 ; CHECK-NEXT: vcmp.f32 s17, s22
2508 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2509 ; CHECK-NEXT: vcmp.f32 s17, s20
2511 ; CHECK-NEXT: movlt.w r3, #-2147483648
2512 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2513 ; CHECK-NEXT: vcmp.f32 s17, s17
2515 ; CHECK-NEXT: mvngt r3, #-2147483648
2516 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2517 ; CHECK-NEXT: vcmp.f32 s17, s22
2519 ; CHECK-NEXT: movvs r3, #0
2520 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2521 ; CHECK-NEXT: vcmp.f32 s17, s20
2522 ; CHECK-NEXT: str r3, [r4, #28]
2524 ; CHECK-NEXT: movlt r2, #0
2525 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2526 ; CHECK-NEXT: vcmp.f32 s17, s17
2528 ; CHECK-NEXT: movgt.w r2, #-1
2529 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2530 ; CHECK-NEXT: vcmp.f32 s17, s22
2532 ; CHECK-NEXT: movvs r2, #0
2533 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2534 ; CHECK-NEXT: vcmp.f32 s17, s20
2535 ; CHECK-NEXT: str r2, [r4, #24]
2537 ; CHECK-NEXT: movlt r1, #0
2538 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2539 ; CHECK-NEXT: vcmp.f32 s17, s17
2541 ; CHECK-NEXT: movgt.w r1, #-1
2542 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2543 ; CHECK-NEXT: vcmp.f32 s17, s22
2545 ; CHECK-NEXT: movvs r1, #0
2546 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2547 ; CHECK-NEXT: str r1, [r4, #20]
2549 ; CHECK-NEXT: movlt r0, #0
2550 ; CHECK-NEXT: vcmp.f32 s17, s20
2551 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2553 ; CHECK-NEXT: movgt.w r0, #-1
2554 ; CHECK-NEXT: vcmp.f32 s17, s17
2555 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2557 ; CHECK-NEXT: movvs r0, #0
2558 ; CHECK-NEXT: str r0, [r4, #16]
2559 ; CHECK-NEXT: mov r0, r7
2560 ; CHECK-NEXT: bl __fixsfti
2561 ; CHECK-NEXT: vcmp.f32 s16, s22
2562 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2563 ; CHECK-NEXT: vcmp.f32 s16, s20
2565 ; CHECK-NEXT: movlt.w r3, #-2147483648
2566 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2567 ; CHECK-NEXT: vcmp.f32 s16, s16
2569 ; CHECK-NEXT: mvngt r3, #-2147483648
2570 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2571 ; CHECK-NEXT: vcmp.f32 s16, s22
2573 ; CHECK-NEXT: movvs r3, #0
2574 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2575 ; CHECK-NEXT: vcmp.f32 s16, s20
2576 ; CHECK-NEXT: str r3, [r4, #12]
2578 ; CHECK-NEXT: movlt r2, #0
2579 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2580 ; CHECK-NEXT: vcmp.f32 s16, s16
2582 ; CHECK-NEXT: movgt.w r2, #-1
2583 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2584 ; CHECK-NEXT: vcmp.f32 s16, s22
2586 ; CHECK-NEXT: movvs r2, #0
2587 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2588 ; CHECK-NEXT: vcmp.f32 s16, s20
2589 ; CHECK-NEXT: str r2, [r4, #8]
2591 ; CHECK-NEXT: movlt r1, #0
2592 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2593 ; CHECK-NEXT: vcmp.f32 s16, s16
2595 ; CHECK-NEXT: movgt.w r1, #-1
2596 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2597 ; CHECK-NEXT: vcmp.f32 s16, s22
2599 ; CHECK-NEXT: movvs r1, #0
2600 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2601 ; CHECK-NEXT: str r1, [r4, #4]
2603 ; CHECK-NEXT: movlt r0, #0
2604 ; CHECK-NEXT: vcmp.f32 s16, s20
2605 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2607 ; CHECK-NEXT: movgt.w r0, #-1
2608 ; CHECK-NEXT: vcmp.f32 s16, s16
2609 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
2611 ; CHECK-NEXT: movvs r0, #0
2612 ; CHECK-NEXT: str r0, [r4]
2613 ; CHECK-NEXT: vpop {d8, d9, d10, d11}
2614 ; CHECK-NEXT: add sp, #4
2615 ; CHECK-NEXT: pop {r4, r5, r6, r7, pc}
2616 ; CHECK-NEXT: .p2align 2
2617 ; CHECK-NEXT: @ %bb.1:
2618 ; CHECK-NEXT: .LCPI31_0:
2619 ; CHECK-NEXT: .long 0xff000000 @ float -1.70141183E+38
2620 ; CHECK-NEXT: .LCPI31_1:
2621 ; CHECK-NEXT: .long 0x7effffff @ float 1.70141173E+38
2622 %x = call <4 x i128> @llvm.fptosi.sat.v4f32.v4i128(<4 x float> %f)
2627 ; 2-Vector double to signed integer -- result size variation
2630 declare <2 x i1> @llvm.fptosi.sat.v2f64.v2i1 (<2 x double>)
2631 declare <2 x i8> @llvm.fptosi.sat.v2f64.v2i8 (<2 x double>)
2632 declare <2 x i13> @llvm.fptosi.sat.v2f64.v2i13 (<2 x double>)
2633 declare <2 x i16> @llvm.fptosi.sat.v2f64.v2i16 (<2 x double>)
2634 declare <2 x i19> @llvm.fptosi.sat.v2f64.v2i19 (<2 x double>)
2635 declare <2 x i50> @llvm.fptosi.sat.v2f64.v2i50 (<2 x double>)
2636 declare <2 x i64> @llvm.fptosi.sat.v2f64.v2i64 (<2 x double>)
2637 declare <2 x i100> @llvm.fptosi.sat.v2f64.v2i100(<2 x double>)
2638 declare <2 x i128> @llvm.fptosi.sat.v2f64.v2i128(<2 x double>)
2640 define arm_aapcs_vfpcc <2 x i1> @test_signed_v2f64_v2i1(<2 x double> %f) {
2641 ; CHECK-LABEL: test_signed_v2f64_v2i1:
2643 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2644 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2645 ; CHECK-NEXT: .pad #4
2646 ; CHECK-NEXT: sub sp, #4
2647 ; CHECK-NEXT: .vsave {d8, d9}
2648 ; CHECK-NEXT: vpush {d8, d9}
2649 ; CHECK-NEXT: .pad #24
2650 ; CHECK-NEXT: sub sp, #24
2651 ; CHECK-NEXT: vmov q4, q0
2652 ; CHECK-NEXT: vldr d0, .LCPI32_0
2653 ; CHECK-NEXT: vmov r8, r7, d8
2654 ; CHECK-NEXT: str r0, [sp, #20] @ 4-byte Spill
2655 ; CHECK-NEXT: vmov r2, r3, d0
2656 ; CHECK-NEXT: mov r0, r8
2657 ; CHECK-NEXT: mov r1, r7
2658 ; CHECK-NEXT: strd r2, r3, [sp, #12] @ 8-byte Folded Spill
2659 ; CHECK-NEXT: bl __aeabi_dcmpgt
2660 ; CHECK-NEXT: vldr d0, .LCPI32_1
2661 ; CHECK-NEXT: mov r9, r0
2662 ; CHECK-NEXT: mov r0, r8
2663 ; CHECK-NEXT: mov r1, r7
2664 ; CHECK-NEXT: vmov r2, r3, d0
2665 ; CHECK-NEXT: strd r2, r3, [sp, #4] @ 8-byte Folded Spill
2666 ; CHECK-NEXT: bl __aeabi_dcmpge
2667 ; CHECK-NEXT: mov r10, r0
2668 ; CHECK-NEXT: mov r0, r8
2669 ; CHECK-NEXT: mov r1, r7
2670 ; CHECK-NEXT: bl __aeabi_d2iz
2671 ; CHECK-NEXT: mov r11, r0
2672 ; CHECK-NEXT: cmp.w r10, #0
2674 ; CHECK-NEXT: moveq.w r11, #-1
2675 ; CHECK-NEXT: mov r0, r8
2676 ; CHECK-NEXT: mov r1, r7
2677 ; CHECK-NEXT: mov r2, r8
2678 ; CHECK-NEXT: mov r3, r7
2679 ; CHECK-NEXT: cmp.w r9, #0
2680 ; CHECK-NEXT: vmov r6, r5, d9
2682 ; CHECK-NEXT: movne.w r11, #0
2683 ; CHECK-NEXT: bl __aeabi_dcmpun
2684 ; CHECK-NEXT: cmp r0, #0
2686 ; CHECK-NEXT: movne.w r11, #0
2687 ; CHECK-NEXT: and r0, r11, #1
2688 ; CHECK-NEXT: ldrd r2, r3, [sp, #12] @ 8-byte Folded Reload
2689 ; CHECK-NEXT: rsbs r0, r0, #0
2690 ; CHECK-NEXT: movs r4, #0
2691 ; CHECK-NEXT: bfi r4, r0, #0, #1
2692 ; CHECK-NEXT: mov r0, r6
2693 ; CHECK-NEXT: mov r1, r5
2694 ; CHECK-NEXT: bl __aeabi_dcmpgt
2695 ; CHECK-NEXT: ldrd r2, r3, [sp, #4] @ 8-byte Folded Reload
2696 ; CHECK-NEXT: mov r8, r0
2697 ; CHECK-NEXT: mov r0, r6
2698 ; CHECK-NEXT: mov r1, r5
2699 ; CHECK-NEXT: bl __aeabi_dcmpge
2700 ; CHECK-NEXT: mov r9, r0
2701 ; CHECK-NEXT: mov r0, r6
2702 ; CHECK-NEXT: mov r1, r5
2703 ; CHECK-NEXT: bl __aeabi_d2iz
2704 ; CHECK-NEXT: mov r7, r0
2705 ; CHECK-NEXT: cmp.w r9, #0
2707 ; CHECK-NEXT: moveq.w r7, #-1
2708 ; CHECK-NEXT: mov r0, r6
2709 ; CHECK-NEXT: mov r1, r5
2710 ; CHECK-NEXT: mov r2, r6
2711 ; CHECK-NEXT: mov r3, r5
2712 ; CHECK-NEXT: cmp.w r8, #0
2714 ; CHECK-NEXT: movne r7, #0
2715 ; CHECK-NEXT: bl __aeabi_dcmpun
2716 ; CHECK-NEXT: cmp r0, #0
2718 ; CHECK-NEXT: movne r7, #0
2719 ; CHECK-NEXT: and r0, r7, #1
2720 ; CHECK-NEXT: rsbs r0, r0, #0
2721 ; CHECK-NEXT: bfi r4, r0, #1, #1
2722 ; CHECK-NEXT: ldr r0, [sp, #20] @ 4-byte Reload
2723 ; CHECK-NEXT: strb r4, [r0]
2724 ; CHECK-NEXT: add sp, #24
2725 ; CHECK-NEXT: vpop {d8, d9}
2726 ; CHECK-NEXT: add sp, #4
2727 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
2728 ; CHECK-NEXT: .p2align 3
2729 ; CHECK-NEXT: @ %bb.1:
2730 ; CHECK-NEXT: .LCPI32_0:
2731 ; CHECK-NEXT: .long 0 @ double 0
2732 ; CHECK-NEXT: .long 0
2733 ; CHECK-NEXT: .LCPI32_1:
2734 ; CHECK-NEXT: .long 0 @ double -1
2735 ; CHECK-NEXT: .long 3220176896
2736 %x = call <2 x i1> @llvm.fptosi.sat.v2f64.v2i1(<2 x double> %f)
2740 define arm_aapcs_vfpcc <2 x i8> @test_signed_v2f64_v2i8(<2 x double> %f) {
2741 ; CHECK-LABEL: test_signed_v2f64_v2i8:
2743 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2744 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2745 ; CHECK-NEXT: .pad #4
2746 ; CHECK-NEXT: sub sp, #4
2747 ; CHECK-NEXT: .vsave {d8, d9}
2748 ; CHECK-NEXT: vpush {d8, d9}
2749 ; CHECK-NEXT: .pad #24
2750 ; CHECK-NEXT: sub sp, #24
2751 ; CHECK-NEXT: vmov q4, q0
2752 ; CHECK-NEXT: vldr d0, .LCPI33_0
2753 ; CHECK-NEXT: vmov r8, r7, d9
2754 ; CHECK-NEXT: vmov r2, r3, d0
2755 ; CHECK-NEXT: mov r0, r8
2756 ; CHECK-NEXT: mov r1, r7
2757 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
2758 ; CHECK-NEXT: bl __aeabi_dcmpge
2759 ; CHECK-NEXT: clz r0, r0
2760 ; CHECK-NEXT: vldr d0, .LCPI33_1
2761 ; CHECK-NEXT: mov r1, r7
2762 ; CHECK-NEXT: lsrs r4, r0, #5
2763 ; CHECK-NEXT: mov r0, r8
2764 ; CHECK-NEXT: vmov r6, r5, d0
2765 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
2766 ; CHECK-NEXT: bl __aeabi_d2lz
2767 ; CHECK-NEXT: mov r11, r0
2768 ; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill
2769 ; CHECK-NEXT: mov r0, r8
2770 ; CHECK-NEXT: mov r1, r7
2771 ; CHECK-NEXT: mov r2, r6
2772 ; CHECK-NEXT: mov r3, r5
2773 ; CHECK-NEXT: cmp r4, #0
2775 ; CHECK-NEXT: mvnne r11, #127
2776 ; CHECK-NEXT: bl __aeabi_dcmpgt
2777 ; CHECK-NEXT: cmp r0, #0
2779 ; CHECK-NEXT: movne r0, #1
2780 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
2781 ; CHECK-NEXT: cmp r0, #0
2782 ; CHECK-NEXT: mov r0, r8
2783 ; CHECK-NEXT: mov r1, r7
2784 ; CHECK-NEXT: mov r2, r8
2785 ; CHECK-NEXT: mov r3, r7
2787 ; CHECK-NEXT: movne.w r11, #127
2788 ; CHECK-NEXT: bl __aeabi_dcmpun
2789 ; CHECK-NEXT: vmov r10, r7, d8
2790 ; CHECK-NEXT: mov r8, r0
2791 ; CHECK-NEXT: cmp r0, #0
2792 ; CHECK-NEXT: mov r2, r6
2793 ; CHECK-NEXT: mov r3, r5
2795 ; CHECK-NEXT: movne.w r8, #1
2796 ; CHECK-NEXT: cmp.w r8, #0
2798 ; CHECK-NEXT: movne.w r11, #0
2799 ; CHECK-NEXT: mov r0, r10
2800 ; CHECK-NEXT: mov r1, r7
2801 ; CHECK-NEXT: bl __aeabi_dcmpgt
2802 ; CHECK-NEXT: mov r6, r0
2803 ; CHECK-NEXT: cmp r0, #0
2805 ; CHECK-NEXT: movne r6, #1
2806 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
2807 ; CHECK-NEXT: mov r0, r10
2808 ; CHECK-NEXT: mov r1, r7
2809 ; CHECK-NEXT: bl __aeabi_dcmpge
2810 ; CHECK-NEXT: clz r0, r0
2811 ; CHECK-NEXT: mov r1, r7
2812 ; CHECK-NEXT: lsr.w r9, r0, #5
2813 ; CHECK-NEXT: mov r0, r10
2814 ; CHECK-NEXT: bl __aeabi_d2lz
2815 ; CHECK-NEXT: mov r5, r0
2816 ; CHECK-NEXT: mov r4, r1
2817 ; CHECK-NEXT: cmp.w r9, #0
2819 ; CHECK-NEXT: mvnne r5, #127
2820 ; CHECK-NEXT: mov r0, r10
2821 ; CHECK-NEXT: mov r1, r7
2822 ; CHECK-NEXT: mov r2, r10
2823 ; CHECK-NEXT: mov r3, r7
2824 ; CHECK-NEXT: cmp r6, #0
2826 ; CHECK-NEXT: movne r5, #127
2827 ; CHECK-NEXT: bl __aeabi_dcmpun
2828 ; CHECK-NEXT: cmp r0, #0
2830 ; CHECK-NEXT: movne r0, #1
2831 ; CHECK-NEXT: cmp r0, #0
2833 ; CHECK-NEXT: movne r5, #0
2834 ; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload
2835 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r11
2836 ; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload
2837 ; CHECK-NEXT: cmp r1, #0
2839 ; CHECK-NEXT: movne.w r2, #-1
2840 ; CHECK-NEXT: ldr r1, [sp, #16] @ 4-byte Reload
2841 ; CHECK-NEXT: cmp r1, #0
2843 ; CHECK-NEXT: movne r2, #0
2844 ; CHECK-NEXT: cmp.w r8, #0
2846 ; CHECK-NEXT: movne r2, #0
2847 ; CHECK-NEXT: cmp.w r9, #0
2849 ; CHECK-NEXT: movne.w r4, #-1
2850 ; CHECK-NEXT: cmp r6, #0
2852 ; CHECK-NEXT: movne r4, #0
2853 ; CHECK-NEXT: cmp r0, #0
2855 ; CHECK-NEXT: movne r4, #0
2856 ; CHECK-NEXT: vmov q0[3], q0[1], r4, r2
2857 ; CHECK-NEXT: add sp, #24
2858 ; CHECK-NEXT: vpop {d8, d9}
2859 ; CHECK-NEXT: add sp, #4
2860 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
2861 ; CHECK-NEXT: .p2align 3
2862 ; CHECK-NEXT: @ %bb.1:
2863 ; CHECK-NEXT: .LCPI33_0:
2864 ; CHECK-NEXT: .long 0 @ double -128
2865 ; CHECK-NEXT: .long 3227516928
2866 ; CHECK-NEXT: .LCPI33_1:
2867 ; CHECK-NEXT: .long 0 @ double 127
2868 ; CHECK-NEXT: .long 1080016896
2869 %x = call <2 x i8> @llvm.fptosi.sat.v2f64.v2i8(<2 x double> %f)
2873 define arm_aapcs_vfpcc <2 x i13> @test_signed_v2f64_v2i13(<2 x double> %f) {
2874 ; CHECK-LABEL: test_signed_v2f64_v2i13:
2876 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2877 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
2878 ; CHECK-NEXT: .pad #4
2879 ; CHECK-NEXT: sub sp, #4
2880 ; CHECK-NEXT: .vsave {d8, d9}
2881 ; CHECK-NEXT: vpush {d8, d9}
2882 ; CHECK-NEXT: .pad #24
2883 ; CHECK-NEXT: sub sp, #24
2884 ; CHECK-NEXT: vmov q4, q0
2885 ; CHECK-NEXT: vldr d0, .LCPI34_0
2886 ; CHECK-NEXT: vmov r8, r7, d9
2887 ; CHECK-NEXT: vmov r2, r3, d0
2888 ; CHECK-NEXT: mov r0, r8
2889 ; CHECK-NEXT: mov r1, r7
2890 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
2891 ; CHECK-NEXT: bl __aeabi_dcmpge
2892 ; CHECK-NEXT: clz r0, r0
2893 ; CHECK-NEXT: vldr d0, .LCPI34_1
2894 ; CHECK-NEXT: mov r1, r7
2895 ; CHECK-NEXT: lsrs r4, r0, #5
2896 ; CHECK-NEXT: mov r0, r8
2897 ; CHECK-NEXT: vmov r6, r5, d0
2898 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
2899 ; CHECK-NEXT: bl __aeabi_d2lz
2900 ; CHECK-NEXT: cmp r4, #0
2902 ; CHECK-NEXT: movne.w r1, #-1
2903 ; CHECK-NEXT: mov r11, r0
2904 ; CHECK-NEXT: mov r4, r1
2905 ; CHECK-NEXT: mov r0, r8
2906 ; CHECK-NEXT: mov r1, r7
2907 ; CHECK-NEXT: mov r2, r6
2908 ; CHECK-NEXT: mov r3, r5
2909 ; CHECK-NEXT: bl __aeabi_dcmpgt
2910 ; CHECK-NEXT: cmp r0, #0
2912 ; CHECK-NEXT: movne r0, #1
2913 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
2914 ; CHECK-NEXT: cmp r0, #0
2915 ; CHECK-NEXT: mov r0, r8
2916 ; CHECK-NEXT: mov r1, r7
2917 ; CHECK-NEXT: mov r2, r8
2918 ; CHECK-NEXT: mov r3, r7
2920 ; CHECK-NEXT: movne r4, #0
2921 ; CHECK-NEXT: bl __aeabi_dcmpun
2922 ; CHECK-NEXT: vmov r10, r7, d8
2923 ; CHECK-NEXT: mov r8, r0
2924 ; CHECK-NEXT: cmp r0, #0
2925 ; CHECK-NEXT: mov r2, r6
2926 ; CHECK-NEXT: mov r3, r5
2928 ; CHECK-NEXT: movne.w r8, #1
2929 ; CHECK-NEXT: cmp.w r8, #0
2931 ; CHECK-NEXT: movne r4, #0
2932 ; CHECK-NEXT: str r4, [sp, #4] @ 4-byte Spill
2933 ; CHECK-NEXT: mov r0, r10
2934 ; CHECK-NEXT: mov r1, r7
2935 ; CHECK-NEXT: bl __aeabi_dcmpgt
2936 ; CHECK-NEXT: mov r6, r0
2937 ; CHECK-NEXT: cmp r0, #0
2939 ; CHECK-NEXT: movne r6, #1
2940 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
2941 ; CHECK-NEXT: mov r0, r10
2942 ; CHECK-NEXT: mov r1, r7
2943 ; CHECK-NEXT: bl __aeabi_dcmpge
2944 ; CHECK-NEXT: clz r0, r0
2945 ; CHECK-NEXT: mov r1, r7
2946 ; CHECK-NEXT: lsr.w r9, r0, #5
2947 ; CHECK-NEXT: mov r0, r10
2948 ; CHECK-NEXT: bl __aeabi_d2lz
2949 ; CHECK-NEXT: mov r4, r1
2950 ; CHECK-NEXT: mov r5, r0
2951 ; CHECK-NEXT: cmp.w r9, #0
2953 ; CHECK-NEXT: movne.w r4, #-1
2954 ; CHECK-NEXT: mov r0, r10
2955 ; CHECK-NEXT: mov r1, r7
2956 ; CHECK-NEXT: mov r2, r10
2957 ; CHECK-NEXT: mov r3, r7
2958 ; CHECK-NEXT: cmp r6, #0
2960 ; CHECK-NEXT: movne r4, #0
2961 ; CHECK-NEXT: bl __aeabi_dcmpun
2962 ; CHECK-NEXT: cmp r0, #0
2964 ; CHECK-NEXT: movne r0, #1
2965 ; CHECK-NEXT: cmp r0, #0
2967 ; CHECK-NEXT: movne r4, #0
2968 ; CHECK-NEXT: cmp.w r9, #0
2969 ; CHECK-NEXT: itt ne
2970 ; CHECK-NEXT: movwne r5, #61440
2971 ; CHECK-NEXT: movtne r5, #65535
2972 ; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload
2973 ; CHECK-NEXT: cmp r1, #0
2974 ; CHECK-NEXT: itt ne
2975 ; CHECK-NEXT: movwne r11, #61440
2976 ; CHECK-NEXT: movtne r11, #65535
2977 ; CHECK-NEXT: ldr r1, [sp, #16] @ 4-byte Reload
2978 ; CHECK-NEXT: cmp r1, #0
2980 ; CHECK-NEXT: movwne r11, #4095
2981 ; CHECK-NEXT: cmp.w r8, #0
2983 ; CHECK-NEXT: movne.w r11, #0
2984 ; CHECK-NEXT: cmp r6, #0
2986 ; CHECK-NEXT: movwne r5, #4095
2987 ; CHECK-NEXT: cmp r0, #0
2989 ; CHECK-NEXT: movne r5, #0
2990 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
2991 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r11
2992 ; CHECK-NEXT: vmov q0[3], q0[1], r4, r0
2993 ; CHECK-NEXT: add sp, #24
2994 ; CHECK-NEXT: vpop {d8, d9}
2995 ; CHECK-NEXT: add sp, #4
2996 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
2997 ; CHECK-NEXT: .p2align 3
2998 ; CHECK-NEXT: @ %bb.1:
2999 ; CHECK-NEXT: .LCPI34_0:
3000 ; CHECK-NEXT: .long 0 @ double -4096
3001 ; CHECK-NEXT: .long 3232759808
3002 ; CHECK-NEXT: .LCPI34_1:
3003 ; CHECK-NEXT: .long 0 @ double 4095
3004 ; CHECK-NEXT: .long 1085275648
3005 %x = call <2 x i13> @llvm.fptosi.sat.v2f64.v2i13(<2 x double> %f)
3009 define arm_aapcs_vfpcc <2 x i16> @test_signed_v2f64_v2i16(<2 x double> %f) {
3010 ; CHECK-LABEL: test_signed_v2f64_v2i16:
3012 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3013 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3014 ; CHECK-NEXT: .pad #4
3015 ; CHECK-NEXT: sub sp, #4
3016 ; CHECK-NEXT: .vsave {d8, d9}
3017 ; CHECK-NEXT: vpush {d8, d9}
3018 ; CHECK-NEXT: .pad #24
3019 ; CHECK-NEXT: sub sp, #24
3020 ; CHECK-NEXT: vmov q4, q0
3021 ; CHECK-NEXT: vldr d0, .LCPI35_0
3022 ; CHECK-NEXT: vmov r8, r7, d9
3023 ; CHECK-NEXT: vmov r2, r3, d0
3024 ; CHECK-NEXT: mov r0, r8
3025 ; CHECK-NEXT: mov r1, r7
3026 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
3027 ; CHECK-NEXT: bl __aeabi_dcmpge
3028 ; CHECK-NEXT: clz r0, r0
3029 ; CHECK-NEXT: vldr d0, .LCPI35_1
3030 ; CHECK-NEXT: mov r1, r7
3031 ; CHECK-NEXT: lsrs r4, r0, #5
3032 ; CHECK-NEXT: mov r0, r8
3033 ; CHECK-NEXT: vmov r6, r5, d0
3034 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
3035 ; CHECK-NEXT: bl __aeabi_d2lz
3036 ; CHECK-NEXT: cmp r4, #0
3038 ; CHECK-NEXT: movne.w r1, #-1
3039 ; CHECK-NEXT: mov r11, r0
3040 ; CHECK-NEXT: mov r4, r1
3041 ; CHECK-NEXT: mov r0, r8
3042 ; CHECK-NEXT: mov r1, r7
3043 ; CHECK-NEXT: mov r2, r6
3044 ; CHECK-NEXT: mov r3, r5
3045 ; CHECK-NEXT: bl __aeabi_dcmpgt
3046 ; CHECK-NEXT: cmp r0, #0
3048 ; CHECK-NEXT: movne r0, #1
3049 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
3050 ; CHECK-NEXT: cmp r0, #0
3051 ; CHECK-NEXT: mov r0, r8
3052 ; CHECK-NEXT: mov r1, r7
3053 ; CHECK-NEXT: mov r2, r8
3054 ; CHECK-NEXT: mov r3, r7
3056 ; CHECK-NEXT: movne r4, #0
3057 ; CHECK-NEXT: bl __aeabi_dcmpun
3058 ; CHECK-NEXT: vmov r10, r7, d8
3059 ; CHECK-NEXT: mov r8, r0
3060 ; CHECK-NEXT: cmp r0, #0
3061 ; CHECK-NEXT: mov r2, r6
3062 ; CHECK-NEXT: mov r3, r5
3064 ; CHECK-NEXT: movne.w r8, #1
3065 ; CHECK-NEXT: cmp.w r8, #0
3067 ; CHECK-NEXT: movne r4, #0
3068 ; CHECK-NEXT: str r4, [sp, #4] @ 4-byte Spill
3069 ; CHECK-NEXT: mov r0, r10
3070 ; CHECK-NEXT: mov r1, r7
3071 ; CHECK-NEXT: bl __aeabi_dcmpgt
3072 ; CHECK-NEXT: mov r6, r0
3073 ; CHECK-NEXT: cmp r0, #0
3075 ; CHECK-NEXT: movne r6, #1
3076 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
3077 ; CHECK-NEXT: mov r0, r10
3078 ; CHECK-NEXT: mov r1, r7
3079 ; CHECK-NEXT: bl __aeabi_dcmpge
3080 ; CHECK-NEXT: clz r0, r0
3081 ; CHECK-NEXT: mov r1, r7
3082 ; CHECK-NEXT: lsr.w r9, r0, #5
3083 ; CHECK-NEXT: mov r0, r10
3084 ; CHECK-NEXT: bl __aeabi_d2lz
3085 ; CHECK-NEXT: mov r4, r1
3086 ; CHECK-NEXT: mov r5, r0
3087 ; CHECK-NEXT: cmp.w r9, #0
3089 ; CHECK-NEXT: movne.w r4, #-1
3090 ; CHECK-NEXT: mov r0, r10
3091 ; CHECK-NEXT: mov r1, r7
3092 ; CHECK-NEXT: mov r2, r10
3093 ; CHECK-NEXT: mov r3, r7
3094 ; CHECK-NEXT: cmp r6, #0
3096 ; CHECK-NEXT: movne r4, #0
3097 ; CHECK-NEXT: bl __aeabi_dcmpun
3098 ; CHECK-NEXT: cmp r0, #0
3100 ; CHECK-NEXT: movne r0, #1
3101 ; CHECK-NEXT: cmp r0, #0
3103 ; CHECK-NEXT: movne r4, #0
3104 ; CHECK-NEXT: cmp.w r9, #0
3105 ; CHECK-NEXT: itt ne
3106 ; CHECK-NEXT: movwne r5, #32768
3107 ; CHECK-NEXT: movtne r5, #65535
3108 ; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload
3109 ; CHECK-NEXT: cmp r1, #0
3110 ; CHECK-NEXT: itt ne
3111 ; CHECK-NEXT: movwne r11, #32768
3112 ; CHECK-NEXT: movtne r11, #65535
3113 ; CHECK-NEXT: ldr r1, [sp, #16] @ 4-byte Reload
3114 ; CHECK-NEXT: cmp r1, #0
3116 ; CHECK-NEXT: movwne r11, #32767
3117 ; CHECK-NEXT: cmp.w r8, #0
3119 ; CHECK-NEXT: movne.w r11, #0
3120 ; CHECK-NEXT: cmp r6, #0
3122 ; CHECK-NEXT: movwne r5, #32767
3123 ; CHECK-NEXT: cmp r0, #0
3125 ; CHECK-NEXT: movne r5, #0
3126 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
3127 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r11
3128 ; CHECK-NEXT: vmov q0[3], q0[1], r4, r0
3129 ; CHECK-NEXT: add sp, #24
3130 ; CHECK-NEXT: vpop {d8, d9}
3131 ; CHECK-NEXT: add sp, #4
3132 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
3133 ; CHECK-NEXT: .p2align 3
3134 ; CHECK-NEXT: @ %bb.1:
3135 ; CHECK-NEXT: .LCPI35_0:
3136 ; CHECK-NEXT: .long 0 @ double -32768
3137 ; CHECK-NEXT: .long 3235905536
3138 ; CHECK-NEXT: .LCPI35_1:
3139 ; CHECK-NEXT: .long 0 @ double 32767
3140 ; CHECK-NEXT: .long 1088421824
3141 %x = call <2 x i16> @llvm.fptosi.sat.v2f64.v2i16(<2 x double> %f)
3145 define arm_aapcs_vfpcc <2 x i19> @test_signed_v2f64_v2i19(<2 x double> %f) {
3146 ; CHECK-LABEL: test_signed_v2f64_v2i19:
3148 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3149 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3150 ; CHECK-NEXT: .pad #4
3151 ; CHECK-NEXT: sub sp, #4
3152 ; CHECK-NEXT: .vsave {d8, d9}
3153 ; CHECK-NEXT: vpush {d8, d9}
3154 ; CHECK-NEXT: .pad #16
3155 ; CHECK-NEXT: sub sp, #16
3156 ; CHECK-NEXT: vmov q4, q0
3157 ; CHECK-NEXT: vldr d0, .LCPI36_0
3158 ; CHECK-NEXT: vmov r7, r6, d9
3159 ; CHECK-NEXT: vmov r2, r3, d0
3160 ; CHECK-NEXT: mov r0, r7
3161 ; CHECK-NEXT: mov r1, r6
3162 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
3163 ; CHECK-NEXT: bl __aeabi_dcmpge
3164 ; CHECK-NEXT: mov r4, r0
3165 ; CHECK-NEXT: mov r0, r7
3166 ; CHECK-NEXT: mov r1, r6
3167 ; CHECK-NEXT: bl __aeabi_d2lz
3168 ; CHECK-NEXT: vldr d0, .LCPI36_1
3169 ; CHECK-NEXT: mov r9, r0
3170 ; CHECK-NEXT: vmov r8, r0, d8
3171 ; CHECK-NEXT: vmov r11, r10, d0
3172 ; CHECK-NEXT: str r0, [sp] @ 4-byte Spill
3173 ; CHECK-NEXT: clz r0, r4
3174 ; CHECK-NEXT: lsrs r0, r0, #5
3175 ; CHECK-NEXT: ittt ne
3176 ; CHECK-NEXT: movwne r9, #0
3177 ; CHECK-NEXT: movtne r9, #65532
3178 ; CHECK-NEXT: movne.w r1, #-1
3179 ; CHECK-NEXT: mov r5, r1
3180 ; CHECK-NEXT: mov r0, r7
3181 ; CHECK-NEXT: mov r1, r6
3182 ; CHECK-NEXT: mov r2, r11
3183 ; CHECK-NEXT: mov r3, r10
3184 ; CHECK-NEXT: bl __aeabi_dcmpgt
3185 ; CHECK-NEXT: mov r4, r0
3186 ; CHECK-NEXT: cmp r0, #0
3187 ; CHECK-NEXT: mov r0, r7
3188 ; CHECK-NEXT: mov r1, r6
3189 ; CHECK-NEXT: mov r2, r7
3190 ; CHECK-NEXT: mov r3, r6
3192 ; CHECK-NEXT: movne r4, #1
3193 ; CHECK-NEXT: cmp r4, #0
3195 ; CHECK-NEXT: movne r5, #0
3196 ; CHECK-NEXT: bl __aeabi_dcmpun
3197 ; CHECK-NEXT: mov r6, r0
3198 ; CHECK-NEXT: cmp r0, #0
3200 ; CHECK-NEXT: movne r6, #1
3201 ; CHECK-NEXT: cmp r4, #0
3202 ; CHECK-NEXT: itt ne
3203 ; CHECK-NEXT: movwne r9, #65535
3204 ; CHECK-NEXT: movtne r9, #3
3205 ; CHECK-NEXT: cmp r6, #0
3207 ; CHECK-NEXT: movne r5, #0
3208 ; CHECK-NEXT: ldr r4, [sp] @ 4-byte Reload
3209 ; CHECK-NEXT: mov r0, r8
3210 ; CHECK-NEXT: mov r2, r11
3211 ; CHECK-NEXT: mov r3, r10
3212 ; CHECK-NEXT: str r5, [sp, #4] @ 4-byte Spill
3213 ; CHECK-NEXT: mov r1, r4
3214 ; CHECK-NEXT: bl __aeabi_dcmpgt
3215 ; CHECK-NEXT: mov r5, r0
3216 ; CHECK-NEXT: cmp r0, #0
3218 ; CHECK-NEXT: movne r5, #1
3219 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
3220 ; CHECK-NEXT: mov r0, r8
3221 ; CHECK-NEXT: mov r1, r4
3222 ; CHECK-NEXT: bl __aeabi_dcmpge
3223 ; CHECK-NEXT: clz r0, r0
3224 ; CHECK-NEXT: mov r1, r4
3225 ; CHECK-NEXT: mov r11, r4
3226 ; CHECK-NEXT: lsr.w r10, r0, #5
3227 ; CHECK-NEXT: mov r0, r8
3228 ; CHECK-NEXT: bl __aeabi_d2lz
3229 ; CHECK-NEXT: mov r4, r0
3230 ; CHECK-NEXT: cmp.w r10, #0
3231 ; CHECK-NEXT: mov r7, r1
3232 ; CHECK-NEXT: itt ne
3233 ; CHECK-NEXT: movne r4, #0
3234 ; CHECK-NEXT: movtne r4, #65532
3235 ; CHECK-NEXT: cmp r5, #0
3236 ; CHECK-NEXT: itt ne
3237 ; CHECK-NEXT: movwne r4, #65535
3238 ; CHECK-NEXT: movtne r4, #3
3239 ; CHECK-NEXT: cmp.w r10, #0
3241 ; CHECK-NEXT: movne.w r7, #-1
3242 ; CHECK-NEXT: mov r0, r8
3243 ; CHECK-NEXT: mov r1, r11
3244 ; CHECK-NEXT: mov r2, r8
3245 ; CHECK-NEXT: mov r3, r11
3246 ; CHECK-NEXT: cmp r5, #0
3248 ; CHECK-NEXT: movne r7, #0
3249 ; CHECK-NEXT: bl __aeabi_dcmpun
3250 ; CHECK-NEXT: cmp r0, #0
3252 ; CHECK-NEXT: movne r0, #1
3253 ; CHECK-NEXT: cmp r0, #0
3255 ; CHECK-NEXT: movne r7, #0
3256 ; CHECK-NEXT: cmp r6, #0
3258 ; CHECK-NEXT: movne.w r9, #0
3259 ; CHECK-NEXT: cmp r0, #0
3261 ; CHECK-NEXT: movne r4, #0
3262 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
3263 ; CHECK-NEXT: vmov q0[2], q0[0], r4, r9
3264 ; CHECK-NEXT: vmov q0[3], q0[1], r7, r0
3265 ; CHECK-NEXT: add sp, #16
3266 ; CHECK-NEXT: vpop {d8, d9}
3267 ; CHECK-NEXT: add sp, #4
3268 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
3269 ; CHECK-NEXT: .p2align 3
3270 ; CHECK-NEXT: @ %bb.1:
3271 ; CHECK-NEXT: .LCPI36_0:
3272 ; CHECK-NEXT: .long 0 @ double -262144
3273 ; CHECK-NEXT: .long 3239051264
3274 ; CHECK-NEXT: .LCPI36_1:
3275 ; CHECK-NEXT: .long 0 @ double 262143
3276 ; CHECK-NEXT: .long 1091567608
3277 %x = call <2 x i19> @llvm.fptosi.sat.v2f64.v2i19(<2 x double> %f)
3281 define arm_aapcs_vfpcc <2 x i32> @test_signed_v2f64_v2i32_duplicate(<2 x double> %f) {
3282 ; CHECK-LABEL: test_signed_v2f64_v2i32_duplicate:
3284 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3285 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3286 ; CHECK-NEXT: .pad #4
3287 ; CHECK-NEXT: sub sp, #4
3288 ; CHECK-NEXT: .vsave {d8, d9}
3289 ; CHECK-NEXT: vpush {d8, d9}
3290 ; CHECK-NEXT: .pad #24
3291 ; CHECK-NEXT: sub sp, #24
3292 ; CHECK-NEXT: vmov q4, q0
3293 ; CHECK-NEXT: vldr d0, .LCPI37_0
3294 ; CHECK-NEXT: vmov r8, r7, d9
3295 ; CHECK-NEXT: vmov r2, r3, d0
3296 ; CHECK-NEXT: mov r0, r8
3297 ; CHECK-NEXT: mov r1, r7
3298 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
3299 ; CHECK-NEXT: bl __aeabi_dcmpge
3300 ; CHECK-NEXT: clz r0, r0
3301 ; CHECK-NEXT: vldr d0, .LCPI37_1
3302 ; CHECK-NEXT: mov r1, r7
3303 ; CHECK-NEXT: lsrs r4, r0, #5
3304 ; CHECK-NEXT: mov r0, r8
3305 ; CHECK-NEXT: vmov r6, r5, d0
3306 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
3307 ; CHECK-NEXT: bl __aeabi_d2lz
3308 ; CHECK-NEXT: mov r11, r0
3309 ; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill
3310 ; CHECK-NEXT: mov r0, r8
3311 ; CHECK-NEXT: mov r1, r7
3312 ; CHECK-NEXT: mov r2, r6
3313 ; CHECK-NEXT: mov r3, r5
3314 ; CHECK-NEXT: cmp r4, #0
3316 ; CHECK-NEXT: movne.w r11, #-2147483648
3317 ; CHECK-NEXT: bl __aeabi_dcmpgt
3318 ; CHECK-NEXT: cmp r0, #0
3320 ; CHECK-NEXT: movne r0, #1
3321 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
3322 ; CHECK-NEXT: cmp r0, #0
3323 ; CHECK-NEXT: mov r0, r8
3324 ; CHECK-NEXT: mov r1, r7
3325 ; CHECK-NEXT: mov r2, r8
3326 ; CHECK-NEXT: mov r3, r7
3328 ; CHECK-NEXT: mvnne r11, #-2147483648
3329 ; CHECK-NEXT: bl __aeabi_dcmpun
3330 ; CHECK-NEXT: vmov r10, r7, d8
3331 ; CHECK-NEXT: mov r8, r0
3332 ; CHECK-NEXT: cmp r0, #0
3333 ; CHECK-NEXT: mov r2, r6
3334 ; CHECK-NEXT: mov r3, r5
3336 ; CHECK-NEXT: movne.w r8, #1
3337 ; CHECK-NEXT: cmp.w r8, #0
3339 ; CHECK-NEXT: movne.w r11, #0
3340 ; CHECK-NEXT: mov r0, r10
3341 ; CHECK-NEXT: mov r1, r7
3342 ; CHECK-NEXT: bl __aeabi_dcmpgt
3343 ; CHECK-NEXT: mov r6, r0
3344 ; CHECK-NEXT: cmp r0, #0
3346 ; CHECK-NEXT: movne r6, #1
3347 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
3348 ; CHECK-NEXT: mov r0, r10
3349 ; CHECK-NEXT: mov r1, r7
3350 ; CHECK-NEXT: bl __aeabi_dcmpge
3351 ; CHECK-NEXT: clz r0, r0
3352 ; CHECK-NEXT: mov r1, r7
3353 ; CHECK-NEXT: lsr.w r9, r0, #5
3354 ; CHECK-NEXT: mov r0, r10
3355 ; CHECK-NEXT: bl __aeabi_d2lz
3356 ; CHECK-NEXT: mov r5, r0
3357 ; CHECK-NEXT: mov r4, r1
3358 ; CHECK-NEXT: cmp.w r9, #0
3360 ; CHECK-NEXT: movne.w r5, #-2147483648
3361 ; CHECK-NEXT: mov r0, r10
3362 ; CHECK-NEXT: mov r1, r7
3363 ; CHECK-NEXT: mov r2, r10
3364 ; CHECK-NEXT: mov r3, r7
3365 ; CHECK-NEXT: cmp r6, #0
3367 ; CHECK-NEXT: mvnne r5, #-2147483648
3368 ; CHECK-NEXT: bl __aeabi_dcmpun
3369 ; CHECK-NEXT: cmp r0, #0
3371 ; CHECK-NEXT: movne r0, #1
3372 ; CHECK-NEXT: cmp r0, #0
3374 ; CHECK-NEXT: movne r5, #0
3375 ; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload
3376 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r11
3377 ; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload
3378 ; CHECK-NEXT: cmp r1, #0
3380 ; CHECK-NEXT: movne.w r2, #-1
3381 ; CHECK-NEXT: ldr r1, [sp, #16] @ 4-byte Reload
3382 ; CHECK-NEXT: cmp r1, #0
3384 ; CHECK-NEXT: movne r2, #0
3385 ; CHECK-NEXT: cmp.w r8, #0
3387 ; CHECK-NEXT: movne r2, #0
3388 ; CHECK-NEXT: cmp.w r9, #0
3390 ; CHECK-NEXT: movne.w r4, #-1
3391 ; CHECK-NEXT: cmp r6, #0
3393 ; CHECK-NEXT: movne r4, #0
3394 ; CHECK-NEXT: cmp r0, #0
3396 ; CHECK-NEXT: movne r4, #0
3397 ; CHECK-NEXT: vmov q0[3], q0[1], r4, r2
3398 ; CHECK-NEXT: add sp, #24
3399 ; CHECK-NEXT: vpop {d8, d9}
3400 ; CHECK-NEXT: add sp, #4
3401 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
3402 ; CHECK-NEXT: .p2align 3
3403 ; CHECK-NEXT: @ %bb.1:
3404 ; CHECK-NEXT: .LCPI37_0:
3405 ; CHECK-NEXT: .long 0 @ double -2147483648
3406 ; CHECK-NEXT: .long 3252682752
3407 ; CHECK-NEXT: .LCPI37_1:
3408 ; CHECK-NEXT: .long 4290772992 @ double 2147483647
3409 ; CHECK-NEXT: .long 1105199103
3410 %x = call <2 x i32> @llvm.fptosi.sat.v2f64.v2i32(<2 x double> %f)
3414 define arm_aapcs_vfpcc <2 x i50> @test_signed_v2f64_v2i50(<2 x double> %f) {
3415 ; CHECK-LABEL: test_signed_v2f64_v2i50:
3417 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3418 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3419 ; CHECK-NEXT: .pad #4
3420 ; CHECK-NEXT: sub sp, #4
3421 ; CHECK-NEXT: .vsave {d8, d9}
3422 ; CHECK-NEXT: vpush {d8, d9}
3423 ; CHECK-NEXT: .pad #16
3424 ; CHECK-NEXT: sub sp, #16
3425 ; CHECK-NEXT: vmov q4, q0
3426 ; CHECK-NEXT: vldr d0, .LCPI38_0
3427 ; CHECK-NEXT: vmov r7, r6, d9
3428 ; CHECK-NEXT: vmov r2, r3, d0
3429 ; CHECK-NEXT: mov r0, r7
3430 ; CHECK-NEXT: mov r1, r6
3431 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
3432 ; CHECK-NEXT: bl __aeabi_dcmpge
3433 ; CHECK-NEXT: mov r4, r0
3434 ; CHECK-NEXT: mov r0, r7
3435 ; CHECK-NEXT: mov r1, r6
3436 ; CHECK-NEXT: bl __aeabi_d2lz
3437 ; CHECK-NEXT: vldr d0, .LCPI38_1
3438 ; CHECK-NEXT: mov r9, r0
3439 ; CHECK-NEXT: vmov r8, r0, d8
3440 ; CHECK-NEXT: vmov r11, r10, d0
3441 ; CHECK-NEXT: str r0, [sp] @ 4-byte Spill
3442 ; CHECK-NEXT: clz r0, r4
3443 ; CHECK-NEXT: lsrs r0, r0, #5
3444 ; CHECK-NEXT: itt ne
3445 ; CHECK-NEXT: movne r1, #0
3446 ; CHECK-NEXT: movtne r1, #65534
3447 ; CHECK-NEXT: mov r5, r1
3448 ; CHECK-NEXT: mov r0, r7
3449 ; CHECK-NEXT: mov r1, r6
3450 ; CHECK-NEXT: mov r2, r11
3451 ; CHECK-NEXT: mov r3, r10
3453 ; CHECK-NEXT: movne.w r9, #0
3454 ; CHECK-NEXT: bl __aeabi_dcmpgt
3455 ; CHECK-NEXT: mov r4, r0
3456 ; CHECK-NEXT: cmp r0, #0
3457 ; CHECK-NEXT: mov r0, r7
3458 ; CHECK-NEXT: mov r1, r6
3459 ; CHECK-NEXT: mov r2, r7
3460 ; CHECK-NEXT: mov r3, r6
3462 ; CHECK-NEXT: movne r4, #1
3463 ; CHECK-NEXT: cmp r4, #0
3465 ; CHECK-NEXT: movne.w r9, #-1
3466 ; CHECK-NEXT: bl __aeabi_dcmpun
3467 ; CHECK-NEXT: mov r6, r0
3468 ; CHECK-NEXT: cmp r0, #0
3470 ; CHECK-NEXT: movne r6, #1
3471 ; CHECK-NEXT: cmp r4, #0
3472 ; CHECK-NEXT: itt ne
3473 ; CHECK-NEXT: movwne r5, #65535
3474 ; CHECK-NEXT: movtne r5, #1
3475 ; CHECK-NEXT: str r5, [sp, #4] @ 4-byte Spill
3476 ; CHECK-NEXT: cmp r6, #0
3478 ; CHECK-NEXT: movne.w r9, #0
3479 ; CHECK-NEXT: ldr r4, [sp] @ 4-byte Reload
3480 ; CHECK-NEXT: mov r0, r8
3481 ; CHECK-NEXT: mov r2, r11
3482 ; CHECK-NEXT: mov r3, r10
3483 ; CHECK-NEXT: mov r1, r4
3484 ; CHECK-NEXT: bl __aeabi_dcmpgt
3485 ; CHECK-NEXT: mov r5, r0
3486 ; CHECK-NEXT: cmp r0, #0
3488 ; CHECK-NEXT: movne r5, #1
3489 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
3490 ; CHECK-NEXT: mov r0, r8
3491 ; CHECK-NEXT: mov r1, r4
3492 ; CHECK-NEXT: bl __aeabi_dcmpge
3493 ; CHECK-NEXT: clz r0, r0
3494 ; CHECK-NEXT: mov r1, r4
3495 ; CHECK-NEXT: mov r11, r4
3496 ; CHECK-NEXT: lsr.w r10, r0, #5
3497 ; CHECK-NEXT: mov r0, r8
3498 ; CHECK-NEXT: bl __aeabi_d2lz
3499 ; CHECK-NEXT: mov r7, r1
3500 ; CHECK-NEXT: cmp.w r10, #0
3501 ; CHECK-NEXT: mov r4, r0
3502 ; CHECK-NEXT: itt ne
3503 ; CHECK-NEXT: movne r7, #0
3504 ; CHECK-NEXT: movtne r7, #65534
3505 ; CHECK-NEXT: cmp r5, #0
3506 ; CHECK-NEXT: itt ne
3507 ; CHECK-NEXT: movwne r7, #65535
3508 ; CHECK-NEXT: movtne r7, #1
3509 ; CHECK-NEXT: cmp.w r10, #0
3511 ; CHECK-NEXT: movne r4, #0
3512 ; CHECK-NEXT: mov r0, r8
3513 ; CHECK-NEXT: mov r1, r11
3514 ; CHECK-NEXT: mov r2, r8
3515 ; CHECK-NEXT: mov r3, r11
3516 ; CHECK-NEXT: cmp r5, #0
3518 ; CHECK-NEXT: movne.w r4, #-1
3519 ; CHECK-NEXT: bl __aeabi_dcmpun
3520 ; CHECK-NEXT: cmp r0, #0
3522 ; CHECK-NEXT: movne r0, #1
3523 ; CHECK-NEXT: cmp r0, #0
3525 ; CHECK-NEXT: movne r4, #0
3526 ; CHECK-NEXT: cmp r6, #0
3527 ; CHECK-NEXT: ldr r1, [sp, #4] @ 4-byte Reload
3528 ; CHECK-NEXT: vmov q0[2], q0[0], r4, r9
3530 ; CHECK-NEXT: movne r1, #0
3531 ; CHECK-NEXT: cmp r0, #0
3533 ; CHECK-NEXT: movne r7, #0
3534 ; CHECK-NEXT: vmov q0[3], q0[1], r7, r1
3535 ; CHECK-NEXT: add sp, #16
3536 ; CHECK-NEXT: vpop {d8, d9}
3537 ; CHECK-NEXT: add sp, #4
3538 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
3539 ; CHECK-NEXT: .p2align 3
3540 ; CHECK-NEXT: @ %bb.1:
3541 ; CHECK-NEXT: .LCPI38_0:
3542 ; CHECK-NEXT: .long 0 @ double -562949953421312
3543 ; CHECK-NEXT: .long 3271557120
3544 ; CHECK-NEXT: .LCPI38_1:
3545 ; CHECK-NEXT: .long 4294967280 @ double 562949953421311
3546 ; CHECK-NEXT: .long 1124073471
3547 %x = call <2 x i50> @llvm.fptosi.sat.v2f64.v2i50(<2 x double> %f)
3551 define arm_aapcs_vfpcc <2 x i64> @test_signed_v2f64_v2i64(<2 x double> %f) {
3552 ; CHECK-LABEL: test_signed_v2f64_v2i64:
3554 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3555 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3556 ; CHECK-NEXT: .pad #4
3557 ; CHECK-NEXT: sub sp, #4
3558 ; CHECK-NEXT: .vsave {d8, d9}
3559 ; CHECK-NEXT: vpush {d8, d9}
3560 ; CHECK-NEXT: .pad #24
3561 ; CHECK-NEXT: sub sp, #24
3562 ; CHECK-NEXT: vmov q4, q0
3563 ; CHECK-NEXT: vldr d0, .LCPI39_0
3564 ; CHECK-NEXT: vmov r8, r7, d9
3565 ; CHECK-NEXT: vmov r2, r3, d0
3566 ; CHECK-NEXT: mov r0, r8
3567 ; CHECK-NEXT: mov r1, r7
3568 ; CHECK-NEXT: strd r2, r3, [sp, #8] @ 8-byte Folded Spill
3569 ; CHECK-NEXT: bl __aeabi_dcmpge
3570 ; CHECK-NEXT: clz r0, r0
3571 ; CHECK-NEXT: vldr d0, .LCPI39_1
3572 ; CHECK-NEXT: mov r1, r7
3573 ; CHECK-NEXT: lsrs r4, r0, #5
3574 ; CHECK-NEXT: mov r0, r8
3575 ; CHECK-NEXT: vmov r6, r5, d0
3576 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
3577 ; CHECK-NEXT: bl __aeabi_d2lz
3578 ; CHECK-NEXT: mov r11, r0
3579 ; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill
3580 ; CHECK-NEXT: mov r0, r8
3581 ; CHECK-NEXT: mov r1, r7
3582 ; CHECK-NEXT: mov r2, r6
3583 ; CHECK-NEXT: mov r3, r5
3584 ; CHECK-NEXT: cmp r4, #0
3586 ; CHECK-NEXT: movne.w r11, #0
3587 ; CHECK-NEXT: bl __aeabi_dcmpgt
3588 ; CHECK-NEXT: cmp r0, #0
3590 ; CHECK-NEXT: movne r0, #1
3591 ; CHECK-NEXT: str r0, [sp, #16] @ 4-byte Spill
3592 ; CHECK-NEXT: cmp r0, #0
3593 ; CHECK-NEXT: mov r0, r8
3594 ; CHECK-NEXT: mov r1, r7
3595 ; CHECK-NEXT: mov r2, r8
3596 ; CHECK-NEXT: mov r3, r7
3598 ; CHECK-NEXT: movne.w r11, #-1
3599 ; CHECK-NEXT: bl __aeabi_dcmpun
3600 ; CHECK-NEXT: vmov r10, r7, d8
3601 ; CHECK-NEXT: mov r8, r0
3602 ; CHECK-NEXT: cmp r0, #0
3603 ; CHECK-NEXT: mov r2, r6
3604 ; CHECK-NEXT: mov r3, r5
3606 ; CHECK-NEXT: movne.w r8, #1
3607 ; CHECK-NEXT: cmp.w r8, #0
3609 ; CHECK-NEXT: movne.w r11, #0
3610 ; CHECK-NEXT: mov r0, r10
3611 ; CHECK-NEXT: mov r1, r7
3612 ; CHECK-NEXT: bl __aeabi_dcmpgt
3613 ; CHECK-NEXT: mov r6, r0
3614 ; CHECK-NEXT: cmp r0, #0
3616 ; CHECK-NEXT: movne r6, #1
3617 ; CHECK-NEXT: ldrd r2, r3, [sp, #8] @ 8-byte Folded Reload
3618 ; CHECK-NEXT: mov r0, r10
3619 ; CHECK-NEXT: mov r1, r7
3620 ; CHECK-NEXT: bl __aeabi_dcmpge
3621 ; CHECK-NEXT: clz r0, r0
3622 ; CHECK-NEXT: mov r1, r7
3623 ; CHECK-NEXT: lsr.w r9, r0, #5
3624 ; CHECK-NEXT: mov r0, r10
3625 ; CHECK-NEXT: bl __aeabi_d2lz
3626 ; CHECK-NEXT: mov r5, r0
3627 ; CHECK-NEXT: mov r4, r1
3628 ; CHECK-NEXT: cmp.w r9, #0
3630 ; CHECK-NEXT: movne r5, #0
3631 ; CHECK-NEXT: mov r0, r10
3632 ; CHECK-NEXT: mov r1, r7
3633 ; CHECK-NEXT: mov r2, r10
3634 ; CHECK-NEXT: mov r3, r7
3635 ; CHECK-NEXT: cmp r6, #0
3637 ; CHECK-NEXT: movne.w r5, #-1
3638 ; CHECK-NEXT: bl __aeabi_dcmpun
3639 ; CHECK-NEXT: cmp r0, #0
3641 ; CHECK-NEXT: movne r0, #1
3642 ; CHECK-NEXT: cmp r0, #0
3644 ; CHECK-NEXT: movne r5, #0
3645 ; CHECK-NEXT: ldr r1, [sp, #20] @ 4-byte Reload
3646 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r11
3647 ; CHECK-NEXT: ldr r2, [sp, #4] @ 4-byte Reload
3648 ; CHECK-NEXT: cmp r1, #0
3650 ; CHECK-NEXT: movne.w r2, #-2147483648
3651 ; CHECK-NEXT: ldr r1, [sp, #16] @ 4-byte Reload
3652 ; CHECK-NEXT: cmp r1, #0
3654 ; CHECK-NEXT: mvnne r2, #-2147483648
3655 ; CHECK-NEXT: cmp.w r8, #0
3657 ; CHECK-NEXT: movne r2, #0
3658 ; CHECK-NEXT: cmp.w r9, #0
3660 ; CHECK-NEXT: movne.w r4, #-2147483648
3661 ; CHECK-NEXT: cmp r6, #0
3663 ; CHECK-NEXT: mvnne r4, #-2147483648
3664 ; CHECK-NEXT: cmp r0, #0
3666 ; CHECK-NEXT: movne r4, #0
3667 ; CHECK-NEXT: vmov q0[3], q0[1], r4, r2
3668 ; CHECK-NEXT: add sp, #24
3669 ; CHECK-NEXT: vpop {d8, d9}
3670 ; CHECK-NEXT: add sp, #4
3671 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
3672 ; CHECK-NEXT: .p2align 3
3673 ; CHECK-NEXT: @ %bb.1:
3674 ; CHECK-NEXT: .LCPI39_0:
3675 ; CHECK-NEXT: .long 0 @ double -9.2233720368547758E+18
3676 ; CHECK-NEXT: .long 3286237184
3677 ; CHECK-NEXT: .LCPI39_1:
3678 ; CHECK-NEXT: .long 4294967295 @ double 9.2233720368547748E+18
3679 ; CHECK-NEXT: .long 1138753535
3680 %x = call <2 x i64> @llvm.fptosi.sat.v2f64.v2i64(<2 x double> %f)
3684 define arm_aapcs_vfpcc <2 x i100> @test_signed_v2f64_v2i100(<2 x double> %f) {
3685 ; CHECK-LABEL: test_signed_v2f64_v2i100:
3687 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3688 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3689 ; CHECK-NEXT: .pad #4
3690 ; CHECK-NEXT: sub sp, #4
3691 ; CHECK-NEXT: .vsave {d8, d9}
3692 ; CHECK-NEXT: vpush {d8, d9}
3693 ; CHECK-NEXT: .pad #48
3694 ; CHECK-NEXT: sub sp, #48
3695 ; CHECK-NEXT: vmov q4, q0
3696 ; CHECK-NEXT: vldr d0, .LCPI40_0
3697 ; CHECK-NEXT: vmov r6, r5, d8
3698 ; CHECK-NEXT: mov r11, r0
3699 ; CHECK-NEXT: vmov r9, r8, d0
3700 ; CHECK-NEXT: str.w r8, [sp, #28] @ 4-byte Spill
3701 ; CHECK-NEXT: mov r0, r6
3702 ; CHECK-NEXT: mov r1, r5
3703 ; CHECK-NEXT: mov r2, r9
3704 ; CHECK-NEXT: mov r3, r8
3705 ; CHECK-NEXT: bl __aeabi_dcmpgt
3706 ; CHECK-NEXT: vldr d0, .LCPI40_1
3707 ; CHECK-NEXT: mov r10, r0
3708 ; CHECK-NEXT: mov r0, r6
3709 ; CHECK-NEXT: mov r1, r5
3710 ; CHECK-NEXT: vmov r7, r3, d0
3711 ; CHECK-NEXT: str r3, [sp, #32] @ 4-byte Spill
3712 ; CHECK-NEXT: mov r2, r7
3713 ; CHECK-NEXT: bl __aeabi_dcmpge
3714 ; CHECK-NEXT: mov r4, r0
3715 ; CHECK-NEXT: mov r0, r6
3716 ; CHECK-NEXT: mov r1, r5
3717 ; CHECK-NEXT: bl __fixdfti
3718 ; CHECK-NEXT: cmp r4, #0
3719 ; CHECK-NEXT: strd r1, r0, [sp, #8] @ 8-byte Folded Spill
3720 ; CHECK-NEXT: csel r4, r2, r4, ne
3721 ; CHECK-NEXT: str r3, [sp, #24] @ 4-byte Spill
3722 ; CHECK-NEXT: mov r0, r6
3723 ; CHECK-NEXT: mov r1, r5
3724 ; CHECK-NEXT: mov r2, r6
3725 ; CHECK-NEXT: mov r3, r5
3726 ; CHECK-NEXT: cmp.w r10, #0
3728 ; CHECK-NEXT: movne.w r4, #-1
3729 ; CHECK-NEXT: bl __aeabi_dcmpun
3730 ; CHECK-NEXT: cmp r0, #0
3731 ; CHECK-NEXT: mov r0, r6
3732 ; CHECK-NEXT: mov r1, r5
3733 ; CHECK-NEXT: mov r2, r9
3734 ; CHECK-NEXT: mov r3, r8
3736 ; CHECK-NEXT: movne r4, #0
3737 ; CHECK-NEXT: str.w r11, [sp, #44] @ 4-byte Spill
3738 ; CHECK-NEXT: str.w r4, [r11, #8]
3739 ; CHECK-NEXT: str.w r9, [sp, #40] @ 4-byte Spill
3740 ; CHECK-NEXT: bl __aeabi_dcmpgt
3741 ; CHECK-NEXT: ldr r4, [sp, #32] @ 4-byte Reload
3742 ; CHECK-NEXT: mov r8, r0
3743 ; CHECK-NEXT: mov r0, r6
3744 ; CHECK-NEXT: mov r1, r5
3745 ; CHECK-NEXT: mov r2, r7
3746 ; CHECK-NEXT: mov r10, r7
3747 ; CHECK-NEXT: mov r3, r4
3748 ; CHECK-NEXT: bl __aeabi_dcmpge
3749 ; CHECK-NEXT: ldr r1, [sp, #8] @ 4-byte Reload
3750 ; CHECK-NEXT: cmp r0, #0
3751 ; CHECK-NEXT: mov r2, r6
3752 ; CHECK-NEXT: mov r3, r5
3753 ; CHECK-NEXT: csel r7, r1, r0, ne
3754 ; CHECK-NEXT: mov r0, r6
3755 ; CHECK-NEXT: mov r1, r5
3756 ; CHECK-NEXT: cmp.w r8, #0
3758 ; CHECK-NEXT: movne.w r7, #-1
3759 ; CHECK-NEXT: bl __aeabi_dcmpun
3760 ; CHECK-NEXT: cmp r0, #0
3762 ; CHECK-NEXT: movne r7, #0
3763 ; CHECK-NEXT: str.w r7, [r11, #4]
3764 ; CHECK-NEXT: mov r0, r6
3765 ; CHECK-NEXT: ldr.w r11, [sp, #28] @ 4-byte Reload
3766 ; CHECK-NEXT: mov r1, r5
3767 ; CHECK-NEXT: mov r2, r9
3768 ; CHECK-NEXT: mov r3, r11
3769 ; CHECK-NEXT: bl __aeabi_dcmpgt
3770 ; CHECK-NEXT: mov r9, r0
3771 ; CHECK-NEXT: mov r0, r6
3772 ; CHECK-NEXT: mov r1, r5
3773 ; CHECK-NEXT: mov r2, r10
3774 ; CHECK-NEXT: mov r3, r4
3775 ; CHECK-NEXT: str.w r10, [sp, #36] @ 4-byte Spill
3776 ; CHECK-NEXT: bl __aeabi_dcmpge
3777 ; CHECK-NEXT: ldr r1, [sp, #12] @ 4-byte Reload
3778 ; CHECK-NEXT: cmp r0, #0
3779 ; CHECK-NEXT: mov r2, r6
3780 ; CHECK-NEXT: mov r3, r5
3781 ; CHECK-NEXT: csel r7, r1, r0, ne
3782 ; CHECK-NEXT: mov r0, r6
3783 ; CHECK-NEXT: mov r1, r5
3784 ; CHECK-NEXT: cmp.w r9, #0
3786 ; CHECK-NEXT: movne.w r7, #-1
3787 ; CHECK-NEXT: str r6, [sp, #16] @ 4-byte Spill
3788 ; CHECK-NEXT: str r5, [sp, #20] @ 4-byte Spill
3789 ; CHECK-NEXT: bl __aeabi_dcmpun
3790 ; CHECK-NEXT: vmov r9, r8, d9
3791 ; CHECK-NEXT: cmp r0, #0
3793 ; CHECK-NEXT: movne r7, #0
3794 ; CHECK-NEXT: ldr r0, [sp, #44] @ 4-byte Reload
3795 ; CHECK-NEXT: mov r3, r11
3796 ; CHECK-NEXT: mov r5, r11
3797 ; CHECK-NEXT: str r7, [r0]
3798 ; CHECK-NEXT: ldr r7, [sp, #40] @ 4-byte Reload
3799 ; CHECK-NEXT: mov r2, r7
3800 ; CHECK-NEXT: mov r0, r9
3801 ; CHECK-NEXT: mov r1, r8
3802 ; CHECK-NEXT: bl __aeabi_dcmpgt
3803 ; CHECK-NEXT: ldr r4, [sp, #32] @ 4-byte Reload
3804 ; CHECK-NEXT: mov r6, r0
3805 ; CHECK-NEXT: mov r0, r9
3806 ; CHECK-NEXT: mov r1, r8
3807 ; CHECK-NEXT: mov r2, r10
3808 ; CHECK-NEXT: mov r3, r4
3809 ; CHECK-NEXT: bl __aeabi_dcmpge
3810 ; CHECK-NEXT: mov r11, r0
3811 ; CHECK-NEXT: mov r0, r9
3812 ; CHECK-NEXT: mov r1, r8
3813 ; CHECK-NEXT: bl __fixdfti
3814 ; CHECK-NEXT: cmp.w r11, #0
3815 ; CHECK-NEXT: strd r2, r0, [sp, #4] @ 8-byte Folded Spill
3816 ; CHECK-NEXT: csel r10, r1, r11, ne
3817 ; CHECK-NEXT: str r3, [sp, #12] @ 4-byte Spill
3818 ; CHECK-NEXT: mov r0, r9
3819 ; CHECK-NEXT: mov r1, r8
3820 ; CHECK-NEXT: mov r2, r9
3821 ; CHECK-NEXT: mov r3, r8
3822 ; CHECK-NEXT: cmp r6, #0
3824 ; CHECK-NEXT: movne.w r10, #-1
3825 ; CHECK-NEXT: bl __aeabi_dcmpun
3826 ; CHECK-NEXT: cmp r0, #0
3827 ; CHECK-NEXT: mov r0, r9
3828 ; CHECK-NEXT: mov r1, r8
3829 ; CHECK-NEXT: mov r2, r7
3830 ; CHECK-NEXT: mov r3, r5
3832 ; CHECK-NEXT: movne.w r10, #0
3833 ; CHECK-NEXT: bl __aeabi_dcmpgt
3834 ; CHECK-NEXT: ldr r6, [sp, #36] @ 4-byte Reload
3835 ; CHECK-NEXT: mov r11, r0
3836 ; CHECK-NEXT: mov r0, r9
3837 ; CHECK-NEXT: mov r1, r8
3838 ; CHECK-NEXT: mov r3, r4
3839 ; CHECK-NEXT: mov r2, r6
3840 ; CHECK-NEXT: bl __aeabi_dcmpge
3841 ; CHECK-NEXT: ldr r1, [sp, #4] @ 4-byte Reload
3842 ; CHECK-NEXT: cmp r0, #0
3843 ; CHECK-NEXT: mov r2, r9
3844 ; CHECK-NEXT: mov r3, r8
3845 ; CHECK-NEXT: csel r4, r1, r0, ne
3846 ; CHECK-NEXT: mov r0, r9
3847 ; CHECK-NEXT: mov r1, r8
3848 ; CHECK-NEXT: cmp.w r11, #0
3850 ; CHECK-NEXT: movne.w r4, #-1
3851 ; CHECK-NEXT: bl __aeabi_dcmpun
3852 ; CHECK-NEXT: cmp r0, #0
3854 ; CHECK-NEXT: movne r4, #0
3855 ; CHECK-NEXT: ldr r1, [sp, #44] @ 4-byte Reload
3856 ; CHECK-NEXT: lsr.w r0, r10, #28
3857 ; CHECK-NEXT: orr.w r0, r0, r4, lsl #4
3858 ; CHECK-NEXT: mov r2, r7
3859 ; CHECK-NEXT: mov r3, r5
3860 ; CHECK-NEXT: mov r7, r5
3861 ; CHECK-NEXT: str r0, [r1, #20]
3862 ; CHECK-NEXT: mov r0, r9
3863 ; CHECK-NEXT: mov r1, r8
3864 ; CHECK-NEXT: bl __aeabi_dcmpgt
3865 ; CHECK-NEXT: mov r2, r6
3866 ; CHECK-NEXT: ldr r6, [sp, #32] @ 4-byte Reload
3867 ; CHECK-NEXT: mov r5, r0
3868 ; CHECK-NEXT: mov r0, r9
3869 ; CHECK-NEXT: mov r1, r8
3870 ; CHECK-NEXT: mov r3, r6
3871 ; CHECK-NEXT: bl __aeabi_dcmpge
3872 ; CHECK-NEXT: ldr r1, [sp, #8] @ 4-byte Reload
3873 ; CHECK-NEXT: cmp r0, #0
3874 ; CHECK-NEXT: mov r2, r9
3875 ; CHECK-NEXT: mov r3, r8
3876 ; CHECK-NEXT: csel r11, r1, r0, ne
3877 ; CHECK-NEXT: mov r0, r9
3878 ; CHECK-NEXT: mov r1, r8
3879 ; CHECK-NEXT: cmp r5, #0
3881 ; CHECK-NEXT: movne.w r11, #-1
3882 ; CHECK-NEXT: bl __aeabi_dcmpun
3883 ; CHECK-NEXT: cmp r0, #0
3885 ; CHECK-NEXT: movne.w r11, #0
3886 ; CHECK-NEXT: ldr r5, [sp, #44] @ 4-byte Reload
3887 ; CHECK-NEXT: lsr.w r0, r11, #28
3888 ; CHECK-NEXT: orr.w r0, r0, r10, lsl #4
3889 ; CHECK-NEXT: mov r1, r8
3890 ; CHECK-NEXT: mov r3, r7
3891 ; CHECK-NEXT: str r0, [r5, #16]
3892 ; CHECK-NEXT: mov r0, r9
3893 ; CHECK-NEXT: ldr r2, [sp, #40] @ 4-byte Reload
3894 ; CHECK-NEXT: bl __aeabi_dcmpgt
3895 ; CHECK-NEXT: ldr r2, [sp, #36] @ 4-byte Reload
3896 ; CHECK-NEXT: mov r7, r0
3897 ; CHECK-NEXT: mov r0, r9
3898 ; CHECK-NEXT: mov r1, r8
3899 ; CHECK-NEXT: mov r3, r6
3900 ; CHECK-NEXT: mov r10, r6
3901 ; CHECK-NEXT: bl __aeabi_dcmpge
3902 ; CHECK-NEXT: cmp r0, #0
3903 ; CHECK-NEXT: ldr r0, [sp, #12] @ 4-byte Reload
3905 ; CHECK-NEXT: mvneq r0, #7
3906 ; CHECK-NEXT: cmp r7, #0
3908 ; CHECK-NEXT: movne r0, #7
3909 ; CHECK-NEXT: mov r6, r0
3910 ; CHECK-NEXT: mov r0, r9
3911 ; CHECK-NEXT: mov r1, r8
3912 ; CHECK-NEXT: mov r2, r9
3913 ; CHECK-NEXT: mov r3, r8
3914 ; CHECK-NEXT: bl __aeabi_dcmpun
3915 ; CHECK-NEXT: cmp r0, #0
3916 ; CHECK-NEXT: lsr.w r0, r4, #28
3918 ; CHECK-NEXT: movne r6, #0
3919 ; CHECK-NEXT: orr.w r0, r0, r6, lsl #4
3920 ; CHECK-NEXT: strb r0, [r5, #24]
3921 ; CHECK-NEXT: ldr r7, [sp, #16] @ 4-byte Reload
3922 ; CHECK-NEXT: ldr r4, [sp, #20] @ 4-byte Reload
3923 ; CHECK-NEXT: ldr r2, [sp, #40] @ 4-byte Reload
3924 ; CHECK-NEXT: ldr r3, [sp, #28] @ 4-byte Reload
3925 ; CHECK-NEXT: mov r0, r7
3926 ; CHECK-NEXT: mov r1, r4
3927 ; CHECK-NEXT: bl __aeabi_dcmpgt
3928 ; CHECK-NEXT: ldr r2, [sp, #36] @ 4-byte Reload
3929 ; CHECK-NEXT: mov r8, r0
3930 ; CHECK-NEXT: mov r0, r7
3931 ; CHECK-NEXT: mov r1, r4
3932 ; CHECK-NEXT: mov r3, r10
3933 ; CHECK-NEXT: mov r6, r4
3934 ; CHECK-NEXT: bl __aeabi_dcmpge
3935 ; CHECK-NEXT: cmp r0, #0
3936 ; CHECK-NEXT: ldr r0, [sp, #24] @ 4-byte Reload
3938 ; CHECK-NEXT: mvneq r0, #7
3939 ; CHECK-NEXT: cmp.w r8, #0
3941 ; CHECK-NEXT: movne r0, #7
3942 ; CHECK-NEXT: mov r4, r0
3943 ; CHECK-NEXT: mov r0, r7
3944 ; CHECK-NEXT: mov r1, r6
3945 ; CHECK-NEXT: mov r2, r7
3946 ; CHECK-NEXT: mov r3, r6
3947 ; CHECK-NEXT: bl __aeabi_dcmpun
3948 ; CHECK-NEXT: cmp r0, #0
3950 ; CHECK-NEXT: movne r4, #0
3951 ; CHECK-NEXT: and r0, r4, #15
3952 ; CHECK-NEXT: orr.w r0, r0, r11, lsl #4
3953 ; CHECK-NEXT: str r0, [r5, #12]
3954 ; CHECK-NEXT: add sp, #48
3955 ; CHECK-NEXT: vpop {d8, d9}
3956 ; CHECK-NEXT: add sp, #4
3957 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
3958 ; CHECK-NEXT: .p2align 3
3959 ; CHECK-NEXT: @ %bb.1:
3960 ; CHECK-NEXT: .LCPI40_0:
3961 ; CHECK-NEXT: .long 4294967295 @ double 6.3382530011411463E+29
3962 ; CHECK-NEXT: .long 1176502271
3963 ; CHECK-NEXT: .LCPI40_1:
3964 ; CHECK-NEXT: .long 0 @ double -6.338253001141147E+29
3965 ; CHECK-NEXT: .long 3323985920
3966 %x = call <2 x i100> @llvm.fptosi.sat.v2f64.v2i100(<2 x double> %f)
3970 define arm_aapcs_vfpcc <2 x i128> @test_signed_v2f64_v2i128(<2 x double> %f) {
3971 ; CHECK-LABEL: test_signed_v2f64_v2i128:
3973 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3974 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
3975 ; CHECK-NEXT: .pad #4
3976 ; CHECK-NEXT: sub sp, #4
3977 ; CHECK-NEXT: .vsave {d8, d9}
3978 ; CHECK-NEXT: vpush {d8, d9}
3979 ; CHECK-NEXT: .pad #32
3980 ; CHECK-NEXT: sub sp, #32
3981 ; CHECK-NEXT: vmov q4, q0
3982 ; CHECK-NEXT: vldr d0, .LCPI41_0
3983 ; CHECK-NEXT: vmov r8, r7, d9
3984 ; CHECK-NEXT: mov r6, r0
3985 ; CHECK-NEXT: vmov r2, r3, d0
3986 ; CHECK-NEXT: str r0, [sp, #12] @ 4-byte Spill
3987 ; CHECK-NEXT: str r2, [sp, #28] @ 4-byte Spill
3988 ; CHECK-NEXT: mov r0, r8
3989 ; CHECK-NEXT: mov r1, r7
3990 ; CHECK-NEXT: mov r11, r3
3991 ; CHECK-NEXT: bl __aeabi_dcmpgt
3992 ; CHECK-NEXT: vldr d0, .LCPI41_1
3993 ; CHECK-NEXT: mov r5, r0
3994 ; CHECK-NEXT: mov r0, r8
3995 ; CHECK-NEXT: mov r1, r7
3996 ; CHECK-NEXT: vmov r4, r3, d0
3997 ; CHECK-NEXT: str r3, [sp, #24] @ 4-byte Spill
3998 ; CHECK-NEXT: mov r2, r4
3999 ; CHECK-NEXT: bl __aeabi_dcmpge
4000 ; CHECK-NEXT: mov r9, r0
4001 ; CHECK-NEXT: mov r0, r8
4002 ; CHECK-NEXT: mov r1, r7
4003 ; CHECK-NEXT: bl __fixdfti
4004 ; CHECK-NEXT: mov r10, r3
4005 ; CHECK-NEXT: strd r2, r1, [sp] @ 8-byte Folded Spill
4006 ; CHECK-NEXT: str r0, [sp, #8] @ 4-byte Spill
4007 ; CHECK-NEXT: cmp.w r9, #0
4009 ; CHECK-NEXT: moveq.w r10, #-2147483648
4010 ; CHECK-NEXT: mov r0, r8
4011 ; CHECK-NEXT: mov r1, r7
4012 ; CHECK-NEXT: mov r2, r8
4013 ; CHECK-NEXT: mov r3, r7
4014 ; CHECK-NEXT: cmp r5, #0
4016 ; CHECK-NEXT: mvnne r10, #-2147483648
4017 ; CHECK-NEXT: bl __aeabi_dcmpun
4018 ; CHECK-NEXT: cmp r0, #0
4020 ; CHECK-NEXT: movne.w r10, #0
4021 ; CHECK-NEXT: str.w r10, [r6, #28]
4022 ; CHECK-NEXT: mov r0, r8
4023 ; CHECK-NEXT: ldr.w r9, [sp, #28] @ 4-byte Reload
4024 ; CHECK-NEXT: mov r1, r7
4025 ; CHECK-NEXT: mov r3, r11
4026 ; CHECK-NEXT: mov r5, r11
4027 ; CHECK-NEXT: str.w r11, [sp, #16] @ 4-byte Spill
4028 ; CHECK-NEXT: mov r2, r9
4029 ; CHECK-NEXT: bl __aeabi_dcmpgt
4030 ; CHECK-NEXT: ldr.w r10, [sp, #24] @ 4-byte Reload
4031 ; CHECK-NEXT: mov r6, r0
4032 ; CHECK-NEXT: mov r0, r8
4033 ; CHECK-NEXT: mov r1, r7
4034 ; CHECK-NEXT: mov r2, r4
4035 ; CHECK-NEXT: mov r11, r4
4036 ; CHECK-NEXT: mov r3, r10
4037 ; CHECK-NEXT: str r4, [sp, #20] @ 4-byte Spill
4038 ; CHECK-NEXT: bl __aeabi_dcmpge
4039 ; CHECK-NEXT: ldr r1, [sp] @ 4-byte Reload
4040 ; CHECK-NEXT: cmp r0, #0
4041 ; CHECK-NEXT: mov r2, r8
4042 ; CHECK-NEXT: mov r3, r7
4043 ; CHECK-NEXT: csel r4, r1, r0, ne
4044 ; CHECK-NEXT: mov r0, r8
4045 ; CHECK-NEXT: mov r1, r7
4046 ; CHECK-NEXT: cmp r6, #0
4048 ; CHECK-NEXT: movne.w r4, #-1
4049 ; CHECK-NEXT: bl __aeabi_dcmpun
4050 ; CHECK-NEXT: cmp r0, #0
4052 ; CHECK-NEXT: movne r4, #0
4053 ; CHECK-NEXT: ldr r6, [sp, #12] @ 4-byte Reload
4054 ; CHECK-NEXT: mov r0, r8
4055 ; CHECK-NEXT: mov r1, r7
4056 ; CHECK-NEXT: mov r2, r9
4057 ; CHECK-NEXT: mov r3, r5
4058 ; CHECK-NEXT: str r4, [r6, #24]
4059 ; CHECK-NEXT: bl __aeabi_dcmpgt
4060 ; CHECK-NEXT: mov r5, r0
4061 ; CHECK-NEXT: mov r0, r8
4062 ; CHECK-NEXT: mov r1, r7
4063 ; CHECK-NEXT: mov r2, r11
4064 ; CHECK-NEXT: mov r3, r10
4065 ; CHECK-NEXT: bl __aeabi_dcmpge
4066 ; CHECK-NEXT: ldr r1, [sp, #4] @ 4-byte Reload
4067 ; CHECK-NEXT: cmp r0, #0
4068 ; CHECK-NEXT: mov r2, r8
4069 ; CHECK-NEXT: mov r3, r7
4070 ; CHECK-NEXT: csel r4, r1, r0, ne
4071 ; CHECK-NEXT: mov r0, r8
4072 ; CHECK-NEXT: mov r1, r7
4073 ; CHECK-NEXT: cmp r5, #0
4075 ; CHECK-NEXT: movne.w r4, #-1
4076 ; CHECK-NEXT: bl __aeabi_dcmpun
4077 ; CHECK-NEXT: cmp r0, #0
4079 ; CHECK-NEXT: movne r4, #0
4080 ; CHECK-NEXT: str r4, [r6, #20]
4081 ; CHECK-NEXT: mov r0, r8
4082 ; CHECK-NEXT: ldr.w r10, [sp, #16] @ 4-byte Reload
4083 ; CHECK-NEXT: mov r1, r7
4084 ; CHECK-NEXT: mov r2, r9
4085 ; CHECK-NEXT: mov r11, r6
4086 ; CHECK-NEXT: mov r3, r10
4087 ; CHECK-NEXT: bl __aeabi_dcmpgt
4088 ; CHECK-NEXT: ldrd r2, r3, [sp, #20] @ 8-byte Folded Reload
4089 ; CHECK-NEXT: mov r9, r0
4090 ; CHECK-NEXT: mov r0, r8
4091 ; CHECK-NEXT: mov r1, r7
4092 ; CHECK-NEXT: bl __aeabi_dcmpge
4093 ; CHECK-NEXT: ldr r1, [sp, #8] @ 4-byte Reload
4094 ; CHECK-NEXT: cmp r0, #0
4095 ; CHECK-NEXT: mov r2, r8
4096 ; CHECK-NEXT: mov r3, r7
4097 ; CHECK-NEXT: csel r4, r1, r0, ne
4098 ; CHECK-NEXT: mov r0, r8
4099 ; CHECK-NEXT: mov r1, r7
4100 ; CHECK-NEXT: cmp.w r9, #0
4101 ; CHECK-NEXT: vmov r6, r5, d8
4103 ; CHECK-NEXT: movne.w r4, #-1
4104 ; CHECK-NEXT: bl __aeabi_dcmpun
4105 ; CHECK-NEXT: cmp r0, #0
4107 ; CHECK-NEXT: movne r4, #0
4108 ; CHECK-NEXT: str.w r4, [r11, #16]
4109 ; CHECK-NEXT: mov r0, r6
4110 ; CHECK-NEXT: ldr r7, [sp, #28] @ 4-byte Reload
4111 ; CHECK-NEXT: mov r1, r5
4112 ; CHECK-NEXT: mov r3, r10
4113 ; CHECK-NEXT: mov r2, r7
4114 ; CHECK-NEXT: bl __aeabi_dcmpgt
4115 ; CHECK-NEXT: ldr.w r9, [sp, #20] @ 4-byte Reload
4116 ; CHECK-NEXT: mov r10, r0
4117 ; CHECK-NEXT: ldr.w r8, [sp, #24] @ 4-byte Reload
4118 ; CHECK-NEXT: mov r0, r6
4119 ; CHECK-NEXT: mov r1, r5
4120 ; CHECK-NEXT: mov r2, r9
4121 ; CHECK-NEXT: mov r3, r8
4122 ; CHECK-NEXT: bl __aeabi_dcmpge
4123 ; CHECK-NEXT: mov r11, r0
4124 ; CHECK-NEXT: mov r0, r6
4125 ; CHECK-NEXT: mov r1, r5
4126 ; CHECK-NEXT: bl __fixdfti
4127 ; CHECK-NEXT: mov r4, r3
4128 ; CHECK-NEXT: strd r2, r1, [sp] @ 8-byte Folded Spill
4129 ; CHECK-NEXT: str r0, [sp, #8] @ 4-byte Spill
4130 ; CHECK-NEXT: cmp.w r11, #0
4132 ; CHECK-NEXT: moveq.w r4, #-2147483648
4133 ; CHECK-NEXT: mov r0, r6
4134 ; CHECK-NEXT: mov r1, r5
4135 ; CHECK-NEXT: mov r2, r6
4136 ; CHECK-NEXT: mov r3, r5
4137 ; CHECK-NEXT: cmp.w r10, #0
4139 ; CHECK-NEXT: mvnne r4, #-2147483648
4140 ; CHECK-NEXT: bl __aeabi_dcmpun
4141 ; CHECK-NEXT: cmp r0, #0
4143 ; CHECK-NEXT: movne r4, #0
4144 ; CHECK-NEXT: ldr.w r10, [sp, #12] @ 4-byte Reload
4145 ; CHECK-NEXT: mov r0, r6
4146 ; CHECK-NEXT: mov r1, r5
4147 ; CHECK-NEXT: mov r2, r7
4148 ; CHECK-NEXT: str.w r4, [r10, #12]
4149 ; CHECK-NEXT: ldr.w r11, [sp, #16] @ 4-byte Reload
4150 ; CHECK-NEXT: mov r3, r11
4151 ; CHECK-NEXT: bl __aeabi_dcmpgt
4152 ; CHECK-NEXT: mov r4, r0
4153 ; CHECK-NEXT: mov r0, r6
4154 ; CHECK-NEXT: mov r1, r5
4155 ; CHECK-NEXT: mov r2, r9
4156 ; CHECK-NEXT: mov r3, r8
4157 ; CHECK-NEXT: bl __aeabi_dcmpge
4158 ; CHECK-NEXT: ldr r1, [sp] @ 4-byte Reload
4159 ; CHECK-NEXT: cmp r0, #0
4160 ; CHECK-NEXT: mov r2, r6
4161 ; CHECK-NEXT: mov r3, r5
4162 ; CHECK-NEXT: csel r7, r1, r0, ne
4163 ; CHECK-NEXT: mov r0, r6
4164 ; CHECK-NEXT: mov r1, r5
4165 ; CHECK-NEXT: cmp r4, #0
4167 ; CHECK-NEXT: movne.w r7, #-1
4168 ; CHECK-NEXT: bl __aeabi_dcmpun
4169 ; CHECK-NEXT: cmp r0, #0
4171 ; CHECK-NEXT: movne r7, #0
4172 ; CHECK-NEXT: str.w r7, [r10, #8]
4173 ; CHECK-NEXT: mov r0, r6
4174 ; CHECK-NEXT: ldr r2, [sp, #28] @ 4-byte Reload
4175 ; CHECK-NEXT: mov r1, r5
4176 ; CHECK-NEXT: mov r3, r11
4177 ; CHECK-NEXT: bl __aeabi_dcmpgt
4178 ; CHECK-NEXT: mov r4, r0
4179 ; CHECK-NEXT: mov r0, r6
4180 ; CHECK-NEXT: mov r1, r5
4181 ; CHECK-NEXT: mov r2, r9
4182 ; CHECK-NEXT: mov r3, r8
4183 ; CHECK-NEXT: bl __aeabi_dcmpge
4184 ; CHECK-NEXT: ldr r1, [sp, #4] @ 4-byte Reload
4185 ; CHECK-NEXT: cmp r0, #0
4186 ; CHECK-NEXT: mov r2, r6
4187 ; CHECK-NEXT: mov r3, r5
4188 ; CHECK-NEXT: csel r7, r1, r0, ne
4189 ; CHECK-NEXT: mov r0, r6
4190 ; CHECK-NEXT: mov r1, r5
4191 ; CHECK-NEXT: cmp r4, #0
4193 ; CHECK-NEXT: movne.w r7, #-1
4194 ; CHECK-NEXT: bl __aeabi_dcmpun
4195 ; CHECK-NEXT: cmp r0, #0
4197 ; CHECK-NEXT: movne r7, #0
4198 ; CHECK-NEXT: str.w r7, [r10, #4]
4199 ; CHECK-NEXT: mov r0, r6
4200 ; CHECK-NEXT: ldr r2, [sp, #28] @ 4-byte Reload
4201 ; CHECK-NEXT: mov r1, r5
4202 ; CHECK-NEXT: mov r3, r11
4203 ; CHECK-NEXT: bl __aeabi_dcmpgt
4204 ; CHECK-NEXT: mov r4, r0
4205 ; CHECK-NEXT: mov r0, r6
4206 ; CHECK-NEXT: mov r1, r5
4207 ; CHECK-NEXT: mov r2, r9
4208 ; CHECK-NEXT: mov r3, r8
4209 ; CHECK-NEXT: bl __aeabi_dcmpge
4210 ; CHECK-NEXT: ldr r1, [sp, #8] @ 4-byte Reload
4211 ; CHECK-NEXT: cmp r0, #0
4212 ; CHECK-NEXT: mov r2, r6
4213 ; CHECK-NEXT: mov r3, r5
4214 ; CHECK-NEXT: csel r7, r1, r0, ne
4215 ; CHECK-NEXT: mov r0, r6
4216 ; CHECK-NEXT: mov r1, r5
4217 ; CHECK-NEXT: cmp r4, #0
4219 ; CHECK-NEXT: movne.w r7, #-1
4220 ; CHECK-NEXT: bl __aeabi_dcmpun
4221 ; CHECK-NEXT: cmp r0, #0
4223 ; CHECK-NEXT: movne r7, #0
4224 ; CHECK-NEXT: str.w r7, [r10]
4225 ; CHECK-NEXT: add sp, #32
4226 ; CHECK-NEXT: vpop {d8, d9}
4227 ; CHECK-NEXT: add sp, #4
4228 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
4229 ; CHECK-NEXT: .p2align 3
4230 ; CHECK-NEXT: @ %bb.1:
4231 ; CHECK-NEXT: .LCPI41_0:
4232 ; CHECK-NEXT: .long 4294967295 @ double 1.7014118346046921E+38
4233 ; CHECK-NEXT: .long 1205862399
4234 ; CHECK-NEXT: .LCPI41_1:
4235 ; CHECK-NEXT: .long 0 @ double -1.7014118346046923E+38
4236 ; CHECK-NEXT: .long 3353346048
4237 %x = call <2 x i128> @llvm.fptosi.sat.v2f64.v2i128(<2 x double> %f)
4242 ; 4-Vector half to signed integer -- result size variation
4245 declare <8 x i1> @llvm.fptosi.sat.v8f16.v8i1 (<8 x half>)
4246 declare <8 x i8> @llvm.fptosi.sat.v8f16.v8i8 (<8 x half>)
4247 declare <8 x i13> @llvm.fptosi.sat.v8f16.v8i13 (<8 x half>)
4248 declare <8 x i16> @llvm.fptosi.sat.v8f16.v8i16 (<8 x half>)
4249 declare <8 x i19> @llvm.fptosi.sat.v8f16.v8i19 (<8 x half>)
4250 declare <8 x i50> @llvm.fptosi.sat.v8f16.v8i50 (<8 x half>)
4251 declare <8 x i64> @llvm.fptosi.sat.v8f16.v8i64 (<8 x half>)
4252 declare <8 x i100> @llvm.fptosi.sat.v8f16.v8i100(<8 x half>)
4253 declare <8 x i128> @llvm.fptosi.sat.v8f16.v8i128(<8 x half>)
4255 define arm_aapcs_vfpcc <8 x i1> @test_signed_v8f16_v8i1(<8 x half> %f) {
4256 ; CHECK-LABEL: test_signed_v8f16_v8i1:
4258 ; CHECK-NEXT: .vsave {d8}
4259 ; CHECK-NEXT: vpush {d8}
4260 ; CHECK-NEXT: vcvtb.f32.f16 s15, s0
4261 ; CHECK-NEXT: vmov.f32 s5, #-1.000000e+00
4262 ; CHECK-NEXT: vldr s7, .LCPI42_0
4263 ; CHECK-NEXT: vmaxnm.f32 s16, s15, s5
4264 ; CHECK-NEXT: vcvtt.f32.f16 s12, s2
4265 ; CHECK-NEXT: vcvtt.f32.f16 s9, s1
4266 ; CHECK-NEXT: vminnm.f32 s16, s16, s7
4267 ; CHECK-NEXT: vcvtt.f32.f16 s4, s3
4268 ; CHECK-NEXT: vcvt.s32.f32 s16, s16
4269 ; CHECK-NEXT: vcvtb.f32.f16 s8, s3
4270 ; CHECK-NEXT: vcvtb.f32.f16 s2, s2
4271 ; CHECK-NEXT: vcvtb.f32.f16 s1, s1
4272 ; CHECK-NEXT: vcvtt.f32.f16 s0, s0
4273 ; CHECK-NEXT: vmaxnm.f32 s6, s4, s5
4274 ; CHECK-NEXT: vmaxnm.f32 s10, s8, s5
4275 ; CHECK-NEXT: vmaxnm.f32 s14, s12, s5
4276 ; CHECK-NEXT: vmaxnm.f32 s3, s2, s5
4277 ; CHECK-NEXT: vmaxnm.f32 s11, s9, s5
4278 ; CHECK-NEXT: vmaxnm.f32 s13, s1, s5
4279 ; CHECK-NEXT: vmaxnm.f32 s5, s0, s5
4280 ; CHECK-NEXT: vminnm.f32 s5, s5, s7
4281 ; CHECK-NEXT: vminnm.f32 s13, s13, s7
4282 ; CHECK-NEXT: vcvt.s32.f32 s5, s5
4283 ; CHECK-NEXT: movs r1, #0
4284 ; CHECK-NEXT: vcmp.f32 s15, s15
4285 ; CHECK-NEXT: vminnm.f32 s11, s11, s7
4286 ; CHECK-NEXT: vmov r2, s16
4287 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4289 ; CHECK-NEXT: movvs r2, #0
4290 ; CHECK-NEXT: vcvt.s32.f32 s13, s13
4291 ; CHECK-NEXT: and r2, r2, #1
4292 ; CHECK-NEXT: vcmp.f32 s0, s0
4293 ; CHECK-NEXT: rsbs r2, r2, #0
4294 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4295 ; CHECK-NEXT: bfi r1, r2, #0, #1
4296 ; CHECK-NEXT: vcvt.s32.f32 s11, s11
4297 ; CHECK-NEXT: vmov r2, s5
4298 ; CHECK-NEXT: vminnm.f32 s3, s3, s7
4300 ; CHECK-NEXT: movvs r2, #0
4301 ; CHECK-NEXT: vcmp.f32 s1, s1
4302 ; CHECK-NEXT: and r2, r2, #1
4303 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4304 ; CHECK-NEXT: rsb.w r2, r2, #0
4305 ; CHECK-NEXT: vcvt.s32.f32 s3, s3
4306 ; CHECK-NEXT: bfi r1, r2, #1, #1
4307 ; CHECK-NEXT: vmov r2, s13
4309 ; CHECK-NEXT: movvs r2, #0
4310 ; CHECK-NEXT: vminnm.f32 s14, s14, s7
4311 ; CHECK-NEXT: and r2, r2, #1
4312 ; CHECK-NEXT: vcmp.f32 s9, s9
4313 ; CHECK-NEXT: rsbs r2, r2, #0
4314 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4315 ; CHECK-NEXT: bfi r1, r2, #2, #1
4316 ; CHECK-NEXT: vmov r2, s11
4318 ; CHECK-NEXT: movvs r2, #0
4319 ; CHECK-NEXT: vcvt.s32.f32 s14, s14
4320 ; CHECK-NEXT: and r2, r2, #1
4321 ; CHECK-NEXT: vminnm.f32 s10, s10, s7
4322 ; CHECK-NEXT: rsbs r2, r2, #0
4323 ; CHECK-NEXT: vcmp.f32 s2, s2
4324 ; CHECK-NEXT: bfi r1, r2, #3, #1
4325 ; CHECK-NEXT: vmov r2, s3
4326 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4328 ; CHECK-NEXT: movvs r2, #0
4329 ; CHECK-NEXT: vcvt.s32.f32 s10, s10
4330 ; CHECK-NEXT: and r2, r2, #1
4331 ; CHECK-NEXT: rsbs r2, r2, #0
4332 ; CHECK-NEXT: vminnm.f32 s6, s6, s7
4333 ; CHECK-NEXT: bfi r1, r2, #4, #1
4334 ; CHECK-NEXT: vcmp.f32 s12, s12
4335 ; CHECK-NEXT: vmov r2, s14
4336 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4338 ; CHECK-NEXT: movvs r2, #0
4339 ; CHECK-NEXT: vcvt.s32.f32 s6, s6
4340 ; CHECK-NEXT: and r2, r2, #1
4341 ; CHECK-NEXT: vcmp.f32 s8, s8
4342 ; CHECK-NEXT: rsbs r2, r2, #0
4343 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4344 ; CHECK-NEXT: bfi r1, r2, #5, #1
4345 ; CHECK-NEXT: vmov r2, s10
4347 ; CHECK-NEXT: movvs r2, #0
4348 ; CHECK-NEXT: vcmp.f32 s4, s4
4349 ; CHECK-NEXT: and r2, r2, #1
4350 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4351 ; CHECK-NEXT: rsb.w r2, r2, #0
4352 ; CHECK-NEXT: bfi r1, r2, #6, #1
4353 ; CHECK-NEXT: vmov r2, s6
4355 ; CHECK-NEXT: movvs r2, #0
4356 ; CHECK-NEXT: and r2, r2, #1
4357 ; CHECK-NEXT: rsbs r2, r2, #0
4358 ; CHECK-NEXT: bfi r1, r2, #7, #1
4359 ; CHECK-NEXT: strb r1, [r0]
4360 ; CHECK-NEXT: vpop {d8}
4362 ; CHECK-NEXT: .p2align 2
4363 ; CHECK-NEXT: @ %bb.1:
4364 ; CHECK-NEXT: .LCPI42_0:
4365 ; CHECK-NEXT: .long 0x00000000 @ float 0
4366 %x = call <8 x i1> @llvm.fptosi.sat.v8f16.v8i1(<8 x half> %f)
4370 define arm_aapcs_vfpcc <8 x i8> @test_signed_v8f16_v8i8(<8 x half> %f) {
4371 ; CHECK-MVE-LABEL: test_signed_v8f16_v8i8:
4372 ; CHECK-MVE: @ %bb.0:
4373 ; CHECK-MVE-NEXT: .save {r4, r5, r7, lr}
4374 ; CHECK-MVE-NEXT: push {r4, r5, r7, lr}
4375 ; CHECK-MVE-NEXT: .vsave {d8}
4376 ; CHECK-MVE-NEXT: vpush {d8}
4377 ; CHECK-MVE-NEXT: vldr s8, .LCPI43_1
4378 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s13, s3
4379 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s3, s3
4380 ; CHECK-MVE-NEXT: vldr s6, .LCPI43_0
4381 ; CHECK-MVE-NEXT: vmaxnm.f32 s16, s3, s8
4382 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s4, s0
4383 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s12, s1
4384 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s7, s2
4385 ; CHECK-MVE-NEXT: vmaxnm.f32 s15, s13, s8
4386 ; CHECK-MVE-NEXT: vminnm.f32 s16, s16, s6
4387 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s0, s0
4388 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s1, s1
4389 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s2, s2
4390 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s4, s8
4391 ; CHECK-MVE-NEXT: vmaxnm.f32 s14, s12, s8
4392 ; CHECK-MVE-NEXT: vmaxnm.f32 s5, s0, s8
4393 ; CHECK-MVE-NEXT: vmaxnm.f32 s9, s7, s8
4394 ; CHECK-MVE-NEXT: vmaxnm.f32 s11, s1, s8
4395 ; CHECK-MVE-NEXT: vminnm.f32 s15, s15, s6
4396 ; CHECK-MVE-NEXT: vcvt.s32.f32 s16, s16
4397 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s2, s8
4398 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
4399 ; CHECK-MVE-NEXT: vminnm.f32 s14, s14, s6
4400 ; CHECK-MVE-NEXT: vminnm.f32 s5, s5, s6
4401 ; CHECK-MVE-NEXT: vminnm.f32 s9, s9, s6
4402 ; CHECK-MVE-NEXT: vminnm.f32 s11, s11, s6
4403 ; CHECK-MVE-NEXT: vminnm.f32 s6, s8, s6
4404 ; CHECK-MVE-NEXT: vcvt.s32.f32 s15, s15
4405 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s6
4406 ; CHECK-MVE-NEXT: vcvt.s32.f32 s9, s9
4407 ; CHECK-MVE-NEXT: vcvt.s32.f32 s11, s11
4408 ; CHECK-MVE-NEXT: vcvt.s32.f32 s14, s14
4409 ; CHECK-MVE-NEXT: vcvt.s32.f32 s5, s5
4410 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
4411 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
4412 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4413 ; CHECK-MVE-NEXT: vmov r12, s16
4414 ; CHECK-MVE-NEXT: vcmp.f32 s13, s13
4415 ; CHECK-MVE-NEXT: it vs
4416 ; CHECK-MVE-NEXT: movvs.w r12, #0
4417 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4418 ; CHECK-MVE-NEXT: vmov lr, s15
4419 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
4420 ; CHECK-MVE-NEXT: it vs
4421 ; CHECK-MVE-NEXT: movvs.w lr, #0
4422 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4423 ; CHECK-MVE-NEXT: vmov r2, s6
4424 ; CHECK-MVE-NEXT: vcmp.f32 s7, s7
4425 ; CHECK-MVE-NEXT: it vs
4426 ; CHECK-MVE-NEXT: movvs r2, #0
4427 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4428 ; CHECK-MVE-NEXT: vmov r3, s9
4429 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
4430 ; CHECK-MVE-NEXT: it vs
4431 ; CHECK-MVE-NEXT: movvs r3, #0
4432 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4433 ; CHECK-MVE-NEXT: vmov r0, s11
4434 ; CHECK-MVE-NEXT: vcmp.f32 s12, s12
4435 ; CHECK-MVE-NEXT: it vs
4436 ; CHECK-MVE-NEXT: movvs r0, #0
4437 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4438 ; CHECK-MVE-NEXT: vmov r1, s14
4439 ; CHECK-MVE-NEXT: vmov r4, s5
4440 ; CHECK-MVE-NEXT: it vs
4441 ; CHECK-MVE-NEXT: movvs r1, #0
4442 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
4443 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4444 ; CHECK-MVE-NEXT: it vs
4445 ; CHECK-MVE-NEXT: movvs r4, #0
4446 ; CHECK-MVE-NEXT: vcmp.f32 s4, s4
4447 ; CHECK-MVE-NEXT: vmov.16 q0[0], r4
4448 ; CHECK-MVE-NEXT: vmov r5, s10
4449 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4450 ; CHECK-MVE-NEXT: it vs
4451 ; CHECK-MVE-NEXT: movvs r5, #0
4452 ; CHECK-MVE-NEXT: vmov.16 q0[1], r5
4453 ; CHECK-MVE-NEXT: vmov.16 q0[2], r0
4454 ; CHECK-MVE-NEXT: vmov.16 q0[3], r1
4455 ; CHECK-MVE-NEXT: vmov.16 q0[4], r2
4456 ; CHECK-MVE-NEXT: vmov.16 q0[5], r3
4457 ; CHECK-MVE-NEXT: vmov.16 q0[6], r12
4458 ; CHECK-MVE-NEXT: vmov.16 q0[7], lr
4459 ; CHECK-MVE-NEXT: vpop {d8}
4460 ; CHECK-MVE-NEXT: pop {r4, r5, r7, pc}
4461 ; CHECK-MVE-NEXT: .p2align 2
4462 ; CHECK-MVE-NEXT: @ %bb.1:
4463 ; CHECK-MVE-NEXT: .LCPI43_0:
4464 ; CHECK-MVE-NEXT: .long 0x42fe0000 @ float 127
4465 ; CHECK-MVE-NEXT: .LCPI43_1:
4466 ; CHECK-MVE-NEXT: .long 0xc3000000 @ float -128
4468 ; CHECK-MVEFP-LABEL: test_signed_v8f16_v8i8:
4469 ; CHECK-MVEFP: @ %bb.0:
4470 ; CHECK-MVEFP-NEXT: vcvt.s16.f16 q0, q0
4471 ; CHECK-MVEFP-NEXT: vqmovnb.s16 q0, q0
4472 ; CHECK-MVEFP-NEXT: vmovlb.s8 q0, q0
4473 ; CHECK-MVEFP-NEXT: bx lr
4474 %x = call <8 x i8> @llvm.fptosi.sat.v8f16.v8i8(<8 x half> %f)
4478 define arm_aapcs_vfpcc <8 x i13> @test_signed_v8f16_v8i13(<8 x half> %f) {
4479 ; CHECK-MVE-LABEL: test_signed_v8f16_v8i13:
4480 ; CHECK-MVE: @ %bb.0:
4481 ; CHECK-MVE-NEXT: .save {r4, r5, r7, lr}
4482 ; CHECK-MVE-NEXT: push {r4, r5, r7, lr}
4483 ; CHECK-MVE-NEXT: .vsave {d8}
4484 ; CHECK-MVE-NEXT: vpush {d8}
4485 ; CHECK-MVE-NEXT: vldr s8, .LCPI44_1
4486 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s13, s3
4487 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s3, s3
4488 ; CHECK-MVE-NEXT: vldr s6, .LCPI44_0
4489 ; CHECK-MVE-NEXT: vmaxnm.f32 s16, s3, s8
4490 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s4, s0
4491 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s12, s1
4492 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s7, s2
4493 ; CHECK-MVE-NEXT: vmaxnm.f32 s15, s13, s8
4494 ; CHECK-MVE-NEXT: vminnm.f32 s16, s16, s6
4495 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s0, s0
4496 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s1, s1
4497 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s2, s2
4498 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s4, s8
4499 ; CHECK-MVE-NEXT: vmaxnm.f32 s14, s12, s8
4500 ; CHECK-MVE-NEXT: vmaxnm.f32 s5, s0, s8
4501 ; CHECK-MVE-NEXT: vmaxnm.f32 s9, s7, s8
4502 ; CHECK-MVE-NEXT: vmaxnm.f32 s11, s1, s8
4503 ; CHECK-MVE-NEXT: vminnm.f32 s15, s15, s6
4504 ; CHECK-MVE-NEXT: vcvt.s32.f32 s16, s16
4505 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s2, s8
4506 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
4507 ; CHECK-MVE-NEXT: vminnm.f32 s14, s14, s6
4508 ; CHECK-MVE-NEXT: vminnm.f32 s5, s5, s6
4509 ; CHECK-MVE-NEXT: vminnm.f32 s9, s9, s6
4510 ; CHECK-MVE-NEXT: vminnm.f32 s11, s11, s6
4511 ; CHECK-MVE-NEXT: vminnm.f32 s6, s8, s6
4512 ; CHECK-MVE-NEXT: vcvt.s32.f32 s15, s15
4513 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s6
4514 ; CHECK-MVE-NEXT: vcvt.s32.f32 s9, s9
4515 ; CHECK-MVE-NEXT: vcvt.s32.f32 s11, s11
4516 ; CHECK-MVE-NEXT: vcvt.s32.f32 s14, s14
4517 ; CHECK-MVE-NEXT: vcvt.s32.f32 s5, s5
4518 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
4519 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
4520 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4521 ; CHECK-MVE-NEXT: vmov r12, s16
4522 ; CHECK-MVE-NEXT: vcmp.f32 s13, s13
4523 ; CHECK-MVE-NEXT: it vs
4524 ; CHECK-MVE-NEXT: movvs.w r12, #0
4525 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4526 ; CHECK-MVE-NEXT: vmov lr, s15
4527 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
4528 ; CHECK-MVE-NEXT: it vs
4529 ; CHECK-MVE-NEXT: movvs.w lr, #0
4530 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4531 ; CHECK-MVE-NEXT: vmov r2, s6
4532 ; CHECK-MVE-NEXT: vcmp.f32 s7, s7
4533 ; CHECK-MVE-NEXT: it vs
4534 ; CHECK-MVE-NEXT: movvs r2, #0
4535 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4536 ; CHECK-MVE-NEXT: vmov r3, s9
4537 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
4538 ; CHECK-MVE-NEXT: it vs
4539 ; CHECK-MVE-NEXT: movvs r3, #0
4540 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4541 ; CHECK-MVE-NEXT: vmov r0, s11
4542 ; CHECK-MVE-NEXT: vcmp.f32 s12, s12
4543 ; CHECK-MVE-NEXT: it vs
4544 ; CHECK-MVE-NEXT: movvs r0, #0
4545 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4546 ; CHECK-MVE-NEXT: vmov r1, s14
4547 ; CHECK-MVE-NEXT: vmov r4, s5
4548 ; CHECK-MVE-NEXT: it vs
4549 ; CHECK-MVE-NEXT: movvs r1, #0
4550 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
4551 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4552 ; CHECK-MVE-NEXT: it vs
4553 ; CHECK-MVE-NEXT: movvs r4, #0
4554 ; CHECK-MVE-NEXT: vcmp.f32 s4, s4
4555 ; CHECK-MVE-NEXT: vmov.16 q0[0], r4
4556 ; CHECK-MVE-NEXT: vmov r5, s10
4557 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4558 ; CHECK-MVE-NEXT: it vs
4559 ; CHECK-MVE-NEXT: movvs r5, #0
4560 ; CHECK-MVE-NEXT: vmov.16 q0[1], r5
4561 ; CHECK-MVE-NEXT: vmov.16 q0[2], r0
4562 ; CHECK-MVE-NEXT: vmov.16 q0[3], r1
4563 ; CHECK-MVE-NEXT: vmov.16 q0[4], r2
4564 ; CHECK-MVE-NEXT: vmov.16 q0[5], r3
4565 ; CHECK-MVE-NEXT: vmov.16 q0[6], r12
4566 ; CHECK-MVE-NEXT: vmov.16 q0[7], lr
4567 ; CHECK-MVE-NEXT: vpop {d8}
4568 ; CHECK-MVE-NEXT: pop {r4, r5, r7, pc}
4569 ; CHECK-MVE-NEXT: .p2align 2
4570 ; CHECK-MVE-NEXT: @ %bb.1:
4571 ; CHECK-MVE-NEXT: .LCPI44_0:
4572 ; CHECK-MVE-NEXT: .long 0x457ff000 @ float 4095
4573 ; CHECK-MVE-NEXT: .LCPI44_1:
4574 ; CHECK-MVE-NEXT: .long 0xc5800000 @ float -4096
4576 ; CHECK-MVEFP-LABEL: test_signed_v8f16_v8i13:
4577 ; CHECK-MVEFP: @ %bb.0:
4578 ; CHECK-MVEFP-NEXT: vmvn.i16 q1, #0xf000
4579 ; CHECK-MVEFP-NEXT: vcvt.s16.f16 q0, q0
4580 ; CHECK-MVEFP-NEXT: vmov.i16 q2, #0xf000
4581 ; CHECK-MVEFP-NEXT: vmin.s16 q0, q0, q1
4582 ; CHECK-MVEFP-NEXT: vmax.s16 q0, q0, q2
4583 ; CHECK-MVEFP-NEXT: bx lr
4584 %x = call <8 x i13> @llvm.fptosi.sat.v8f16.v8i13(<8 x half> %f)
4588 define arm_aapcs_vfpcc <8 x i16> @test_signed_v8f16_v8i16(<8 x half> %f) {
4589 ; CHECK-MVE-LABEL: test_signed_v8f16_v8i16:
4590 ; CHECK-MVE: @ %bb.0:
4591 ; CHECK-MVE-NEXT: .save {r4, r5, r7, lr}
4592 ; CHECK-MVE-NEXT: push {r4, r5, r7, lr}
4593 ; CHECK-MVE-NEXT: .vsave {d8}
4594 ; CHECK-MVE-NEXT: vpush {d8}
4595 ; CHECK-MVE-NEXT: vldr s8, .LCPI45_1
4596 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s13, s3
4597 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s3, s3
4598 ; CHECK-MVE-NEXT: vldr s6, .LCPI45_0
4599 ; CHECK-MVE-NEXT: vmaxnm.f32 s16, s3, s8
4600 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s4, s0
4601 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s12, s1
4602 ; CHECK-MVE-NEXT: vcvtt.f32.f16 s7, s2
4603 ; CHECK-MVE-NEXT: vmaxnm.f32 s15, s13, s8
4604 ; CHECK-MVE-NEXT: vminnm.f32 s16, s16, s6
4605 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s0, s0
4606 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s1, s1
4607 ; CHECK-MVE-NEXT: vcvtb.f32.f16 s2, s2
4608 ; CHECK-MVE-NEXT: vmaxnm.f32 s10, s4, s8
4609 ; CHECK-MVE-NEXT: vmaxnm.f32 s14, s12, s8
4610 ; CHECK-MVE-NEXT: vmaxnm.f32 s5, s0, s8
4611 ; CHECK-MVE-NEXT: vmaxnm.f32 s9, s7, s8
4612 ; CHECK-MVE-NEXT: vmaxnm.f32 s11, s1, s8
4613 ; CHECK-MVE-NEXT: vminnm.f32 s15, s15, s6
4614 ; CHECK-MVE-NEXT: vcvt.s32.f32 s16, s16
4615 ; CHECK-MVE-NEXT: vmaxnm.f32 s8, s2, s8
4616 ; CHECK-MVE-NEXT: vminnm.f32 s10, s10, s6
4617 ; CHECK-MVE-NEXT: vminnm.f32 s14, s14, s6
4618 ; CHECK-MVE-NEXT: vminnm.f32 s5, s5, s6
4619 ; CHECK-MVE-NEXT: vminnm.f32 s9, s9, s6
4620 ; CHECK-MVE-NEXT: vminnm.f32 s11, s11, s6
4621 ; CHECK-MVE-NEXT: vminnm.f32 s6, s8, s6
4622 ; CHECK-MVE-NEXT: vcvt.s32.f32 s15, s15
4623 ; CHECK-MVE-NEXT: vcvt.s32.f32 s6, s6
4624 ; CHECK-MVE-NEXT: vcvt.s32.f32 s9, s9
4625 ; CHECK-MVE-NEXT: vcvt.s32.f32 s11, s11
4626 ; CHECK-MVE-NEXT: vcvt.s32.f32 s14, s14
4627 ; CHECK-MVE-NEXT: vcvt.s32.f32 s5, s5
4628 ; CHECK-MVE-NEXT: vcvt.s32.f32 s10, s10
4629 ; CHECK-MVE-NEXT: vcmp.f32 s3, s3
4630 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4631 ; CHECK-MVE-NEXT: vmov r12, s16
4632 ; CHECK-MVE-NEXT: vcmp.f32 s13, s13
4633 ; CHECK-MVE-NEXT: it vs
4634 ; CHECK-MVE-NEXT: movvs.w r12, #0
4635 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4636 ; CHECK-MVE-NEXT: vmov lr, s15
4637 ; CHECK-MVE-NEXT: vcmp.f32 s2, s2
4638 ; CHECK-MVE-NEXT: it vs
4639 ; CHECK-MVE-NEXT: movvs.w lr, #0
4640 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4641 ; CHECK-MVE-NEXT: vmov r2, s6
4642 ; CHECK-MVE-NEXT: vcmp.f32 s7, s7
4643 ; CHECK-MVE-NEXT: it vs
4644 ; CHECK-MVE-NEXT: movvs r2, #0
4645 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4646 ; CHECK-MVE-NEXT: vmov r3, s9
4647 ; CHECK-MVE-NEXT: vcmp.f32 s1, s1
4648 ; CHECK-MVE-NEXT: it vs
4649 ; CHECK-MVE-NEXT: movvs r3, #0
4650 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4651 ; CHECK-MVE-NEXT: vmov r0, s11
4652 ; CHECK-MVE-NEXT: vcmp.f32 s12, s12
4653 ; CHECK-MVE-NEXT: it vs
4654 ; CHECK-MVE-NEXT: movvs r0, #0
4655 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4656 ; CHECK-MVE-NEXT: vmov r1, s14
4657 ; CHECK-MVE-NEXT: vmov r4, s5
4658 ; CHECK-MVE-NEXT: it vs
4659 ; CHECK-MVE-NEXT: movvs r1, #0
4660 ; CHECK-MVE-NEXT: vcmp.f32 s0, s0
4661 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4662 ; CHECK-MVE-NEXT: it vs
4663 ; CHECK-MVE-NEXT: movvs r4, #0
4664 ; CHECK-MVE-NEXT: vcmp.f32 s4, s4
4665 ; CHECK-MVE-NEXT: vmov.16 q0[0], r4
4666 ; CHECK-MVE-NEXT: vmov r5, s10
4667 ; CHECK-MVE-NEXT: vmrs APSR_nzcv, fpscr
4668 ; CHECK-MVE-NEXT: it vs
4669 ; CHECK-MVE-NEXT: movvs r5, #0
4670 ; CHECK-MVE-NEXT: vmov.16 q0[1], r5
4671 ; CHECK-MVE-NEXT: vmov.16 q0[2], r0
4672 ; CHECK-MVE-NEXT: vmov.16 q0[3], r1
4673 ; CHECK-MVE-NEXT: vmov.16 q0[4], r2
4674 ; CHECK-MVE-NEXT: vmov.16 q0[5], r3
4675 ; CHECK-MVE-NEXT: vmov.16 q0[6], r12
4676 ; CHECK-MVE-NEXT: vmov.16 q0[7], lr
4677 ; CHECK-MVE-NEXT: vpop {d8}
4678 ; CHECK-MVE-NEXT: pop {r4, r5, r7, pc}
4679 ; CHECK-MVE-NEXT: .p2align 2
4680 ; CHECK-MVE-NEXT: @ %bb.1:
4681 ; CHECK-MVE-NEXT: .LCPI45_0:
4682 ; CHECK-MVE-NEXT: .long 0x46fffe00 @ float 32767
4683 ; CHECK-MVE-NEXT: .LCPI45_1:
4684 ; CHECK-MVE-NEXT: .long 0xc7000000 @ float -32768
4686 ; CHECK-MVEFP-LABEL: test_signed_v8f16_v8i16:
4687 ; CHECK-MVEFP: @ %bb.0:
4688 ; CHECK-MVEFP-NEXT: vcvt.s16.f16 q0, q0
4689 ; CHECK-MVEFP-NEXT: bx lr
4690 %x = call <8 x i16> @llvm.fptosi.sat.v8f16.v8i16(<8 x half> %f)
4694 define arm_aapcs_vfpcc <8 x i19> @test_signed_v8f16_v8i19(<8 x half> %f) {
4695 ; CHECK-LABEL: test_signed_v8f16_v8i19:
4697 ; CHECK-NEXT: .save {r7, lr}
4698 ; CHECK-NEXT: push {r7, lr}
4699 ; CHECK-NEXT: .vsave {d8}
4700 ; CHECK-NEXT: vpush {d8}
4701 ; CHECK-NEXT: vldr s12, .LCPI46_0
4702 ; CHECK-NEXT: vcvtt.f32.f16 s15, s3
4703 ; CHECK-NEXT: vldr s14, .LCPI46_1
4704 ; CHECK-NEXT: vcvtb.f32.f16 s7, s0
4705 ; CHECK-NEXT: vmaxnm.f32 s16, s15, s12
4706 ; CHECK-NEXT: vcvtb.f32.f16 s4, s1
4707 ; CHECK-NEXT: vcvtt.f32.f16 s8, s1
4708 ; CHECK-NEXT: vcvtb.f32.f16 s1, s2
4709 ; CHECK-NEXT: vcvtt.f32.f16 s0, s0
4710 ; CHECK-NEXT: vcvtt.f32.f16 s2, s2
4711 ; CHECK-NEXT: vcvtb.f32.f16 s3, s3
4712 ; CHECK-NEXT: vmaxnm.f32 s6, s4, s12
4713 ; CHECK-NEXT: vmaxnm.f32 s10, s8, s12
4714 ; CHECK-NEXT: vmaxnm.f32 s5, s1, s12
4715 ; CHECK-NEXT: vmaxnm.f32 s9, s7, s12
4716 ; CHECK-NEXT: vmaxnm.f32 s11, s0, s12
4717 ; CHECK-NEXT: vmaxnm.f32 s13, s2, s12
4718 ; CHECK-NEXT: vminnm.f32 s16, s16, s14
4719 ; CHECK-NEXT: vmaxnm.f32 s12, s3, s12
4720 ; CHECK-NEXT: vcvt.s32.f32 s16, s16
4721 ; CHECK-NEXT: vminnm.f32 s12, s12, s14
4722 ; CHECK-NEXT: vminnm.f32 s13, s13, s14
4723 ; CHECK-NEXT: vcvt.s32.f32 s12, s12
4724 ; CHECK-NEXT: vminnm.f32 s9, s9, s14
4725 ; CHECK-NEXT: vcvt.s32.f32 s13, s13
4726 ; CHECK-NEXT: vminnm.f32 s11, s11, s14
4727 ; CHECK-NEXT: vcvt.s32.f32 s11, s11
4728 ; CHECK-NEXT: vminnm.f32 s5, s5, s14
4729 ; CHECK-NEXT: vcvt.s32.f32 s9, s9
4730 ; CHECK-NEXT: vminnm.f32 s10, s10, s14
4731 ; CHECK-NEXT: vcmp.f32 s15, s15
4732 ; CHECK-NEXT: vminnm.f32 s6, s6, s14
4733 ; CHECK-NEXT: vmov r1, s16
4734 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4736 ; CHECK-NEXT: movvs r1, #0
4737 ; CHECK-NEXT: lsrs r2, r1, #11
4738 ; CHECK-NEXT: vcmp.f32 s3, s3
4739 ; CHECK-NEXT: strb r2, [r0, #18]
4740 ; CHECK-NEXT: vmov r3, s12
4741 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4743 ; CHECK-NEXT: movvs r3, #0
4744 ; CHECK-NEXT: ubfx r2, r3, #14, #5
4745 ; CHECK-NEXT: vcvt.s32.f32 s5, s5
4746 ; CHECK-NEXT: orr.w r1, r2, r1, lsl #5
4747 ; CHECK-NEXT: vcmp.f32 s2, s2
4748 ; CHECK-NEXT: strh r1, [r0, #16]
4749 ; CHECK-NEXT: vmov lr, s13
4750 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4752 ; CHECK-NEXT: movvs.w lr, #0
4753 ; CHECK-NEXT: ubfx r1, lr, #1, #18
4754 ; CHECK-NEXT: vcmp.f32 s0, s0
4755 ; CHECK-NEXT: orr.w r1, r1, r3, lsl #18
4756 ; CHECK-NEXT: vcvt.s32.f32 s10, s10
4757 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4758 ; CHECK-NEXT: vmov r12, s11
4759 ; CHECK-NEXT: str r1, [r0, #12]
4760 ; CHECK-NEXT: vmov r3, s9
4762 ; CHECK-NEXT: movvs.w r12, #0
4763 ; CHECK-NEXT: vcmp.f32 s7, s7
4764 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4766 ; CHECK-NEXT: movvs r3, #0
4767 ; CHECK-NEXT: bfc r3, #19, #13
4768 ; CHECK-NEXT: vcvt.s32.f32 s6, s6
4769 ; CHECK-NEXT: orr.w r3, r3, r12, lsl #19
4770 ; CHECK-NEXT: str r3, [r0]
4771 ; CHECK-NEXT: vcmp.f32 s1, s1
4772 ; CHECK-NEXT: vmov r3, s5
4773 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4775 ; CHECK-NEXT: movvs r3, #0
4776 ; CHECK-NEXT: vcmp.f32 s8, s8
4777 ; CHECK-NEXT: bfc r3, #19, #13
4778 ; CHECK-NEXT: vmov r1, s10
4779 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4781 ; CHECK-NEXT: movvs r1, #0
4782 ; CHECK-NEXT: ubfx r2, r1, #7, #12
4783 ; CHECK-NEXT: vcmp.f32 s4, s4
4784 ; CHECK-NEXT: orr.w r2, r2, r3, lsl #12
4785 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4786 ; CHECK-NEXT: orr.w r2, r2, lr, lsl #31
4787 ; CHECK-NEXT: str r2, [r0, #8]
4788 ; CHECK-NEXT: vmov r2, s6
4789 ; CHECK-NEXT: ubfx r3, r12, #13, #6
4791 ; CHECK-NEXT: movvs r2, #0
4792 ; CHECK-NEXT: bfc r2, #19, #13
4793 ; CHECK-NEXT: orr.w r2, r3, r2, lsl #6
4794 ; CHECK-NEXT: orr.w r1, r2, r1, lsl #25
4795 ; CHECK-NEXT: str r1, [r0, #4]
4796 ; CHECK-NEXT: vpop {d8}
4797 ; CHECK-NEXT: pop {r7, pc}
4798 ; CHECK-NEXT: .p2align 2
4799 ; CHECK-NEXT: @ %bb.1:
4800 ; CHECK-NEXT: .LCPI46_0:
4801 ; CHECK-NEXT: .long 0xc8800000 @ float -262144
4802 ; CHECK-NEXT: .LCPI46_1:
4803 ; CHECK-NEXT: .long 0x487fffc0 @ float 262143
4804 %x = call <8 x i19> @llvm.fptosi.sat.v8f16.v8i19(<8 x half> %f)
4808 define arm_aapcs_vfpcc <8 x i32> @test_signed_v8f16_v8i32_duplicate(<8 x half> %f) {
4809 ; CHECK-LABEL: test_signed_v8f16_v8i32_duplicate:
4811 ; CHECK-NEXT: vmovx.f16 s4, s3
4812 ; CHECK-NEXT: vmovx.f16 s6, s0
4813 ; CHECK-NEXT: vcvt.s32.f16 s8, s4
4814 ; CHECK-NEXT: vmovx.f16 s4, s2
4815 ; CHECK-NEXT: vcvt.s32.f16 s10, s4
4816 ; CHECK-NEXT: vmovx.f16 s4, s1
4817 ; CHECK-NEXT: vcvt.s32.f16 s14, s2
4818 ; CHECK-NEXT: vcvt.s32.f16 s2, s1
4819 ; CHECK-NEXT: vcvt.s32.f16 s0, s0
4820 ; CHECK-NEXT: vcvt.s32.f16 s4, s4
4821 ; CHECK-NEXT: vcvt.s32.f16 s6, s6
4822 ; CHECK-NEXT: vmov r0, s2
4823 ; CHECK-NEXT: vmov r1, s0
4824 ; CHECK-NEXT: vcvt.s32.f16 s12, s3
4825 ; CHECK-NEXT: vmov q0[2], q0[0], r1, r0
4826 ; CHECK-NEXT: vmov r0, s4
4827 ; CHECK-NEXT: vmov r1, s6
4828 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r0
4829 ; CHECK-NEXT: vmov r0, s12
4830 ; CHECK-NEXT: vmov r1, s14
4831 ; CHECK-NEXT: vmov q1[2], q1[0], r1, r0
4832 ; CHECK-NEXT: vmov r0, s8
4833 ; CHECK-NEXT: vmov r1, s10
4834 ; CHECK-NEXT: vmov q1[3], q1[1], r1, r0
4836 %x = call <8 x i32> @llvm.fptosi.sat.v8f16.v8i32(<8 x half> %f)
4840 define arm_aapcs_vfpcc <8 x i50> @test_signed_v8f16_v8i50(<8 x half> %f) {
4841 ; CHECK-LABEL: test_signed_v8f16_v8i50:
4843 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
4844 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
4845 ; CHECK-NEXT: .pad #4
4846 ; CHECK-NEXT: sub sp, #4
4847 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14}
4848 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14}
4849 ; CHECK-NEXT: .pad #16
4850 ; CHECK-NEXT: sub sp, #16
4851 ; CHECK-NEXT: vmov q4, q0
4852 ; CHECK-NEXT: mov r11, r0
4853 ; CHECK-NEXT: vcvtt.f32.f16 s28, s19
4854 ; CHECK-NEXT: vmov r0, s28
4855 ; CHECK-NEXT: bl __aeabi_f2lz
4856 ; CHECK-NEXT: vcvtb.f32.f16 s26, s18
4857 ; CHECK-NEXT: mov r7, r0
4858 ; CHECK-NEXT: vmov r0, s26
4859 ; CHECK-NEXT: vldr s22, .LCPI48_1
4860 ; CHECK-NEXT: vcvtb.f32.f16 s24, s16
4861 ; CHECK-NEXT: vcvtt.f32.f16 s18, s18
4862 ; CHECK-NEXT: vcmp.f32 s28, s22
4863 ; CHECK-NEXT: mov r4, r1
4864 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4865 ; CHECK-NEXT: vmov r6, s24
4866 ; CHECK-NEXT: vldr s20, .LCPI48_0
4867 ; CHECK-NEXT: vmov r5, s18
4868 ; CHECK-NEXT: itt lt
4869 ; CHECK-NEXT: movlt r4, #0
4870 ; CHECK-NEXT: movtlt r4, #65534
4871 ; CHECK-NEXT: bl __aeabi_f2lz
4872 ; CHECK-NEXT: vcmp.f32 s26, s22
4873 ; CHECK-NEXT: str r1, [sp, #4] @ 4-byte Spill
4874 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4875 ; CHECK-NEXT: vcmp.f32 s28, s20
4877 ; CHECK-NEXT: movlt r0, #0
4878 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4879 ; CHECK-NEXT: vcmp.f32 s26, s20
4880 ; CHECK-NEXT: itt gt
4881 ; CHECK-NEXT: movwgt r4, #65535
4882 ; CHECK-NEXT: movtgt r4, #1
4883 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4885 ; CHECK-NEXT: movgt.w r0, #-1
4886 ; CHECK-NEXT: vcmp.f32 s26, s26
4887 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4889 ; CHECK-NEXT: movvs r0, #0
4890 ; CHECK-NEXT: str.w r0, [r11, #25]
4891 ; CHECK-NEXT: mov r0, r6
4892 ; CHECK-NEXT: bl __aeabi_f2lz
4893 ; CHECK-NEXT: vcmp.f32 s24, s22
4894 ; CHECK-NEXT: str r1, [sp, #8] @ 4-byte Spill
4895 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4896 ; CHECK-NEXT: vcmp.f32 s24, s20
4898 ; CHECK-NEXT: movlt r0, #0
4899 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4900 ; CHECK-NEXT: vcmp.f32 s24, s24
4902 ; CHECK-NEXT: movgt.w r0, #-1
4903 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4904 ; CHECK-NEXT: vcmp.f32 s28, s22
4906 ; CHECK-NEXT: movvs r0, #0
4907 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4908 ; CHECK-NEXT: str.w r0, [r11]
4910 ; CHECK-NEXT: movlt r7, #0
4911 ; CHECK-NEXT: vcmp.f32 s28, s20
4912 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4914 ; CHECK-NEXT: movgt.w r7, #-1
4915 ; CHECK-NEXT: vcmp.f32 s28, s28
4916 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4918 ; CHECK-NEXT: movvs r7, #0
4919 ; CHECK-NEXT: str r7, [sp, #12] @ 4-byte Spill
4921 ; CHECK-NEXT: movvs r4, #0
4922 ; CHECK-NEXT: lsls r0, r4, #22
4923 ; CHECK-NEXT: orr.w r7, r0, r7, lsr #10
4924 ; CHECK-NEXT: mov r0, r5
4925 ; CHECK-NEXT: bl __aeabi_f2lz
4926 ; CHECK-NEXT: vcmp.f32 s18, s22
4927 ; CHECK-NEXT: mov r6, r1
4928 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4929 ; CHECK-NEXT: vcmp.f32 s18, s20
4930 ; CHECK-NEXT: itt lt
4931 ; CHECK-NEXT: movlt r6, #0
4932 ; CHECK-NEXT: movtlt r6, #65534
4933 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4934 ; CHECK-NEXT: vcmp.f32 s18, s18
4935 ; CHECK-NEXT: itt gt
4936 ; CHECK-NEXT: movwgt r6, #65535
4937 ; CHECK-NEXT: movtgt r6, #1
4938 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4939 ; CHECK-NEXT: mov r5, r0
4940 ; CHECK-NEXT: vcmp.f32 s18, s22
4941 ; CHECK-NEXT: str.w r7, [r11, #45]
4943 ; CHECK-NEXT: movvs r6, #0
4944 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4946 ; CHECK-NEXT: movlt r5, #0
4947 ; CHECK-NEXT: vcmp.f32 s18, s20
4948 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4949 ; CHECK-NEXT: vcmp.f32 s18, s18
4951 ; CHECK-NEXT: movgt.w r5, #-1
4952 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4954 ; CHECK-NEXT: movvs r5, #0
4955 ; CHECK-NEXT: lsrs r0, r5, #14
4956 ; CHECK-NEXT: orr.w r0, r0, r6, lsl #18
4957 ; CHECK-NEXT: vcvtt.f32.f16 s18, s17
4958 ; CHECK-NEXT: str.w r0, [r11, #33]
4959 ; CHECK-NEXT: vmov r0, s18
4960 ; CHECK-NEXT: bl __aeabi_f2lz
4961 ; CHECK-NEXT: vcmp.f32 s18, s22
4962 ; CHECK-NEXT: mov r9, r1
4963 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4964 ; CHECK-NEXT: vcmp.f32 s18, s20
4966 ; CHECK-NEXT: movlt r0, #0
4967 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4968 ; CHECK-NEXT: vcmp.f32 s18, s18
4970 ; CHECK-NEXT: movgt.w r0, #-1
4971 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4972 ; CHECK-NEXT: vcmp.f32 s18, s22
4974 ; CHECK-NEXT: movvs r0, #0
4975 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4976 ; CHECK-NEXT: str r0, [sp] @ 4-byte Spill
4977 ; CHECK-NEXT: itt lt
4978 ; CHECK-NEXT: movwlt r9, #0
4979 ; CHECK-NEXT: movtlt r9, #65534
4980 ; CHECK-NEXT: vcmp.f32 s18, s20
4981 ; CHECK-NEXT: mov r1, r0
4982 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4983 ; CHECK-NEXT: itt gt
4984 ; CHECK-NEXT: movwgt r9, #65535
4985 ; CHECK-NEXT: movtgt r9, #1
4986 ; CHECK-NEXT: vcmp.f32 s18, s18
4987 ; CHECK-NEXT: vcvtt.f32.f16 s16, s16
4988 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4990 ; CHECK-NEXT: movvs.w r9, #0
4991 ; CHECK-NEXT: lsl.w r0, r9, #22
4992 ; CHECK-NEXT: orr.w r0, r0, r1, lsr #10
4993 ; CHECK-NEXT: str.w r0, [r11, #20]
4994 ; CHECK-NEXT: vmov r0, s16
4995 ; CHECK-NEXT: bl __aeabi_f2lz
4996 ; CHECK-NEXT: vcmp.f32 s16, s22
4997 ; CHECK-NEXT: mov r8, r0
4998 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
4999 ; CHECK-NEXT: vcmp.f32 s16, s20
5001 ; CHECK-NEXT: movlt.w r8, #0
5002 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5003 ; CHECK-NEXT: vcmp.f32 s16, s16
5005 ; CHECK-NEXT: movgt.w r8, #-1
5006 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5007 ; CHECK-NEXT: mov r10, r1
5008 ; CHECK-NEXT: vcmp.f32 s16, s22
5010 ; CHECK-NEXT: movvs.w r8, #0
5011 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5012 ; CHECK-NEXT: itt lt
5013 ; CHECK-NEXT: movwlt r10, #0
5014 ; CHECK-NEXT: movtlt r10, #65534
5015 ; CHECK-NEXT: vcmp.f32 s16, s20
5016 ; CHECK-NEXT: lsr.w r0, r8, #14
5017 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5018 ; CHECK-NEXT: vcmp.f32 s16, s16
5019 ; CHECK-NEXT: itt gt
5020 ; CHECK-NEXT: movwgt r10, #65535
5021 ; CHECK-NEXT: movtgt r10, #1
5022 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5024 ; CHECK-NEXT: movvs.w r10, #0
5025 ; CHECK-NEXT: orr.w r0, r0, r10, lsl #18
5026 ; CHECK-NEXT: str.w r0, [r11, #8]
5027 ; CHECK-NEXT: lsrs r0, r4, #10
5028 ; CHECK-NEXT: vcvtb.f32.f16 s16, s19
5029 ; CHECK-NEXT: strb.w r0, [r11, #49]
5030 ; CHECK-NEXT: vmov r0, s16
5031 ; CHECK-NEXT: bl __aeabi_f2lz
5032 ; CHECK-NEXT: mov r7, r0
5033 ; CHECK-NEXT: vcmp.f32 s16, s22
5034 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5036 ; CHECK-NEXT: movlt r7, #0
5037 ; CHECK-NEXT: vcmp.f32 s16, s20
5038 ; CHECK-NEXT: ubfx r0, r6, #14, #4
5039 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5041 ; CHECK-NEXT: movgt.w r7, #-1
5042 ; CHECK-NEXT: vcmp.f32 s16, s16
5043 ; CHECK-NEXT: vcvtb.f32.f16 s18, s17
5044 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5046 ; CHECK-NEXT: movvs r7, #0
5047 ; CHECK-NEXT: orr.w r0, r0, r7, lsl #4
5048 ; CHECK-NEXT: str.w r0, [r11, #37]
5049 ; CHECK-NEXT: vcmp.f32 s26, s22
5050 ; CHECK-NEXT: ldr r0, [sp, #4] @ 4-byte Reload
5051 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5052 ; CHECK-NEXT: itt lt
5053 ; CHECK-NEXT: movlt r0, #0
5054 ; CHECK-NEXT: movtlt r0, #65534
5055 ; CHECK-NEXT: vcmp.f32 s26, s20
5056 ; CHECK-NEXT: mov r4, r1
5057 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5058 ; CHECK-NEXT: itt gt
5059 ; CHECK-NEXT: movwgt r0, #65535
5060 ; CHECK-NEXT: movtgt r0, #1
5061 ; CHECK-NEXT: vcmp.f32 s26, s26
5062 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5064 ; CHECK-NEXT: movvs r0, #0
5065 ; CHECK-NEXT: bfc r0, #18, #14
5066 ; CHECK-NEXT: orr.w r0, r0, r5, lsl #18
5067 ; CHECK-NEXT: str.w r0, [r11, #29]
5068 ; CHECK-NEXT: lsr.w r0, r9, #10
5069 ; CHECK-NEXT: strb.w r0, [r11, #24]
5070 ; CHECK-NEXT: vmov r0, s18
5071 ; CHECK-NEXT: bl __aeabi_f2lz
5072 ; CHECK-NEXT: vcmp.f32 s18, s22
5073 ; CHECK-NEXT: ubfx r2, r10, #14, #4
5074 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5076 ; CHECK-NEXT: movlt r0, #0
5077 ; CHECK-NEXT: vcmp.f32 s18, s20
5078 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5080 ; CHECK-NEXT: movgt.w r0, #-1
5081 ; CHECK-NEXT: vcmp.f32 s18, s18
5082 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5084 ; CHECK-NEXT: movvs r0, #0
5085 ; CHECK-NEXT: orr.w r2, r2, r0, lsl #4
5086 ; CHECK-NEXT: str.w r2, [r11, #12]
5087 ; CHECK-NEXT: vcmp.f32 s24, s22
5088 ; CHECK-NEXT: ldr r2, [sp, #8] @ 4-byte Reload
5089 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5090 ; CHECK-NEXT: vcmp.f32 s24, s20
5091 ; CHECK-NEXT: itt lt
5092 ; CHECK-NEXT: movlt r2, #0
5093 ; CHECK-NEXT: movtlt r2, #65534
5094 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5095 ; CHECK-NEXT: vcmp.f32 s24, s24
5096 ; CHECK-NEXT: itt gt
5097 ; CHECK-NEXT: movwgt r2, #65535
5098 ; CHECK-NEXT: movtgt r2, #1
5099 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5100 ; CHECK-NEXT: vcmp.f32 s18, s22
5102 ; CHECK-NEXT: movvs r2, #0
5103 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5104 ; CHECK-NEXT: vcmp.f32 s18, s20
5105 ; CHECK-NEXT: itt lt
5106 ; CHECK-NEXT: movlt r1, #0
5107 ; CHECK-NEXT: movtlt r1, #65534
5108 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5109 ; CHECK-NEXT: vcmp.f32 s16, s22
5110 ; CHECK-NEXT: itt gt
5111 ; CHECK-NEXT: movwgt r1, #65535
5112 ; CHECK-NEXT: movtgt r1, #1
5113 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5114 ; CHECK-NEXT: itt lt
5115 ; CHECK-NEXT: movlt r4, #0
5116 ; CHECK-NEXT: movtlt r4, #65534
5117 ; CHECK-NEXT: vcmp.f32 s16, s20
5118 ; CHECK-NEXT: bfc r2, #18, #14
5119 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5120 ; CHECK-NEXT: itt gt
5121 ; CHECK-NEXT: movwgt r4, #65535
5122 ; CHECK-NEXT: movtgt r4, #1
5123 ; CHECK-NEXT: vcmp.f32 s16, s16
5124 ; CHECK-NEXT: orr.w r2, r2, r8, lsl #18
5125 ; CHECK-NEXT: str.w r2, [r11, #4]
5126 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5128 ; CHECK-NEXT: movvs r4, #0
5129 ; CHECK-NEXT: bfc r4, #18, #14
5130 ; CHECK-NEXT: ldr r3, [sp, #12] @ 4-byte Reload
5131 ; CHECK-NEXT: lsrs r2, r7, #28
5132 ; CHECK-NEXT: vcmp.f32 s18, s18
5133 ; CHECK-NEXT: orr.w r2, r2, r4, lsl #4
5134 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5135 ; CHECK-NEXT: orr.w r2, r2, r3, lsl #22
5136 ; CHECK-NEXT: str.w r2, [r11, #41]
5138 ; CHECK-NEXT: movvs r1, #0
5139 ; CHECK-NEXT: lsrs r0, r0, #28
5140 ; CHECK-NEXT: bfc r1, #18, #14
5141 ; CHECK-NEXT: orr.w r0, r0, r1, lsl #4
5142 ; CHECK-NEXT: ldr r1, [sp] @ 4-byte Reload
5143 ; CHECK-NEXT: orr.w r0, r0, r1, lsl #22
5144 ; CHECK-NEXT: str.w r0, [r11, #16]
5145 ; CHECK-NEXT: add sp, #16
5146 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14}
5147 ; CHECK-NEXT: add sp, #4
5148 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
5149 ; CHECK-NEXT: .p2align 2
5150 ; CHECK-NEXT: @ %bb.1:
5151 ; CHECK-NEXT: .LCPI48_0:
5152 ; CHECK-NEXT: .long 0x57ffffff @ float 5.6294992E+14
5153 ; CHECK-NEXT: .LCPI48_1:
5154 ; CHECK-NEXT: .long 0xd8000000 @ float -5.62949953E+14
5155 %x = call <8 x i50> @llvm.fptosi.sat.v8f16.v8i50(<8 x half> %f)
5159 define arm_aapcs_vfpcc <8 x i64> @test_signed_v8f16_v8i64(<8 x half> %f) {
5160 ; CHECK-LABEL: test_signed_v8f16_v8i64:
5162 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, r11, lr}
5163 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, r11, lr}
5164 ; CHECK-NEXT: .pad #4
5165 ; CHECK-NEXT: sub sp, #4
5166 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
5167 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
5168 ; CHECK-NEXT: vmov q4, q0
5169 ; CHECK-NEXT: vcvtt.f32.f16 s20, s19
5170 ; CHECK-NEXT: vmov r0, s20
5171 ; CHECK-NEXT: bl __aeabi_f2lz
5172 ; CHECK-NEXT: vcvtb.f32.f16 s22, s19
5173 ; CHECK-NEXT: mov r9, r0
5174 ; CHECK-NEXT: vmov r0, s22
5175 ; CHECK-NEXT: vldr s30, .LCPI49_1
5176 ; CHECK-NEXT: vldr s28, .LCPI49_0
5177 ; CHECK-NEXT: vcvtb.f32.f16 s24, s16
5178 ; CHECK-NEXT: vcmp.f32 s20, s30
5179 ; CHECK-NEXT: vcvtt.f32.f16 s16, s16
5180 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5182 ; CHECK-NEXT: movlt.w r9, #0
5183 ; CHECK-NEXT: vcmp.f32 s20, s28
5184 ; CHECK-NEXT: mov r8, r1
5185 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5187 ; CHECK-NEXT: movgt.w r9, #-1
5188 ; CHECK-NEXT: vcmp.f32 s20, s20
5189 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5190 ; CHECK-NEXT: vmov r4, s24
5191 ; CHECK-NEXT: vmov r5, s16
5193 ; CHECK-NEXT: movvs.w r9, #0
5194 ; CHECK-NEXT: bl __aeabi_f2lz
5195 ; CHECK-NEXT: vcmp.f32 s22, s30
5196 ; CHECK-NEXT: mov r11, r0
5197 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5198 ; CHECK-NEXT: vcmp.f32 s22, s28
5200 ; CHECK-NEXT: movlt.w r11, #0
5201 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5202 ; CHECK-NEXT: vcmp.f32 s22, s22
5204 ; CHECK-NEXT: movgt.w r11, #-1
5205 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5206 ; CHECK-NEXT: vcmp.f32 s20, s30
5208 ; CHECK-NEXT: movvs.w r11, #0
5209 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5210 ; CHECK-NEXT: vcmp.f32 s20, s28
5212 ; CHECK-NEXT: movlt.w r8, #-2147483648
5213 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5214 ; CHECK-NEXT: vcmp.f32 s20, s20
5216 ; CHECK-NEXT: mvngt r8, #-2147483648
5217 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5218 ; CHECK-NEXT: mov r10, r1
5219 ; CHECK-NEXT: vcmp.f32 s22, s30
5221 ; CHECK-NEXT: movvs.w r8, #0
5222 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5224 ; CHECK-NEXT: movlt.w r10, #-2147483648
5225 ; CHECK-NEXT: vcmp.f32 s22, s28
5226 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5227 ; CHECK-NEXT: mov r0, r5
5229 ; CHECK-NEXT: mvngt r10, #-2147483648
5230 ; CHECK-NEXT: vcmp.f32 s22, s22
5231 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5233 ; CHECK-NEXT: movvs.w r10, #0
5234 ; CHECK-NEXT: bl __aeabi_f2lz
5235 ; CHECK-NEXT: mov r6, r0
5236 ; CHECK-NEXT: vcmp.f32 s16, s30
5237 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5239 ; CHECK-NEXT: movlt r6, #0
5240 ; CHECK-NEXT: vcmp.f32 s16, s28
5241 ; CHECK-NEXT: mov r0, r4
5242 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5244 ; CHECK-NEXT: movgt.w r6, #-1
5245 ; CHECK-NEXT: vcmp.f32 s16, s16
5246 ; CHECK-NEXT: mov r5, r1
5247 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5249 ; CHECK-NEXT: movvs r6, #0
5250 ; CHECK-NEXT: bl __aeabi_f2lz
5251 ; CHECK-NEXT: vcvtt.f32.f16 s19, s17
5252 ; CHECK-NEXT: mov r7, r1
5253 ; CHECK-NEXT: vmov r1, s19
5254 ; CHECK-NEXT: vcmp.f32 s24, s30
5255 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5257 ; CHECK-NEXT: movlt r0, #0
5258 ; CHECK-NEXT: vcmp.f32 s24, s28
5259 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5261 ; CHECK-NEXT: movgt.w r0, #-1
5262 ; CHECK-NEXT: vcmp.f32 s24, s24
5263 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5265 ; CHECK-NEXT: movvs r0, #0
5266 ; CHECK-NEXT: vmov q5[2], q5[0], r0, r6
5267 ; CHECK-NEXT: mov r0, r1
5268 ; CHECK-NEXT: bl __aeabi_f2lz
5269 ; CHECK-NEXT: vcvtb.f32.f16 s17, s17
5270 ; CHECK-NEXT: mov r6, r0
5271 ; CHECK-NEXT: vmov r0, s17
5272 ; CHECK-NEXT: mov r4, r1
5273 ; CHECK-NEXT: vcmp.f32 s19, s30
5274 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5275 ; CHECK-NEXT: vcmp.f32 s19, s28
5277 ; CHECK-NEXT: movlt r6, #0
5278 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5279 ; CHECK-NEXT: vcmp.f32 s19, s19
5281 ; CHECK-NEXT: movgt.w r6, #-1
5282 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5283 ; CHECK-NEXT: vcmp.f32 s16, s30
5285 ; CHECK-NEXT: movvs r6, #0
5286 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5287 ; CHECK-NEXT: vcmp.f32 s16, s28
5289 ; CHECK-NEXT: movlt.w r5, #-2147483648
5290 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5291 ; CHECK-NEXT: vcmp.f32 s16, s16
5293 ; CHECK-NEXT: mvngt r5, #-2147483648
5294 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5295 ; CHECK-NEXT: vcmp.f32 s24, s30
5297 ; CHECK-NEXT: movvs r5, #0
5298 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5300 ; CHECK-NEXT: movlt.w r7, #-2147483648
5301 ; CHECK-NEXT: vcmp.f32 s24, s28
5302 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5304 ; CHECK-NEXT: mvngt r7, #-2147483648
5305 ; CHECK-NEXT: vcmp.f32 s24, s24
5306 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5308 ; CHECK-NEXT: movvs r7, #0
5309 ; CHECK-NEXT: vmov q5[3], q5[1], r7, r5
5310 ; CHECK-NEXT: bl __aeabi_f2lz
5311 ; CHECK-NEXT: vcvtt.f32.f16 s16, s18
5312 ; CHECK-NEXT: mov r7, r1
5313 ; CHECK-NEXT: vmov r1, s16
5314 ; CHECK-NEXT: vcmp.f32 s17, s30
5315 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5317 ; CHECK-NEXT: movlt r0, #0
5318 ; CHECK-NEXT: vcmp.f32 s17, s28
5319 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5321 ; CHECK-NEXT: movgt.w r0, #-1
5322 ; CHECK-NEXT: vcmp.f32 s17, s17
5323 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5325 ; CHECK-NEXT: movvs r0, #0
5326 ; CHECK-NEXT: vmov q6[2], q6[0], r0, r6
5327 ; CHECK-NEXT: mov r0, r1
5328 ; CHECK-NEXT: bl __aeabi_f2lz
5329 ; CHECK-NEXT: vcvtb.f32.f16 s18, s18
5330 ; CHECK-NEXT: mov r6, r0
5331 ; CHECK-NEXT: vmov r0, s18
5332 ; CHECK-NEXT: mov r5, r1
5333 ; CHECK-NEXT: vcmp.f32 s16, s30
5334 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5335 ; CHECK-NEXT: vcmp.f32 s16, s28
5337 ; CHECK-NEXT: movlt r6, #0
5338 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5339 ; CHECK-NEXT: vcmp.f32 s16, s16
5341 ; CHECK-NEXT: movgt.w r6, #-1
5342 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5343 ; CHECK-NEXT: vcmp.f32 s19, s30
5345 ; CHECK-NEXT: movvs r6, #0
5346 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5347 ; CHECK-NEXT: vcmp.f32 s19, s28
5349 ; CHECK-NEXT: movlt.w r4, #-2147483648
5350 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5351 ; CHECK-NEXT: vcmp.f32 s19, s19
5353 ; CHECK-NEXT: mvngt r4, #-2147483648
5354 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5355 ; CHECK-NEXT: vcmp.f32 s17, s30
5357 ; CHECK-NEXT: movvs r4, #0
5358 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5360 ; CHECK-NEXT: movlt.w r7, #-2147483648
5361 ; CHECK-NEXT: vcmp.f32 s17, s28
5362 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5364 ; CHECK-NEXT: mvngt r7, #-2147483648
5365 ; CHECK-NEXT: vcmp.f32 s17, s17
5366 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5368 ; CHECK-NEXT: movvs r7, #0
5369 ; CHECK-NEXT: vmov q6[3], q6[1], r7, r4
5370 ; CHECK-NEXT: bl __aeabi_f2lz
5371 ; CHECK-NEXT: vcmp.f32 s18, s30
5372 ; CHECK-NEXT: vmov q3[2], q3[0], r11, r9
5373 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5374 ; CHECK-NEXT: vcmp.f32 s18, s28
5376 ; CHECK-NEXT: movlt r0, #0
5377 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5378 ; CHECK-NEXT: vcmp.f32 s18, s18
5380 ; CHECK-NEXT: movgt.w r0, #-1
5381 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5382 ; CHECK-NEXT: vcmp.f32 s16, s30
5384 ; CHECK-NEXT: movvs r0, #0
5385 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5386 ; CHECK-NEXT: vcmp.f32 s16, s28
5388 ; CHECK-NEXT: movlt.w r5, #-2147483648
5389 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5390 ; CHECK-NEXT: vcmp.f32 s16, s16
5392 ; CHECK-NEXT: mvngt r5, #-2147483648
5393 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5394 ; CHECK-NEXT: vcmp.f32 s18, s30
5396 ; CHECK-NEXT: movvs r5, #0
5397 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5399 ; CHECK-NEXT: movlt.w r1, #-2147483648
5400 ; CHECK-NEXT: vcmp.f32 s18, s28
5401 ; CHECK-NEXT: vmov q2[2], q2[0], r0, r6
5402 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5404 ; CHECK-NEXT: mvngt r1, #-2147483648
5405 ; CHECK-NEXT: vcmp.f32 s18, s18
5406 ; CHECK-NEXT: vmov q3[3], q3[1], r10, r8
5407 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5409 ; CHECK-NEXT: movvs r1, #0
5410 ; CHECK-NEXT: vmov q2[3], q2[1], r1, r5
5411 ; CHECK-NEXT: vmov q0, q5
5412 ; CHECK-NEXT: vmov q1, q6
5413 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
5414 ; CHECK-NEXT: add sp, #4
5415 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc}
5416 ; CHECK-NEXT: .p2align 2
5417 ; CHECK-NEXT: @ %bb.1:
5418 ; CHECK-NEXT: .LCPI49_0:
5419 ; CHECK-NEXT: .long 0x5effffff @ float 9.22337149E+18
5420 ; CHECK-NEXT: .LCPI49_1:
5421 ; CHECK-NEXT: .long 0xdf000000 @ float -9.22337203E+18
5422 %x = call <8 x i64> @llvm.fptosi.sat.v8f16.v8i64(<8 x half> %f)
5426 define arm_aapcs_vfpcc <8 x i100> @test_signed_v8f16_v8i100(<8 x half> %f) {
5427 ; CHECK-LABEL: test_signed_v8f16_v8i100:
5429 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, r10, lr}
5430 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, r10, lr}
5431 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
5432 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
5433 ; CHECK-NEXT: vmov q4, q0
5434 ; CHECK-NEXT: mov r4, r0
5435 ; CHECK-NEXT: vcvtb.f32.f16 s30, s19
5436 ; CHECK-NEXT: vmov r0, s30
5437 ; CHECK-NEXT: bl __fixsfti
5438 ; CHECK-NEXT: vcvtb.f32.f16 s28, s18
5439 ; CHECK-NEXT: mov r5, r3
5440 ; CHECK-NEXT: vmov r3, s28
5441 ; CHECK-NEXT: vldr s24, .LCPI50_2
5442 ; CHECK-NEXT: vldr s20, .LCPI50_3
5443 ; CHECK-NEXT: vcvtt.f32.f16 s19, s19
5444 ; CHECK-NEXT: vcmp.f32 s30, s24
5445 ; CHECK-NEXT: vcvtb.f32.f16 s22, s16
5446 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5447 ; CHECK-NEXT: vcmp.f32 s30, s20
5449 ; CHECK-NEXT: movlt r2, #0
5450 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5451 ; CHECK-NEXT: vcmp.f32 s30, s30
5453 ; CHECK-NEXT: movgt.w r2, #-1
5454 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5455 ; CHECK-NEXT: vcmp.f32 s30, s24
5457 ; CHECK-NEXT: movvs r2, #0
5458 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5459 ; CHECK-NEXT: vcmp.f32 s30, s20
5460 ; CHECK-NEXT: str.w r2, [r4, #83]
5462 ; CHECK-NEXT: movlt r1, #0
5463 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5464 ; CHECK-NEXT: vcmp.f32 s30, s30
5466 ; CHECK-NEXT: movgt.w r1, #-1
5467 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5468 ; CHECK-NEXT: vcmp.f32 s30, s24
5470 ; CHECK-NEXT: movvs r1, #0
5471 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5472 ; CHECK-NEXT: str.w r1, [r4, #79]
5474 ; CHECK-NEXT: movlt r0, #0
5475 ; CHECK-NEXT: vcmp.f32 s30, s20
5476 ; CHECK-NEXT: vcvtb.f32.f16 s26, s17
5477 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5479 ; CHECK-NEXT: movgt.w r0, #-1
5480 ; CHECK-NEXT: vcmp.f32 s30, s30
5481 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5483 ; CHECK-NEXT: movvs r0, #0
5484 ; CHECK-NEXT: str.w r0, [r4, #75]
5485 ; CHECK-NEXT: vmov r9, s19
5486 ; CHECK-NEXT: vmov r8, s22
5487 ; CHECK-NEXT: mov r0, r3
5488 ; CHECK-NEXT: vmov r6, s26
5489 ; CHECK-NEXT: bl __fixsfti
5490 ; CHECK-NEXT: vcmp.f32 s28, s24
5491 ; CHECK-NEXT: mov r7, r3
5492 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5493 ; CHECK-NEXT: vcmp.f32 s28, s20
5495 ; CHECK-NEXT: movlt r2, #0
5496 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5497 ; CHECK-NEXT: vcmp.f32 s28, s28
5499 ; CHECK-NEXT: movgt.w r2, #-1
5500 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5501 ; CHECK-NEXT: vcmp.f32 s28, s24
5503 ; CHECK-NEXT: movvs r2, #0
5504 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5505 ; CHECK-NEXT: vcmp.f32 s28, s20
5506 ; CHECK-NEXT: str.w r2, [r4, #58]
5508 ; CHECK-NEXT: movlt r1, #0
5509 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5510 ; CHECK-NEXT: vcmp.f32 s28, s28
5512 ; CHECK-NEXT: movgt.w r1, #-1
5513 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5514 ; CHECK-NEXT: vcmp.f32 s28, s24
5516 ; CHECK-NEXT: movvs r1, #0
5517 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5518 ; CHECK-NEXT: str.w r1, [r4, #54]
5520 ; CHECK-NEXT: movlt r0, #0
5521 ; CHECK-NEXT: vcmp.f32 s28, s20
5522 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5524 ; CHECK-NEXT: movgt.w r0, #-1
5525 ; CHECK-NEXT: vcmp.f32 s28, s28
5526 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5528 ; CHECK-NEXT: movvs r0, #0
5529 ; CHECK-NEXT: str.w r0, [r4, #50]
5530 ; CHECK-NEXT: mov r0, r6
5531 ; CHECK-NEXT: bl __fixsfti
5532 ; CHECK-NEXT: vcmp.f32 s26, s24
5533 ; CHECK-NEXT: mov r10, r3
5534 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5535 ; CHECK-NEXT: vcmp.f32 s26, s20
5537 ; CHECK-NEXT: movlt r2, #0
5538 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5539 ; CHECK-NEXT: vcmp.f32 s26, s26
5541 ; CHECK-NEXT: movgt.w r2, #-1
5542 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5543 ; CHECK-NEXT: vcmp.f32 s26, s24
5545 ; CHECK-NEXT: movvs r2, #0
5546 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5547 ; CHECK-NEXT: vcmp.f32 s26, s20
5548 ; CHECK-NEXT: str.w r2, [r4, #33]
5550 ; CHECK-NEXT: movlt r1, #0
5551 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5552 ; CHECK-NEXT: vcmp.f32 s26, s26
5554 ; CHECK-NEXT: movgt.w r1, #-1
5555 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5556 ; CHECK-NEXT: vcmp.f32 s26, s24
5558 ; CHECK-NEXT: movvs r1, #0
5559 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5560 ; CHECK-NEXT: str.w r1, [r4, #29]
5562 ; CHECK-NEXT: movlt r0, #0
5563 ; CHECK-NEXT: vcmp.f32 s26, s20
5564 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5566 ; CHECK-NEXT: movgt.w r0, #-1
5567 ; CHECK-NEXT: vcmp.f32 s26, s26
5568 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5570 ; CHECK-NEXT: movvs r0, #0
5571 ; CHECK-NEXT: str.w r0, [r4, #25]
5572 ; CHECK-NEXT: mov r0, r8
5573 ; CHECK-NEXT: bl __fixsfti
5574 ; CHECK-NEXT: vcmp.f32 s22, s24
5575 ; CHECK-NEXT: mov r8, r3
5576 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5577 ; CHECK-NEXT: vcmp.f32 s22, s20
5579 ; CHECK-NEXT: movlt r2, #0
5580 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5581 ; CHECK-NEXT: vcmp.f32 s22, s22
5583 ; CHECK-NEXT: movgt.w r2, #-1
5584 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5585 ; CHECK-NEXT: vcmp.f32 s22, s24
5587 ; CHECK-NEXT: movvs r2, #0
5588 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5589 ; CHECK-NEXT: vcmp.f32 s22, s20
5590 ; CHECK-NEXT: str r2, [r4, #8]
5592 ; CHECK-NEXT: movlt r1, #0
5593 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5594 ; CHECK-NEXT: vcmp.f32 s22, s22
5596 ; CHECK-NEXT: movgt.w r1, #-1
5597 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5598 ; CHECK-NEXT: vcmp.f32 s22, s24
5600 ; CHECK-NEXT: movvs r1, #0
5601 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5602 ; CHECK-NEXT: str r1, [r4, #4]
5604 ; CHECK-NEXT: movlt r0, #0
5605 ; CHECK-NEXT: vcmp.f32 s22, s20
5606 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5608 ; CHECK-NEXT: movgt.w r0, #-1
5609 ; CHECK-NEXT: vcmp.f32 s22, s22
5610 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5612 ; CHECK-NEXT: movvs r0, #0
5613 ; CHECK-NEXT: str r0, [r4]
5614 ; CHECK-NEXT: mov r0, r9
5615 ; CHECK-NEXT: bl __fixsfti
5616 ; CHECK-NEXT: vcmp.f32 s19, s24
5617 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5618 ; CHECK-NEXT: vcmp.f32 s19, s20
5620 ; CHECK-NEXT: movlt r1, #0
5621 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5622 ; CHECK-NEXT: vcmp.f32 s19, s19
5624 ; CHECK-NEXT: movgt.w r1, #-1
5625 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5626 ; CHECK-NEXT: vcmp.f32 s19, s24
5628 ; CHECK-NEXT: movvs r1, #0
5629 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5630 ; CHECK-NEXT: vcmp.f32 s19, s20
5632 ; CHECK-NEXT: movlt r2, #0
5633 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5634 ; CHECK-NEXT: vcmp.f32 s19, s19
5636 ; CHECK-NEXT: movgt.w r2, #-1
5637 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5638 ; CHECK-NEXT: vcmp.f32 s19, s24
5640 ; CHECK-NEXT: movvs r2, #0
5641 ; CHECK-NEXT: lsrs r6, r1, #28
5642 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5643 ; CHECK-NEXT: vcmp.f32 s19, s20
5644 ; CHECK-NEXT: orr.w r6, r6, r2, lsl #4
5645 ; CHECK-NEXT: str.w r6, [r4, #95]
5647 ; CHECK-NEXT: movlt r0, #0
5648 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5649 ; CHECK-NEXT: vcmp.f32 s19, s19
5651 ; CHECK-NEXT: movgt.w r0, #-1
5652 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5653 ; CHECK-NEXT: vcmp.f32 s19, s24
5655 ; CHECK-NEXT: movvs r0, #0
5656 ; CHECK-NEXT: lsrs r6, r0, #28
5657 ; CHECK-NEXT: orr.w r1, r6, r1, lsl #4
5658 ; CHECK-NEXT: str.w r1, [r4, #91]
5659 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5661 ; CHECK-NEXT: mvnlt r3, #7
5662 ; CHECK-NEXT: vcmp.f32 s19, s20
5663 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5664 ; CHECK-NEXT: vcmp.f32 s19, s19
5666 ; CHECK-NEXT: movgt r3, #7
5667 ; CHECK-NEXT: lsrs r1, r2, #28
5668 ; CHECK-NEXT: vcvtt.f32.f16 s19, s18
5669 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5671 ; CHECK-NEXT: movvs r3, #0
5672 ; CHECK-NEXT: orr.w r2, r1, r3, lsl #4
5673 ; CHECK-NEXT: vmov r1, s19
5674 ; CHECK-NEXT: strb.w r2, [r4, #99]
5675 ; CHECK-NEXT: vcmp.f32 s30, s24
5676 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5678 ; CHECK-NEXT: mvnlt r5, #7
5679 ; CHECK-NEXT: vcmp.f32 s30, s20
5680 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5682 ; CHECK-NEXT: movgt r5, #7
5683 ; CHECK-NEXT: vcmp.f32 s30, s30
5684 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5686 ; CHECK-NEXT: movvs r5, #0
5687 ; CHECK-NEXT: and r2, r5, #15
5688 ; CHECK-NEXT: orr.w r0, r2, r0, lsl #4
5689 ; CHECK-NEXT: str.w r0, [r4, #87]
5690 ; CHECK-NEXT: mov r0, r1
5691 ; CHECK-NEXT: bl __fixsfti
5692 ; CHECK-NEXT: vcmp.f32 s19, s24
5693 ; CHECK-NEXT: vcvtt.f32.f16 s18, s17
5694 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5695 ; CHECK-NEXT: vcmp.f32 s19, s20
5697 ; CHECK-NEXT: movlt r1, #0
5698 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5699 ; CHECK-NEXT: vcmp.f32 s19, s19
5701 ; CHECK-NEXT: movgt.w r1, #-1
5702 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5703 ; CHECK-NEXT: vcmp.f32 s19, s24
5705 ; CHECK-NEXT: movvs r1, #0
5706 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5707 ; CHECK-NEXT: vcmp.f32 s19, s20
5709 ; CHECK-NEXT: movlt r2, #0
5710 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5711 ; CHECK-NEXT: vcmp.f32 s19, s19
5713 ; CHECK-NEXT: movgt.w r2, #-1
5714 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5715 ; CHECK-NEXT: lsr.w r6, r1, #28
5716 ; CHECK-NEXT: vcmp.f32 s19, s24
5718 ; CHECK-NEXT: movvs r2, #0
5719 ; CHECK-NEXT: orr.w r6, r6, r2, lsl #4
5720 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5721 ; CHECK-NEXT: str.w r6, [r4, #70]
5723 ; CHECK-NEXT: movlt r0, #0
5724 ; CHECK-NEXT: vcmp.f32 s19, s20
5725 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5727 ; CHECK-NEXT: movgt.w r0, #-1
5728 ; CHECK-NEXT: vcmp.f32 s19, s19
5729 ; CHECK-NEXT: lsrs r2, r2, #28
5730 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5732 ; CHECK-NEXT: movvs r0, #0
5733 ; CHECK-NEXT: lsrs r6, r0, #28
5734 ; CHECK-NEXT: orr.w r1, r6, r1, lsl #4
5735 ; CHECK-NEXT: str.w r1, [r4, #66]
5736 ; CHECK-NEXT: vmov r1, s18
5737 ; CHECK-NEXT: vcmp.f32 s19, s24
5738 ; CHECK-NEXT: vcvtt.f32.f16 s16, s16
5739 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5740 ; CHECK-NEXT: vcmp.f32 s19, s20
5742 ; CHECK-NEXT: mvnlt r3, #7
5743 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5744 ; CHECK-NEXT: vcmp.f32 s19, s19
5746 ; CHECK-NEXT: movgt r3, #7
5747 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5748 ; CHECK-NEXT: vcmp.f32 s28, s24
5750 ; CHECK-NEXT: movvs r3, #0
5751 ; CHECK-NEXT: orr.w r2, r2, r3, lsl #4
5752 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5753 ; CHECK-NEXT: b.w .LBB50_3
5754 ; CHECK-NEXT: .p2align 2
5755 ; CHECK-NEXT: @ %bb.1:
5756 ; CHECK-NEXT: .LCPI50_2:
5757 ; CHECK-NEXT: .long 0xf1000000 @ float -6.338253E+29
5758 ; CHECK-NEXT: .p2align 2
5759 ; CHECK-NEXT: @ %bb.2:
5760 ; CHECK-NEXT: .LCPI50_3:
5761 ; CHECK-NEXT: .long 0x70ffffff @ float 6.33825262E+29
5762 ; CHECK-NEXT: .p2align 1
5763 ; CHECK-NEXT: .LBB50_3:
5764 ; CHECK-NEXT: strb.w r2, [r4, #74]
5766 ; CHECK-NEXT: mvnlt r7, #7
5767 ; CHECK-NEXT: vcmp.f32 s28, s20
5768 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5770 ; CHECK-NEXT: movgt r7, #7
5771 ; CHECK-NEXT: vcmp.f32 s28, s28
5772 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5774 ; CHECK-NEXT: movvs r7, #0
5775 ; CHECK-NEXT: and r2, r7, #15
5776 ; CHECK-NEXT: orr.w r0, r2, r0, lsl #4
5777 ; CHECK-NEXT: str.w r0, [r4, #62]
5778 ; CHECK-NEXT: mov r0, r1
5779 ; CHECK-NEXT: bl __fixsfti
5780 ; CHECK-NEXT: vcmp.f32 s18, s24
5781 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5782 ; CHECK-NEXT: vcmp.f32 s18, s20
5784 ; CHECK-NEXT: movlt r1, #0
5785 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5786 ; CHECK-NEXT: vcmp.f32 s18, s18
5788 ; CHECK-NEXT: movgt.w r1, #-1
5789 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5790 ; CHECK-NEXT: vcmp.f32 s18, s24
5792 ; CHECK-NEXT: movvs r1, #0
5793 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5794 ; CHECK-NEXT: vcmp.f32 s18, s20
5796 ; CHECK-NEXT: movlt r2, #0
5797 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5798 ; CHECK-NEXT: vcmp.f32 s18, s18
5800 ; CHECK-NEXT: movgt.w r2, #-1
5801 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5802 ; CHECK-NEXT: lsr.w r7, r1, #28
5803 ; CHECK-NEXT: vcmp.f32 s18, s24
5805 ; CHECK-NEXT: movvs r2, #0
5806 ; CHECK-NEXT: orr.w r7, r7, r2, lsl #4
5807 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5808 ; CHECK-NEXT: str.w r7, [r4, #45]
5810 ; CHECK-NEXT: movlt r0, #0
5811 ; CHECK-NEXT: vcmp.f32 s18, s20
5812 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5814 ; CHECK-NEXT: movgt.w r0, #-1
5815 ; CHECK-NEXT: vcmp.f32 s18, s18
5816 ; CHECK-NEXT: lsrs r2, r2, #28
5817 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5819 ; CHECK-NEXT: movvs r0, #0
5820 ; CHECK-NEXT: lsrs r7, r0, #28
5821 ; CHECK-NEXT: vcmp.f32 s18, s24
5822 ; CHECK-NEXT: orr.w r7, r7, r1, lsl #4
5823 ; CHECK-NEXT: vmov r1, s16
5824 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5825 ; CHECK-NEXT: vcmp.f32 s18, s20
5826 ; CHECK-NEXT: str.w r7, [r4, #41]
5828 ; CHECK-NEXT: mvnlt r3, #7
5829 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5830 ; CHECK-NEXT: vcmp.f32 s18, s18
5832 ; CHECK-NEXT: movgt r3, #7
5833 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5834 ; CHECK-NEXT: vcmp.f32 s26, s24
5836 ; CHECK-NEXT: movvs r3, #0
5837 ; CHECK-NEXT: orr.w r2, r2, r3, lsl #4
5838 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5839 ; CHECK-NEXT: strb.w r2, [r4, #49]
5841 ; CHECK-NEXT: mvnlt r10, #7
5842 ; CHECK-NEXT: vcmp.f32 s26, s20
5843 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5845 ; CHECK-NEXT: movgt.w r10, #7
5846 ; CHECK-NEXT: vcmp.f32 s26, s26
5847 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5849 ; CHECK-NEXT: movvs.w r10, #0
5850 ; CHECK-NEXT: and r2, r10, #15
5851 ; CHECK-NEXT: orr.w r0, r2, r0, lsl #4
5852 ; CHECK-NEXT: str.w r0, [r4, #37]
5853 ; CHECK-NEXT: mov r0, r1
5854 ; CHECK-NEXT: bl __fixsfti
5855 ; CHECK-NEXT: vcmp.f32 s16, s24
5856 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5857 ; CHECK-NEXT: vcmp.f32 s16, s20
5859 ; CHECK-NEXT: movlt r1, #0
5860 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5861 ; CHECK-NEXT: vcmp.f32 s16, s16
5863 ; CHECK-NEXT: movgt.w r1, #-1
5864 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5865 ; CHECK-NEXT: vcmp.f32 s16, s24
5867 ; CHECK-NEXT: movvs r1, #0
5868 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5869 ; CHECK-NEXT: vcmp.f32 s16, s20
5871 ; CHECK-NEXT: movlt r2, #0
5872 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5873 ; CHECK-NEXT: vcmp.f32 s16, s16
5875 ; CHECK-NEXT: movgt.w r2, #-1
5876 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5877 ; CHECK-NEXT: vcmp.f32 s16, s24
5879 ; CHECK-NEXT: movvs r2, #0
5880 ; CHECK-NEXT: lsrs r7, r1, #28
5881 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5882 ; CHECK-NEXT: vcmp.f32 s16, s20
5883 ; CHECK-NEXT: orr.w r7, r7, r2, lsl #4
5884 ; CHECK-NEXT: str r7, [r4, #20]
5886 ; CHECK-NEXT: movlt r0, #0
5887 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5888 ; CHECK-NEXT: vcmp.f32 s16, s16
5890 ; CHECK-NEXT: movgt.w r0, #-1
5891 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5892 ; CHECK-NEXT: vcmp.f32 s16, s24
5894 ; CHECK-NEXT: movvs r0, #0
5895 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5896 ; CHECK-NEXT: vcmp.f32 s16, s20
5897 ; CHECK-NEXT: lsr.w r7, r0, #28
5898 ; CHECK-NEXT: orr.w r1, r7, r1, lsl #4
5899 ; CHECK-NEXT: str r1, [r4, #16]
5901 ; CHECK-NEXT: mvnlt r3, #7
5902 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5903 ; CHECK-NEXT: vcmp.f32 s16, s16
5905 ; CHECK-NEXT: movgt r3, #7
5906 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5907 ; CHECK-NEXT: lsr.w r1, r2, #28
5908 ; CHECK-NEXT: vcmp.f32 s22, s24
5910 ; CHECK-NEXT: movvs r3, #0
5911 ; CHECK-NEXT: orr.w r1, r1, r3, lsl #4
5912 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5913 ; CHECK-NEXT: strb r1, [r4, #24]
5915 ; CHECK-NEXT: mvnlt r8, #7
5916 ; CHECK-NEXT: vcmp.f32 s22, s20
5917 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5919 ; CHECK-NEXT: movgt.w r8, #7
5920 ; CHECK-NEXT: vcmp.f32 s22, s22
5921 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5923 ; CHECK-NEXT: movvs.w r8, #0
5924 ; CHECK-NEXT: and r1, r8, #15
5925 ; CHECK-NEXT: orr.w r0, r1, r0, lsl #4
5926 ; CHECK-NEXT: str r0, [r4, #12]
5927 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
5928 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, r10, pc}
5929 ; CHECK-NEXT: @ %bb.4:
5930 %x = call <8 x i100> @llvm.fptosi.sat.v8f16.v8i100(<8 x half> %f)
5934 define arm_aapcs_vfpcc <8 x i128> @test_signed_v8f16_v8i128(<8 x half> %f) {
5935 ; CHECK-LABEL: test_signed_v8f16_v8i128:
5937 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, r9, lr}
5938 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, r9, lr}
5939 ; CHECK-NEXT: .pad #4
5940 ; CHECK-NEXT: sub sp, #4
5941 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13, d14, d15}
5942 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
5943 ; CHECK-NEXT: vmov q4, q0
5944 ; CHECK-NEXT: mov r4, r0
5945 ; CHECK-NEXT: vcvtt.f32.f16 s28, s19
5946 ; CHECK-NEXT: vcvtb.f32.f16 s20, s16
5947 ; CHECK-NEXT: vmov r0, s28
5948 ; CHECK-NEXT: vcvtt.f32.f16 s24, s16
5949 ; CHECK-NEXT: vcvtb.f32.f16 s26, s17
5950 ; CHECK-NEXT: vcvtb.f32.f16 s19, s19
5951 ; CHECK-NEXT: vldr s22, .LCPI51_2
5952 ; CHECK-NEXT: vmov r8, s20
5953 ; CHECK-NEXT: vmov r9, s24
5954 ; CHECK-NEXT: vcvtt.f32.f16 s30, s18
5955 ; CHECK-NEXT: vmov r7, s26
5956 ; CHECK-NEXT: vmov r6, s19
5957 ; CHECK-NEXT: bl __fixsfti
5958 ; CHECK-NEXT: vldr s16, .LCPI51_3
5959 ; CHECK-NEXT: vmov r5, s30
5960 ; CHECK-NEXT: vcvtb.f32.f16 s18, s18
5961 ; CHECK-NEXT: vcmp.f32 s28, s16
5962 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5963 ; CHECK-NEXT: vcmp.f32 s28, s22
5965 ; CHECK-NEXT: movlt.w r3, #-2147483648
5966 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5967 ; CHECK-NEXT: vcmp.f32 s28, s28
5969 ; CHECK-NEXT: mvngt r3, #-2147483648
5970 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5971 ; CHECK-NEXT: vcmp.f32 s28, s16
5973 ; CHECK-NEXT: movvs r3, #0
5974 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5975 ; CHECK-NEXT: vcmp.f32 s28, s22
5976 ; CHECK-NEXT: str r3, [r4, #124]
5978 ; CHECK-NEXT: movlt r2, #0
5979 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5980 ; CHECK-NEXT: vcmp.f32 s28, s28
5982 ; CHECK-NEXT: movgt.w r2, #-1
5983 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5984 ; CHECK-NEXT: vcmp.f32 s28, s16
5986 ; CHECK-NEXT: movvs r2, #0
5987 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5988 ; CHECK-NEXT: vcmp.f32 s28, s22
5989 ; CHECK-NEXT: str r2, [r4, #120]
5991 ; CHECK-NEXT: movlt r1, #0
5992 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5993 ; CHECK-NEXT: vcmp.f32 s28, s28
5995 ; CHECK-NEXT: movgt.w r1, #-1
5996 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
5997 ; CHECK-NEXT: vcmp.f32 s28, s16
5999 ; CHECK-NEXT: movvs r1, #0
6000 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6001 ; CHECK-NEXT: str r1, [r4, #116]
6003 ; CHECK-NEXT: movlt r0, #0
6004 ; CHECK-NEXT: vcmp.f32 s28, s22
6005 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6007 ; CHECK-NEXT: movgt.w r0, #-1
6008 ; CHECK-NEXT: vcmp.f32 s28, s28
6009 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6011 ; CHECK-NEXT: movvs r0, #0
6012 ; CHECK-NEXT: str r0, [r4, #112]
6013 ; CHECK-NEXT: mov r0, r6
6014 ; CHECK-NEXT: bl __fixsfti
6015 ; CHECK-NEXT: vcmp.f32 s19, s16
6016 ; CHECK-NEXT: vcvtt.f32.f16 s28, s17
6017 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6018 ; CHECK-NEXT: vcmp.f32 s19, s22
6020 ; CHECK-NEXT: movlt.w r3, #-2147483648
6021 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6022 ; CHECK-NEXT: vcmp.f32 s19, s19
6024 ; CHECK-NEXT: mvngt r3, #-2147483648
6025 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6026 ; CHECK-NEXT: vcmp.f32 s19, s16
6028 ; CHECK-NEXT: movvs r3, #0
6029 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6030 ; CHECK-NEXT: vcmp.f32 s19, s22
6031 ; CHECK-NEXT: str r3, [r4, #108]
6033 ; CHECK-NEXT: movlt r2, #0
6034 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6035 ; CHECK-NEXT: vcmp.f32 s19, s19
6037 ; CHECK-NEXT: movgt.w r2, #-1
6038 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6039 ; CHECK-NEXT: vcmp.f32 s19, s16
6041 ; CHECK-NEXT: movvs r2, #0
6042 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6043 ; CHECK-NEXT: vcmp.f32 s19, s22
6044 ; CHECK-NEXT: str r2, [r4, #104]
6046 ; CHECK-NEXT: movlt r1, #0
6047 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6048 ; CHECK-NEXT: vcmp.f32 s19, s19
6050 ; CHECK-NEXT: movgt.w r1, #-1
6051 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6052 ; CHECK-NEXT: vcmp.f32 s19, s16
6054 ; CHECK-NEXT: movvs r1, #0
6055 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6056 ; CHECK-NEXT: str r1, [r4, #100]
6058 ; CHECK-NEXT: movlt r0, #0
6059 ; CHECK-NEXT: vcmp.f32 s19, s22
6060 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6062 ; CHECK-NEXT: movgt.w r0, #-1
6063 ; CHECK-NEXT: vcmp.f32 s19, s19
6064 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6066 ; CHECK-NEXT: movvs r0, #0
6067 ; CHECK-NEXT: str r0, [r4, #96]
6068 ; CHECK-NEXT: mov r0, r5
6069 ; CHECK-NEXT: vmov r6, s18
6070 ; CHECK-NEXT: bl __fixsfti
6071 ; CHECK-NEXT: vcmp.f32 s30, s16
6072 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6073 ; CHECK-NEXT: vcmp.f32 s30, s22
6075 ; CHECK-NEXT: movlt.w r3, #-2147483648
6076 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6077 ; CHECK-NEXT: vcmp.f32 s30, s30
6079 ; CHECK-NEXT: mvngt r3, #-2147483648
6080 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6081 ; CHECK-NEXT: vcmp.f32 s30, s16
6083 ; CHECK-NEXT: movvs r3, #0
6084 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6085 ; CHECK-NEXT: vcmp.f32 s30, s22
6086 ; CHECK-NEXT: str r3, [r4, #92]
6088 ; CHECK-NEXT: movlt r2, #0
6089 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6090 ; CHECK-NEXT: vcmp.f32 s30, s30
6092 ; CHECK-NEXT: movgt.w r2, #-1
6093 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6094 ; CHECK-NEXT: vcmp.f32 s30, s16
6096 ; CHECK-NEXT: movvs r2, #0
6097 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6098 ; CHECK-NEXT: vcmp.f32 s30, s22
6099 ; CHECK-NEXT: str r2, [r4, #88]
6101 ; CHECK-NEXT: movlt r1, #0
6102 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6103 ; CHECK-NEXT: vcmp.f32 s30, s30
6105 ; CHECK-NEXT: movgt.w r1, #-1
6106 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6107 ; CHECK-NEXT: vcmp.f32 s30, s16
6109 ; CHECK-NEXT: movvs r1, #0
6110 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6111 ; CHECK-NEXT: str r1, [r4, #84]
6113 ; CHECK-NEXT: movlt r0, #0
6114 ; CHECK-NEXT: vcmp.f32 s30, s22
6115 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6117 ; CHECK-NEXT: movgt.w r0, #-1
6118 ; CHECK-NEXT: vcmp.f32 s30, s30
6119 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6121 ; CHECK-NEXT: movvs r0, #0
6122 ; CHECK-NEXT: str r0, [r4, #80]
6123 ; CHECK-NEXT: mov r0, r6
6124 ; CHECK-NEXT: vmov r5, s28
6125 ; CHECK-NEXT: bl __fixsfti
6126 ; CHECK-NEXT: vcmp.f32 s18, s16
6127 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6128 ; CHECK-NEXT: vcmp.f32 s18, s22
6130 ; CHECK-NEXT: movlt.w r3, #-2147483648
6131 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6132 ; CHECK-NEXT: vcmp.f32 s18, s18
6134 ; CHECK-NEXT: mvngt r3, #-2147483648
6135 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6136 ; CHECK-NEXT: vcmp.f32 s18, s16
6138 ; CHECK-NEXT: movvs r3, #0
6139 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6140 ; CHECK-NEXT: vcmp.f32 s18, s22
6141 ; CHECK-NEXT: str r3, [r4, #76]
6143 ; CHECK-NEXT: movlt r2, #0
6144 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6145 ; CHECK-NEXT: vcmp.f32 s18, s18
6147 ; CHECK-NEXT: movgt.w r2, #-1
6148 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6149 ; CHECK-NEXT: vcmp.f32 s18, s16
6151 ; CHECK-NEXT: movvs r2, #0
6152 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6153 ; CHECK-NEXT: vcmp.f32 s18, s22
6154 ; CHECK-NEXT: str r2, [r4, #72]
6156 ; CHECK-NEXT: movlt r1, #0
6157 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6158 ; CHECK-NEXT: vcmp.f32 s18, s18
6160 ; CHECK-NEXT: movgt.w r1, #-1
6161 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6162 ; CHECK-NEXT: vcmp.f32 s18, s16
6164 ; CHECK-NEXT: movvs r1, #0
6165 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6166 ; CHECK-NEXT: str r1, [r4, #68]
6168 ; CHECK-NEXT: movlt r0, #0
6169 ; CHECK-NEXT: vcmp.f32 s18, s22
6170 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6172 ; CHECK-NEXT: movgt.w r0, #-1
6173 ; CHECK-NEXT: vcmp.f32 s18, s18
6174 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6176 ; CHECK-NEXT: movvs r0, #0
6177 ; CHECK-NEXT: str r0, [r4, #64]
6178 ; CHECK-NEXT: mov r0, r5
6179 ; CHECK-NEXT: bl __fixsfti
6180 ; CHECK-NEXT: vcmp.f32 s28, s16
6181 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6182 ; CHECK-NEXT: vcmp.f32 s28, s22
6184 ; CHECK-NEXT: movlt.w r3, #-2147483648
6185 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6186 ; CHECK-NEXT: vcmp.f32 s28, s28
6188 ; CHECK-NEXT: mvngt r3, #-2147483648
6189 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6190 ; CHECK-NEXT: vcmp.f32 s28, s16
6192 ; CHECK-NEXT: movvs r3, #0
6193 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6194 ; CHECK-NEXT: vcmp.f32 s28, s22
6195 ; CHECK-NEXT: str r3, [r4, #60]
6197 ; CHECK-NEXT: movlt r2, #0
6198 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6199 ; CHECK-NEXT: vcmp.f32 s28, s28
6201 ; CHECK-NEXT: movgt.w r2, #-1
6202 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6203 ; CHECK-NEXT: vcmp.f32 s28, s16
6205 ; CHECK-NEXT: movvs r2, #0
6206 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6207 ; CHECK-NEXT: vcmp.f32 s28, s22
6208 ; CHECK-NEXT: str r2, [r4, #56]
6210 ; CHECK-NEXT: movlt r1, #0
6211 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6212 ; CHECK-NEXT: vcmp.f32 s28, s28
6214 ; CHECK-NEXT: movgt.w r1, #-1
6215 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6216 ; CHECK-NEXT: vcmp.f32 s28, s16
6218 ; CHECK-NEXT: movvs r1, #0
6219 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6220 ; CHECK-NEXT: str r1, [r4, #52]
6222 ; CHECK-NEXT: movlt r0, #0
6223 ; CHECK-NEXT: vcmp.f32 s28, s22
6224 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6226 ; CHECK-NEXT: movgt.w r0, #-1
6227 ; CHECK-NEXT: vcmp.f32 s28, s28
6228 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6230 ; CHECK-NEXT: movvs r0, #0
6231 ; CHECK-NEXT: str r0, [r4, #48]
6232 ; CHECK-NEXT: mov r0, r7
6233 ; CHECK-NEXT: bl __fixsfti
6234 ; CHECK-NEXT: vcmp.f32 s26, s16
6235 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6236 ; CHECK-NEXT: vcmp.f32 s26, s22
6238 ; CHECK-NEXT: movlt.w r3, #-2147483648
6239 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6240 ; CHECK-NEXT: vcmp.f32 s26, s26
6242 ; CHECK-NEXT: mvngt r3, #-2147483648
6243 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6244 ; CHECK-NEXT: vcmp.f32 s26, s16
6246 ; CHECK-NEXT: movvs r3, #0
6247 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6248 ; CHECK-NEXT: vcmp.f32 s26, s22
6249 ; CHECK-NEXT: str r3, [r4, #44]
6251 ; CHECK-NEXT: movlt r2, #0
6252 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6253 ; CHECK-NEXT: vcmp.f32 s26, s26
6255 ; CHECK-NEXT: movgt.w r2, #-1
6256 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6257 ; CHECK-NEXT: vcmp.f32 s26, s16
6259 ; CHECK-NEXT: movvs r2, #0
6260 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6261 ; CHECK-NEXT: vcmp.f32 s26, s22
6262 ; CHECK-NEXT: str r2, [r4, #40]
6264 ; CHECK-NEXT: movlt r1, #0
6265 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6266 ; CHECK-NEXT: vcmp.f32 s26, s26
6268 ; CHECK-NEXT: movgt.w r1, #-1
6269 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6270 ; CHECK-NEXT: vcmp.f32 s26, s16
6271 ; CHECK-NEXT: b.w .LBB51_3
6272 ; CHECK-NEXT: .p2align 2
6273 ; CHECK-NEXT: @ %bb.1:
6274 ; CHECK-NEXT: .LCPI51_2:
6275 ; CHECK-NEXT: .long 0x7effffff @ float 1.70141173E+38
6276 ; CHECK-NEXT: .p2align 2
6277 ; CHECK-NEXT: @ %bb.2:
6278 ; CHECK-NEXT: .LCPI51_3:
6279 ; CHECK-NEXT: .long 0xff000000 @ float -1.70141183E+38
6280 ; CHECK-NEXT: .p2align 1
6281 ; CHECK-NEXT: .LBB51_3:
6283 ; CHECK-NEXT: movvs r1, #0
6284 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6285 ; CHECK-NEXT: str r1, [r4, #36]
6287 ; CHECK-NEXT: movlt r0, #0
6288 ; CHECK-NEXT: vcmp.f32 s26, s22
6289 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6291 ; CHECK-NEXT: movgt.w r0, #-1
6292 ; CHECK-NEXT: vcmp.f32 s26, s26
6293 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6295 ; CHECK-NEXT: movvs r0, #0
6296 ; CHECK-NEXT: str r0, [r4, #32]
6297 ; CHECK-NEXT: mov r0, r9
6298 ; CHECK-NEXT: bl __fixsfti
6299 ; CHECK-NEXT: vcmp.f32 s24, s16
6300 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6301 ; CHECK-NEXT: vcmp.f32 s24, s22
6303 ; CHECK-NEXT: movlt.w r3, #-2147483648
6304 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6305 ; CHECK-NEXT: vcmp.f32 s24, s24
6307 ; CHECK-NEXT: mvngt r3, #-2147483648
6308 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6309 ; CHECK-NEXT: vcmp.f32 s24, s16
6311 ; CHECK-NEXT: movvs r3, #0
6312 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6313 ; CHECK-NEXT: vcmp.f32 s24, s22
6314 ; CHECK-NEXT: str r3, [r4, #28]
6316 ; CHECK-NEXT: movlt r2, #0
6317 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6318 ; CHECK-NEXT: vcmp.f32 s24, s24
6320 ; CHECK-NEXT: movgt.w r2, #-1
6321 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6322 ; CHECK-NEXT: vcmp.f32 s24, s16
6324 ; CHECK-NEXT: movvs r2, #0
6325 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6326 ; CHECK-NEXT: vcmp.f32 s24, s22
6327 ; CHECK-NEXT: str r2, [r4, #24]
6329 ; CHECK-NEXT: movlt r1, #0
6330 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6331 ; CHECK-NEXT: vcmp.f32 s24, s24
6333 ; CHECK-NEXT: movgt.w r1, #-1
6334 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6335 ; CHECK-NEXT: vcmp.f32 s24, s16
6337 ; CHECK-NEXT: movvs r1, #0
6338 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6339 ; CHECK-NEXT: str r1, [r4, #20]
6341 ; CHECK-NEXT: movlt r0, #0
6342 ; CHECK-NEXT: vcmp.f32 s24, s22
6343 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6345 ; CHECK-NEXT: movgt.w r0, #-1
6346 ; CHECK-NEXT: vcmp.f32 s24, s24
6347 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6349 ; CHECK-NEXT: movvs r0, #0
6350 ; CHECK-NEXT: str r0, [r4, #16]
6351 ; CHECK-NEXT: mov r0, r8
6352 ; CHECK-NEXT: bl __fixsfti
6353 ; CHECK-NEXT: vcmp.f32 s20, s16
6354 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6355 ; CHECK-NEXT: vcmp.f32 s20, s22
6357 ; CHECK-NEXT: movlt.w r3, #-2147483648
6358 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6359 ; CHECK-NEXT: vcmp.f32 s20, s20
6361 ; CHECK-NEXT: mvngt r3, #-2147483648
6362 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6363 ; CHECK-NEXT: vcmp.f32 s20, s16
6365 ; CHECK-NEXT: movvs r3, #0
6366 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6367 ; CHECK-NEXT: vcmp.f32 s20, s22
6368 ; CHECK-NEXT: str r3, [r4, #12]
6370 ; CHECK-NEXT: movlt r2, #0
6371 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6372 ; CHECK-NEXT: vcmp.f32 s20, s20
6374 ; CHECK-NEXT: movgt.w r2, #-1
6375 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6376 ; CHECK-NEXT: vcmp.f32 s20, s16
6378 ; CHECK-NEXT: movvs r2, #0
6379 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6380 ; CHECK-NEXT: vcmp.f32 s20, s22
6381 ; CHECK-NEXT: str r2, [r4, #8]
6383 ; CHECK-NEXT: movlt r1, #0
6384 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6385 ; CHECK-NEXT: vcmp.f32 s20, s20
6387 ; CHECK-NEXT: movgt.w r1, #-1
6388 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6389 ; CHECK-NEXT: vcmp.f32 s20, s16
6391 ; CHECK-NEXT: movvs r1, #0
6392 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6393 ; CHECK-NEXT: str r1, [r4, #4]
6395 ; CHECK-NEXT: movlt r0, #0
6396 ; CHECK-NEXT: vcmp.f32 s20, s22
6397 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6399 ; CHECK-NEXT: movgt.w r0, #-1
6400 ; CHECK-NEXT: vcmp.f32 s20, s20
6401 ; CHECK-NEXT: vmrs APSR_nzcv, fpscr
6403 ; CHECK-NEXT: movvs r0, #0
6404 ; CHECK-NEXT: str r0, [r4]
6405 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13, d14, d15}
6406 ; CHECK-NEXT: add sp, #4
6407 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, r9, pc}
6408 ; CHECK-NEXT: @ %bb.4:
6409 %x = call <8 x i128> @llvm.fptosi.sat.v8f16.v8i128(<8 x half> %f)