1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 | FileCheck %s --check-prefixes=CHECK,CHECK-CVT
3 ; RUN: llc < %s -mtriple=aarch64 -mattr=+fullfp16 | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
6 ; 32-bit float to unsigned integer
9 declare i1 @llvm.fptoui.sat.i1.f32 (float)
10 declare i8 @llvm.fptoui.sat.i8.f32 (float)
11 declare i13 @llvm.fptoui.sat.i13.f32 (float)
12 declare i16 @llvm.fptoui.sat.i16.f32 (float)
13 declare i19 @llvm.fptoui.sat.i19.f32 (float)
14 declare i32 @llvm.fptoui.sat.i32.f32 (float)
15 declare i50 @llvm.fptoui.sat.i50.f32 (float)
16 declare i64 @llvm.fptoui.sat.i64.f32 (float)
17 declare i100 @llvm.fptoui.sat.i100.f32(float)
18 declare i128 @llvm.fptoui.sat.i128.f32(float)
20 define i1 @test_unsigned_i1_f32(float %f) nounwind {
21 ; CHECK-LABEL: test_unsigned_i1_f32:
23 ; CHECK-NEXT: fcvtzu w8, s0
24 ; CHECK-NEXT: cmp w8, #1
25 ; CHECK-NEXT: csinc w0, w8, wzr, lo
27 %x = call i1 @llvm.fptoui.sat.i1.f32(float %f)
31 define i8 @test_unsigned_i8_f32(float %f) nounwind {
32 ; CHECK-LABEL: test_unsigned_i8_f32:
34 ; CHECK-NEXT: fcvtzu w9, s0
35 ; CHECK-NEXT: mov w8, #255 // =0xff
36 ; CHECK-NEXT: cmp w9, #255
37 ; CHECK-NEXT: csel w0, w9, w8, lo
39 %x = call i8 @llvm.fptoui.sat.i8.f32(float %f)
43 define i13 @test_unsigned_i13_f32(float %f) nounwind {
44 ; CHECK-LABEL: test_unsigned_i13_f32:
46 ; CHECK-NEXT: fcvtzu w8, s0
47 ; CHECK-NEXT: mov w9, #8191 // =0x1fff
48 ; CHECK-NEXT: cmp w8, w9
49 ; CHECK-NEXT: csel w0, w8, w9, lo
51 %x = call i13 @llvm.fptoui.sat.i13.f32(float %f)
55 define i16 @test_unsigned_i16_f32(float %f) nounwind {
56 ; CHECK-LABEL: test_unsigned_i16_f32:
58 ; CHECK-NEXT: fcvtzu w8, s0
59 ; CHECK-NEXT: mov w9, #65535 // =0xffff
60 ; CHECK-NEXT: cmp w8, w9
61 ; CHECK-NEXT: csel w0, w8, w9, lo
63 %x = call i16 @llvm.fptoui.sat.i16.f32(float %f)
67 define i19 @test_unsigned_i19_f32(float %f) nounwind {
68 ; CHECK-LABEL: test_unsigned_i19_f32:
70 ; CHECK-NEXT: fcvtzu w8, s0
71 ; CHECK-NEXT: mov w9, #524287 // =0x7ffff
72 ; CHECK-NEXT: cmp w8, w9
73 ; CHECK-NEXT: csel w0, w8, w9, lo
75 %x = call i19 @llvm.fptoui.sat.i19.f32(float %f)
79 define i32 @test_unsigned_i32_f32(float %f) nounwind {
80 ; CHECK-LABEL: test_unsigned_i32_f32:
82 ; CHECK-NEXT: fcvtzu w0, s0
84 %x = call i32 @llvm.fptoui.sat.i32.f32(float %f)
88 define i50 @test_unsigned_i50_f32(float %f) nounwind {
89 ; CHECK-LABEL: test_unsigned_i50_f32:
91 ; CHECK-NEXT: fcvtzu x8, s0
92 ; CHECK-NEXT: mov x9, #1125899906842623 // =0x3ffffffffffff
93 ; CHECK-NEXT: cmp x8, x9
94 ; CHECK-NEXT: csel x0, x8, x9, lo
96 %x = call i50 @llvm.fptoui.sat.i50.f32(float %f)
100 define i64 @test_unsigned_i64_f32(float %f) nounwind {
101 ; CHECK-LABEL: test_unsigned_i64_f32:
103 ; CHECK-NEXT: fcvtzu x0, s0
105 %x = call i64 @llvm.fptoui.sat.i64.f32(float %f)
109 define i100 @test_unsigned_i100_f32(float %f) nounwind {
110 ; CHECK-LABEL: test_unsigned_i100_f32:
112 ; CHECK-NEXT: str d8, [sp, #-16]! // 8-byte Folded Spill
113 ; CHECK-NEXT: str x30, [sp, #8] // 8-byte Folded Spill
114 ; CHECK-NEXT: fmov s8, s0
115 ; CHECK-NEXT: bl __fixunssfti
116 ; CHECK-NEXT: mov w8, #1904214015 // =0x717fffff
117 ; CHECK-NEXT: fcmp s8, #0.0
118 ; CHECK-NEXT: mov x10, #68719476735 // =0xfffffffff
119 ; CHECK-NEXT: fmov s0, w8
120 ; CHECK-NEXT: ldr x30, [sp, #8] // 8-byte Folded Reload
121 ; CHECK-NEXT: csel x8, xzr, x0, lt
122 ; CHECK-NEXT: csel x9, xzr, x1, lt
123 ; CHECK-NEXT: fcmp s8, s0
124 ; CHECK-NEXT: csel x1, x10, x9, gt
125 ; CHECK-NEXT: csinv x0, x8, xzr, le
126 ; CHECK-NEXT: ldr d8, [sp], #16 // 8-byte Folded Reload
128 %x = call i100 @llvm.fptoui.sat.i100.f32(float %f)
132 define i128 @test_unsigned_i128_f32(float %f) nounwind {
133 ; CHECK-LABEL: test_unsigned_i128_f32:
135 ; CHECK-NEXT: str d8, [sp, #-16]! // 8-byte Folded Spill
136 ; CHECK-NEXT: str x30, [sp, #8] // 8-byte Folded Spill
137 ; CHECK-NEXT: fmov s8, s0
138 ; CHECK-NEXT: bl __fixunssfti
139 ; CHECK-NEXT: mov w8, #2139095039 // =0x7f7fffff
140 ; CHECK-NEXT: fcmp s8, #0.0
141 ; CHECK-NEXT: ldr x30, [sp, #8] // 8-byte Folded Reload
142 ; CHECK-NEXT: fmov s0, w8
143 ; CHECK-NEXT: csel x8, xzr, x1, lt
144 ; CHECK-NEXT: csel x9, xzr, x0, lt
145 ; CHECK-NEXT: fcmp s8, s0
146 ; CHECK-NEXT: csinv x0, x9, xzr, le
147 ; CHECK-NEXT: csinv x1, x8, xzr, le
148 ; CHECK-NEXT: ldr d8, [sp], #16 // 8-byte Folded Reload
150 %x = call i128 @llvm.fptoui.sat.i128.f32(float %f)
155 ; 64-bit float to unsigned integer
158 declare i1 @llvm.fptoui.sat.i1.f64 (double)
159 declare i8 @llvm.fptoui.sat.i8.f64 (double)
160 declare i13 @llvm.fptoui.sat.i13.f64 (double)
161 declare i16 @llvm.fptoui.sat.i16.f64 (double)
162 declare i19 @llvm.fptoui.sat.i19.f64 (double)
163 declare i32 @llvm.fptoui.sat.i32.f64 (double)
164 declare i50 @llvm.fptoui.sat.i50.f64 (double)
165 declare i64 @llvm.fptoui.sat.i64.f64 (double)
166 declare i100 @llvm.fptoui.sat.i100.f64(double)
167 declare i128 @llvm.fptoui.sat.i128.f64(double)
169 define i1 @test_unsigned_i1_f64(double %f) nounwind {
170 ; CHECK-LABEL: test_unsigned_i1_f64:
172 ; CHECK-NEXT: fcvtzu w8, d0
173 ; CHECK-NEXT: cmp w8, #1
174 ; CHECK-NEXT: csinc w0, w8, wzr, lo
176 %x = call i1 @llvm.fptoui.sat.i1.f64(double %f)
180 define i8 @test_unsigned_i8_f64(double %f) nounwind {
181 ; CHECK-LABEL: test_unsigned_i8_f64:
183 ; CHECK-NEXT: fcvtzu w9, d0
184 ; CHECK-NEXT: mov w8, #255 // =0xff
185 ; CHECK-NEXT: cmp w9, #255
186 ; CHECK-NEXT: csel w0, w9, w8, lo
188 %x = call i8 @llvm.fptoui.sat.i8.f64(double %f)
192 define i13 @test_unsigned_i13_f64(double %f) nounwind {
193 ; CHECK-LABEL: test_unsigned_i13_f64:
195 ; CHECK-NEXT: fcvtzu w8, d0
196 ; CHECK-NEXT: mov w9, #8191 // =0x1fff
197 ; CHECK-NEXT: cmp w8, w9
198 ; CHECK-NEXT: csel w0, w8, w9, lo
200 %x = call i13 @llvm.fptoui.sat.i13.f64(double %f)
204 define i16 @test_unsigned_i16_f64(double %f) nounwind {
205 ; CHECK-LABEL: test_unsigned_i16_f64:
207 ; CHECK-NEXT: fcvtzu w8, d0
208 ; CHECK-NEXT: mov w9, #65535 // =0xffff
209 ; CHECK-NEXT: cmp w8, w9
210 ; CHECK-NEXT: csel w0, w8, w9, lo
212 %x = call i16 @llvm.fptoui.sat.i16.f64(double %f)
216 define i19 @test_unsigned_i19_f64(double %f) nounwind {
217 ; CHECK-LABEL: test_unsigned_i19_f64:
219 ; CHECK-NEXT: fcvtzu w8, d0
220 ; CHECK-NEXT: mov w9, #524287 // =0x7ffff
221 ; CHECK-NEXT: cmp w8, w9
222 ; CHECK-NEXT: csel w0, w8, w9, lo
224 %x = call i19 @llvm.fptoui.sat.i19.f64(double %f)
228 define i32 @test_unsigned_i32_f64(double %f) nounwind {
229 ; CHECK-LABEL: test_unsigned_i32_f64:
231 ; CHECK-NEXT: fcvtzu w0, d0
233 %x = call i32 @llvm.fptoui.sat.i32.f64(double %f)
237 define i50 @test_unsigned_i50_f64(double %f) nounwind {
238 ; CHECK-LABEL: test_unsigned_i50_f64:
240 ; CHECK-NEXT: fcvtzu x8, d0
241 ; CHECK-NEXT: mov x9, #1125899906842623 // =0x3ffffffffffff
242 ; CHECK-NEXT: cmp x8, x9
243 ; CHECK-NEXT: csel x0, x8, x9, lo
245 %x = call i50 @llvm.fptoui.sat.i50.f64(double %f)
249 define i64 @test_unsigned_i64_f64(double %f) nounwind {
250 ; CHECK-LABEL: test_unsigned_i64_f64:
252 ; CHECK-NEXT: fcvtzu x0, d0
254 %x = call i64 @llvm.fptoui.sat.i64.f64(double %f)
258 define i100 @test_unsigned_i100_f64(double %f) nounwind {
259 ; CHECK-LABEL: test_unsigned_i100_f64:
261 ; CHECK-NEXT: str d8, [sp, #-16]! // 8-byte Folded Spill
262 ; CHECK-NEXT: str x30, [sp, #8] // 8-byte Folded Spill
263 ; CHECK-NEXT: fmov d8, d0
264 ; CHECK-NEXT: bl __fixunsdfti
265 ; CHECK-NEXT: mov x8, #5057542381537067007 // =0x462fffffffffffff
266 ; CHECK-NEXT: fcmp d8, #0.0
267 ; CHECK-NEXT: mov x10, #68719476735 // =0xfffffffff
268 ; CHECK-NEXT: fmov d0, x8
269 ; CHECK-NEXT: ldr x30, [sp, #8] // 8-byte Folded Reload
270 ; CHECK-NEXT: csel x8, xzr, x0, lt
271 ; CHECK-NEXT: csel x9, xzr, x1, lt
272 ; CHECK-NEXT: fcmp d8, d0
273 ; CHECK-NEXT: csel x1, x10, x9, gt
274 ; CHECK-NEXT: csinv x0, x8, xzr, le
275 ; CHECK-NEXT: ldr d8, [sp], #16 // 8-byte Folded Reload
277 %x = call i100 @llvm.fptoui.sat.i100.f64(double %f)
281 define i128 @test_unsigned_i128_f64(double %f) nounwind {
282 ; CHECK-LABEL: test_unsigned_i128_f64:
284 ; CHECK-NEXT: str d8, [sp, #-16]! // 8-byte Folded Spill
285 ; CHECK-NEXT: str x30, [sp, #8] // 8-byte Folded Spill
286 ; CHECK-NEXT: fmov d8, d0
287 ; CHECK-NEXT: bl __fixunsdfti
288 ; CHECK-NEXT: mov x8, #5183643171103440895 // =0x47efffffffffffff
289 ; CHECK-NEXT: fcmp d8, #0.0
290 ; CHECK-NEXT: ldr x30, [sp, #8] // 8-byte Folded Reload
291 ; CHECK-NEXT: fmov d0, x8
292 ; CHECK-NEXT: csel x8, xzr, x1, lt
293 ; CHECK-NEXT: csel x9, xzr, x0, lt
294 ; CHECK-NEXT: fcmp d8, d0
295 ; CHECK-NEXT: csinv x0, x9, xzr, le
296 ; CHECK-NEXT: csinv x1, x8, xzr, le
297 ; CHECK-NEXT: ldr d8, [sp], #16 // 8-byte Folded Reload
299 %x = call i128 @llvm.fptoui.sat.i128.f64(double %f)
304 ; 16-bit float to unsigned integer
307 declare i1 @llvm.fptoui.sat.i1.f16 (half)
308 declare i8 @llvm.fptoui.sat.i8.f16 (half)
309 declare i13 @llvm.fptoui.sat.i13.f16 (half)
310 declare i16 @llvm.fptoui.sat.i16.f16 (half)
311 declare i19 @llvm.fptoui.sat.i19.f16 (half)
312 declare i32 @llvm.fptoui.sat.i32.f16 (half)
313 declare i50 @llvm.fptoui.sat.i50.f16 (half)
314 declare i64 @llvm.fptoui.sat.i64.f16 (half)
315 declare i100 @llvm.fptoui.sat.i100.f16(half)
316 declare i128 @llvm.fptoui.sat.i128.f16(half)
318 define i1 @test_unsigned_i1_f16(half %f) nounwind {
319 ; CHECK-CVT-LABEL: test_unsigned_i1_f16:
320 ; CHECK-CVT: // %bb.0:
321 ; CHECK-CVT-NEXT: fcvt s0, h0
322 ; CHECK-CVT-NEXT: fcvtzu w8, s0
323 ; CHECK-CVT-NEXT: cmp w8, #1
324 ; CHECK-CVT-NEXT: csinc w0, w8, wzr, lo
325 ; CHECK-CVT-NEXT: ret
327 ; CHECK-FP16-LABEL: test_unsigned_i1_f16:
328 ; CHECK-FP16: // %bb.0:
329 ; CHECK-FP16-NEXT: fcvtzu w8, h0
330 ; CHECK-FP16-NEXT: cmp w8, #1
331 ; CHECK-FP16-NEXT: csinc w0, w8, wzr, lo
332 ; CHECK-FP16-NEXT: ret
333 %x = call i1 @llvm.fptoui.sat.i1.f16(half %f)
337 define i8 @test_unsigned_i8_f16(half %f) nounwind {
338 ; CHECK-CVT-LABEL: test_unsigned_i8_f16:
339 ; CHECK-CVT: // %bb.0:
340 ; CHECK-CVT-NEXT: fcvt s0, h0
341 ; CHECK-CVT-NEXT: mov w8, #255 // =0xff
342 ; CHECK-CVT-NEXT: fcvtzu w9, s0
343 ; CHECK-CVT-NEXT: cmp w9, #255
344 ; CHECK-CVT-NEXT: csel w0, w9, w8, lo
345 ; CHECK-CVT-NEXT: ret
347 ; CHECK-FP16-LABEL: test_unsigned_i8_f16:
348 ; CHECK-FP16: // %bb.0:
349 ; CHECK-FP16-NEXT: fcvtzu w9, h0
350 ; CHECK-FP16-NEXT: mov w8, #255 // =0xff
351 ; CHECK-FP16-NEXT: cmp w9, #255
352 ; CHECK-FP16-NEXT: csel w0, w9, w8, lo
353 ; CHECK-FP16-NEXT: ret
354 %x = call i8 @llvm.fptoui.sat.i8.f16(half %f)
358 define i13 @test_unsigned_i13_f16(half %f) nounwind {
359 ; CHECK-CVT-LABEL: test_unsigned_i13_f16:
360 ; CHECK-CVT: // %bb.0:
361 ; CHECK-CVT-NEXT: fcvt s0, h0
362 ; CHECK-CVT-NEXT: mov w9, #8191 // =0x1fff
363 ; CHECK-CVT-NEXT: fcvtzu w8, s0
364 ; CHECK-CVT-NEXT: cmp w8, w9
365 ; CHECK-CVT-NEXT: csel w0, w8, w9, lo
366 ; CHECK-CVT-NEXT: ret
368 ; CHECK-FP16-LABEL: test_unsigned_i13_f16:
369 ; CHECK-FP16: // %bb.0:
370 ; CHECK-FP16-NEXT: fcvtzu w8, h0
371 ; CHECK-FP16-NEXT: mov w9, #8191 // =0x1fff
372 ; CHECK-FP16-NEXT: cmp w8, w9
373 ; CHECK-FP16-NEXT: csel w0, w8, w9, lo
374 ; CHECK-FP16-NEXT: ret
375 %x = call i13 @llvm.fptoui.sat.i13.f16(half %f)
379 define i16 @test_unsigned_i16_f16(half %f) nounwind {
380 ; CHECK-CVT-LABEL: test_unsigned_i16_f16:
381 ; CHECK-CVT: // %bb.0:
382 ; CHECK-CVT-NEXT: fcvt s0, h0
383 ; CHECK-CVT-NEXT: mov w9, #65535 // =0xffff
384 ; CHECK-CVT-NEXT: fcvtzu w8, s0
385 ; CHECK-CVT-NEXT: cmp w8, w9
386 ; CHECK-CVT-NEXT: csel w0, w8, w9, lo
387 ; CHECK-CVT-NEXT: ret
389 ; CHECK-FP16-LABEL: test_unsigned_i16_f16:
390 ; CHECK-FP16: // %bb.0:
391 ; CHECK-FP16-NEXT: fcvtzu w8, h0
392 ; CHECK-FP16-NEXT: mov w9, #65535 // =0xffff
393 ; CHECK-FP16-NEXT: cmp w8, w9
394 ; CHECK-FP16-NEXT: csel w0, w8, w9, lo
395 ; CHECK-FP16-NEXT: ret
396 %x = call i16 @llvm.fptoui.sat.i16.f16(half %f)
400 define i19 @test_unsigned_i19_f16(half %f) nounwind {
401 ; CHECK-CVT-LABEL: test_unsigned_i19_f16:
402 ; CHECK-CVT: // %bb.0:
403 ; CHECK-CVT-NEXT: fcvt s0, h0
404 ; CHECK-CVT-NEXT: mov w9, #524287 // =0x7ffff
405 ; CHECK-CVT-NEXT: fcvtzu w8, s0
406 ; CHECK-CVT-NEXT: cmp w8, w9
407 ; CHECK-CVT-NEXT: csel w0, w8, w9, lo
408 ; CHECK-CVT-NEXT: ret
410 ; CHECK-FP16-LABEL: test_unsigned_i19_f16:
411 ; CHECK-FP16: // %bb.0:
412 ; CHECK-FP16-NEXT: fcvtzu w8, h0
413 ; CHECK-FP16-NEXT: mov w9, #524287 // =0x7ffff
414 ; CHECK-FP16-NEXT: cmp w8, w9
415 ; CHECK-FP16-NEXT: csel w0, w8, w9, lo
416 ; CHECK-FP16-NEXT: ret
417 %x = call i19 @llvm.fptoui.sat.i19.f16(half %f)
421 define i32 @test_unsigned_i32_f16(half %f) nounwind {
422 ; CHECK-CVT-LABEL: test_unsigned_i32_f16:
423 ; CHECK-CVT: // %bb.0:
424 ; CHECK-CVT-NEXT: fcvt s0, h0
425 ; CHECK-CVT-NEXT: fcvtzu w0, s0
426 ; CHECK-CVT-NEXT: ret
428 ; CHECK-FP16-LABEL: test_unsigned_i32_f16:
429 ; CHECK-FP16: // %bb.0:
430 ; CHECK-FP16-NEXT: fcvtzu w0, h0
431 ; CHECK-FP16-NEXT: ret
432 %x = call i32 @llvm.fptoui.sat.i32.f16(half %f)
436 define i50 @test_unsigned_i50_f16(half %f) nounwind {
437 ; CHECK-CVT-LABEL: test_unsigned_i50_f16:
438 ; CHECK-CVT: // %bb.0:
439 ; CHECK-CVT-NEXT: fcvt s0, h0
440 ; CHECK-CVT-NEXT: mov x9, #1125899906842623 // =0x3ffffffffffff
441 ; CHECK-CVT-NEXT: fcvtzu x8, s0
442 ; CHECK-CVT-NEXT: cmp x8, x9
443 ; CHECK-CVT-NEXT: csel x0, x8, x9, lo
444 ; CHECK-CVT-NEXT: ret
446 ; CHECK-FP16-LABEL: test_unsigned_i50_f16:
447 ; CHECK-FP16: // %bb.0:
448 ; CHECK-FP16-NEXT: fcvtzu x8, h0
449 ; CHECK-FP16-NEXT: mov x9, #1125899906842623 // =0x3ffffffffffff
450 ; CHECK-FP16-NEXT: cmp x8, x9
451 ; CHECK-FP16-NEXT: csel x0, x8, x9, lo
452 ; CHECK-FP16-NEXT: ret
453 %x = call i50 @llvm.fptoui.sat.i50.f16(half %f)
457 define i64 @test_unsigned_i64_f16(half %f) nounwind {
458 ; CHECK-CVT-LABEL: test_unsigned_i64_f16:
459 ; CHECK-CVT: // %bb.0:
460 ; CHECK-CVT-NEXT: fcvt s0, h0
461 ; CHECK-CVT-NEXT: fcvtzu x0, s0
462 ; CHECK-CVT-NEXT: ret
464 ; CHECK-FP16-LABEL: test_unsigned_i64_f16:
465 ; CHECK-FP16: // %bb.0:
466 ; CHECK-FP16-NEXT: fcvtzu x0, h0
467 ; CHECK-FP16-NEXT: ret
468 %x = call i64 @llvm.fptoui.sat.i64.f16(half %f)
472 define i100 @test_unsigned_i100_f16(half %f) nounwind {
473 ; CHECK-LABEL: test_unsigned_i100_f16:
475 ; CHECK-NEXT: str d8, [sp, #-16]! // 8-byte Folded Spill
476 ; CHECK-NEXT: fcvt s8, h0
477 ; CHECK-NEXT: str x30, [sp, #8] // 8-byte Folded Spill
478 ; CHECK-NEXT: fmov s0, s8
479 ; CHECK-NEXT: bl __fixunssfti
480 ; CHECK-NEXT: mov w8, #1904214015 // =0x717fffff
481 ; CHECK-NEXT: fcmp s8, #0.0
482 ; CHECK-NEXT: mov x10, #68719476735 // =0xfffffffff
483 ; CHECK-NEXT: fmov s0, w8
484 ; CHECK-NEXT: ldr x30, [sp, #8] // 8-byte Folded Reload
485 ; CHECK-NEXT: csel x8, xzr, x0, lt
486 ; CHECK-NEXT: csel x9, xzr, x1, lt
487 ; CHECK-NEXT: fcmp s8, s0
488 ; CHECK-NEXT: csel x1, x10, x9, gt
489 ; CHECK-NEXT: csinv x0, x8, xzr, le
490 ; CHECK-NEXT: ldr d8, [sp], #16 // 8-byte Folded Reload
492 %x = call i100 @llvm.fptoui.sat.i100.f16(half %f)
496 define i128 @test_unsigned_i128_f16(half %f) nounwind {
497 ; CHECK-LABEL: test_unsigned_i128_f16:
499 ; CHECK-NEXT: str d8, [sp, #-16]! // 8-byte Folded Spill
500 ; CHECK-NEXT: fcvt s8, h0
501 ; CHECK-NEXT: str x30, [sp, #8] // 8-byte Folded Spill
502 ; CHECK-NEXT: fmov s0, s8
503 ; CHECK-NEXT: bl __fixunssfti
504 ; CHECK-NEXT: mov w8, #2139095039 // =0x7f7fffff
505 ; CHECK-NEXT: fcmp s8, #0.0
506 ; CHECK-NEXT: ldr x30, [sp, #8] // 8-byte Folded Reload
507 ; CHECK-NEXT: fmov s0, w8
508 ; CHECK-NEXT: csel x8, xzr, x1, lt
509 ; CHECK-NEXT: csel x9, xzr, x0, lt
510 ; CHECK-NEXT: fcmp s8, s0
511 ; CHECK-NEXT: csinv x0, x9, xzr, le
512 ; CHECK-NEXT: csinv x1, x8, xzr, le
513 ; CHECK-NEXT: ldr d8, [sp], #16 // 8-byte Folded Reload
515 %x = call i128 @llvm.fptoui.sat.i128.f16(half %f)