1 ; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 define signext i32 @i() {
6 ; CHECK-NEXT: lea %s0, -2147483648
7 ; CHECK-NEXT: b.l.t (, %s10)
11 define zeroext i32 @ui() {
14 ; CHECK-NEXT: lea %s0, -2147483648
15 ; CHECK-NEXT: and %s0, %s0, (32)0
16 ; CHECK-NEXT: b.l.t (, %s10)
23 ; CHECK-NEXT: lea %s0, -2147483648
24 ; CHECK-NEXT: b.l.t (, %s10)
31 ; CHECK-NEXT: lea %s0, -2147483648
32 ; CHECK-NEXT: and %s0, %s0, (32)0
33 ; CHECK-NEXT: b.l.t (, %s10)
37 define signext i8 @d2c(double %x) {
40 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
41 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
42 ; CHECK-NEXT: b.l.t (, %s10)
43 %r = fptosi double %x to i8
47 define zeroext i8 @d2uc(double %x) {
50 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
51 ; CHECK-NEXT: adds.w.zx %s0, %s0, (0)1
52 ; CHECK-NEXT: b.l.t (, %s10)
53 %r = fptoui double %x to i8
57 define signext i16 @d2s(double %x) {
60 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
61 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
62 ; CHECK-NEXT: b.l.t (, %s10)
63 %r = fptosi double %x to i16
67 define zeroext i16 @d2us(double %x) {
70 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
71 ; CHECK-NEXT: adds.w.zx %s0, %s0, (0)1
72 ; CHECK-NEXT: b.l.t (, %s10)
73 %r = fptoui double %x to i16
77 define signext i32 @d2i(double %x) {
80 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
81 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
82 ; CHECK-NEXT: b.l.t (, %s10)
83 %r = fptosi double %x to i32
87 define zeroext i32 @d2ui(double %x) {
90 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
91 ; CHECK-NEXT: and %s0, %s0, (32)0
92 ; CHECK-NEXT: b.l.t (, %s10)
93 %r = fptoui double %x to i32
97 define i64 @d2ll(double %x) {
100 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
101 ; CHECK-NEXT: b.l.t (, %s10)
102 %r = fptosi double %x to i64
106 define i64 @d2ull(double %x) {
107 ; CHECK-LABEL: d2ull:
109 ; CHECK-NEXT: lea.sl %s1, 1138753536
110 ; CHECK-NEXT: fcmp.d %s2, %s0, %s1
111 ; CHECK-NEXT: fsub.d %s1, %s0, %s1
112 ; CHECK-NEXT: cvt.l.d.rz %s1, %s1
113 ; CHECK-NEXT: xor %s1, %s1, (1)1
114 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
115 ; CHECK-NEXT: cmov.d.lt %s1, %s0, %s2
116 ; CHECK-NEXT: or %s0, 0, %s1
117 ; CHECK-NEXT: b.l.t (, %s10)
118 %r = fptoui double %x to i64
122 define float @d2f(double %x) {
125 ; CHECK-NEXT: cvt.s.d %s0, %s0
126 ; CHECK-NEXT: b.l.t (, %s10)
127 %r = fptrunc double %x to float
131 define double @d2d(double returned %0) {
134 ; CHECK-NEXT: b.l.t (, %s10)
138 define fp128 @d2q(double) {
141 ; CHECK-NEXT: cvt.q.d %s0, %s0
142 ; CHECK-NEXT: b.l.t (, %s10)
143 %2 = fpext double %0 to fp128
147 define signext i8 @q2c(fp128) {
150 ; CHECK-NEXT: cvt.d.q %s0, %s0
151 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
152 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
153 ; CHECK-NEXT: b.l.t (, %s10)
154 %2 = fptosi fp128 %0 to i8
158 define zeroext i8 @q2uc(fp128) {
161 ; CHECK-NEXT: cvt.d.q %s0, %s0
162 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
163 ; CHECK-NEXT: adds.w.zx %s0, %s0, (0)1
164 ; CHECK-NEXT: b.l.t (, %s10)
165 %2 = fptoui fp128 %0 to i8
169 define signext i16 @q2s(fp128) {
172 ; CHECK-NEXT: cvt.d.q %s0, %s0
173 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
174 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
175 ; CHECK-NEXT: b.l.t (, %s10)
176 %2 = fptosi fp128 %0 to i16
180 define zeroext i16 @q2us(fp128) {
183 ; CHECK-NEXT: cvt.d.q %s0, %s0
184 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
185 ; CHECK-NEXT: adds.w.zx %s0, %s0, (0)1
186 ; CHECK-NEXT: b.l.t (, %s10)
187 %2 = fptoui fp128 %0 to i16
191 define signext i32 @q2i(fp128) {
194 ; CHECK-NEXT: cvt.d.q %s0, %s0
195 ; CHECK-NEXT: cvt.w.d.sx.rz %s0, %s0
196 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
197 ; CHECK-NEXT: b.l.t (, %s10)
198 %2 = fptosi fp128 %0 to i32
202 define zeroext i32 @q2ui(fp128) {
205 ; CHECK-NEXT: cvt.d.q %s0, %s0
206 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
207 ; CHECK-NEXT: and %s0, %s0, (32)0
208 ; CHECK-NEXT: b.l.t (, %s10)
209 %2 = fptoui fp128 %0 to i32
213 define i64 @q2ll(fp128) {
216 ; CHECK-NEXT: cvt.d.q %s0, %s0
217 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
218 ; CHECK-NEXT: b.l.t (, %s10)
219 %2 = fptosi fp128 %0 to i64
223 define i64 @q2ull(fp128) {
224 ; CHECK-LABEL: q2ull:
226 ; CHECK-NEXT: lea %s2, .LCPI{{[0-9]+}}_0@lo
227 ; CHECK-NEXT: and %s2, %s2, (32)0
228 ; CHECK-NEXT: lea.sl %s2, .LCPI{{[0-9]+}}_0@hi(, %s2)
229 ; CHECK-NEXT: ld %s4, 8(, %s2)
230 ; CHECK-NEXT: ld %s5, (, %s2)
231 ; CHECK-NEXT: fcmp.q %s3, %s0, %s4
232 ; CHECK-NEXT: fsub.q %s4, %s0, %s4
233 ; CHECK-NEXT: cvt.d.q %s2, %s4
234 ; CHECK-NEXT: cvt.l.d.rz %s2, %s2
235 ; CHECK-NEXT: xor %s2, %s2, (1)1
236 ; CHECK-NEXT: cvt.d.q %s0, %s0
237 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
238 ; CHECK-NEXT: cmov.d.lt %s2, %s0, %s3
239 ; CHECK-NEXT: or %s0, 0, %s2
240 ; CHECK-NEXT: b.l.t (, %s10)
241 %2 = fptoui fp128 %0 to i64
245 define float @q2f(fp128) {
248 ; CHECK-NEXT: cvt.s.q %s0, %s0
249 ; CHECK-NEXT: b.l.t (, %s10)
250 %2 = fptrunc fp128 %0 to float
254 define double @q2d(fp128) {
257 ; CHECK-NEXT: cvt.d.q %s0, %s0
258 ; CHECK-NEXT: b.l.t (, %s10)
259 %2 = fptrunc fp128 %0 to double
263 define fp128 @q2q(fp128 returned) {
266 ; CHECK-NEXT: b.l.t (, %s10)
270 define signext i8 @f2c(float %x) {
273 ; CHECK-NEXT: cvt.w.s.sx.rz %s0, %s0
274 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
275 ; CHECK-NEXT: b.l.t (, %s10)
276 %r = fptosi float %x to i8
280 define zeroext i8 @f2uc(float %x) {
283 ; CHECK-NEXT: cvt.w.s.sx.rz %s0, %s0
284 ; CHECK-NEXT: adds.w.zx %s0, %s0, (0)1
285 ; CHECK-NEXT: b.l.t (, %s10)
286 %r = fptoui float %x to i8
290 define signext i16 @f2s(float %x) {
293 ; CHECK-NEXT: cvt.w.s.sx.rz %s0, %s0
294 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
295 ; CHECK-NEXT: b.l.t (, %s10)
296 %r = fptosi float %x to i16
300 define zeroext i16 @f2us(float %x) {
303 ; CHECK-NEXT: cvt.w.s.sx.rz %s0, %s0
304 ; CHECK-NEXT: adds.w.zx %s0, %s0, (0)1
305 ; CHECK-NEXT: b.l.t (, %s10)
306 %r = fptoui float %x to i16
310 define signext i32 @f2i(float %x) {
313 ; CHECK-NEXT: cvt.w.s.sx.rz %s0, %s0
314 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
315 ; CHECK-NEXT: b.l.t (, %s10)
316 %r = fptosi float %x to i32
320 define zeroext i32 @f2ui(float %x) {
323 ; CHECK-NEXT: cvt.d.s %s0, %s0
324 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
325 ; CHECK-NEXT: and %s0, %s0, (32)0
326 ; CHECK-NEXT: b.l.t (, %s10)
327 %r = fptoui float %x to i32
331 define i64 @f2ll(float %x) {
334 ; CHECK-NEXT: cvt.d.s %s0, %s0
335 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
336 ; CHECK-NEXT: b.l.t (, %s10)
337 %r = fptosi float %x to i64
341 define i64 @f2ull(float %x) {
342 ; CHECK-LABEL: f2ull:
344 ; CHECK-NEXT: lea.sl %s1, 1593835520
345 ; CHECK-NEXT: fcmp.s %s2, %s0, %s1
346 ; CHECK-NEXT: fsub.s %s1, %s0, %s1
347 ; CHECK-NEXT: cvt.d.s %s1, %s1
348 ; CHECK-NEXT: cvt.l.d.rz %s1, %s1
349 ; CHECK-NEXT: xor %s1, %s1, (1)1
350 ; CHECK-NEXT: cvt.d.s %s0, %s0
351 ; CHECK-NEXT: cvt.l.d.rz %s0, %s0
352 ; CHECK-NEXT: cmov.s.lt %s1, %s0, %s2
353 ; CHECK-NEXT: or %s0, 0, %s1
354 ; CHECK-NEXT: b.l.t (, %s10)
355 %r = fptoui float %x to i64
359 define float @f2f(float returned %0) {
362 ; CHECK-NEXT: b.l.t (, %s10)
366 define double @f2d(float %x) {
369 ; CHECK-NEXT: cvt.d.s %s0, %s0
370 ; CHECK-NEXT: b.l.t (, %s10)
371 %r = fpext float %x to double
375 define fp128 @f2q(float) {
378 ; CHECK-NEXT: cvt.q.s %s0, %s0
379 ; CHECK-NEXT: b.l.t (, %s10)
380 %2 = fpext float %0 to fp128
384 define signext i8 @ll2c(i64 %0) {
387 ; CHECK-NEXT: sll %s0, %s0, 56
388 ; CHECK-NEXT: sra.l %s0, %s0, 56
389 ; CHECK-NEXT: b.l.t (, %s10)
390 %2 = trunc i64 %0 to i8
394 define zeroext i8 @ll2uc(i64 %0) {
395 ; CHECK-LABEL: ll2uc:
397 ; CHECK-NEXT: and %s0, %s0, (56)0
398 ; CHECK-NEXT: b.l.t (, %s10)
399 %2 = trunc i64 %0 to i8
403 define signext i16 @ll2s(i64 %0) {
406 ; CHECK-NEXT: sll %s0, %s0, 48
407 ; CHECK-NEXT: sra.l %s0, %s0, 48
408 ; CHECK-NEXT: b.l.t (, %s10)
409 %2 = trunc i64 %0 to i16
413 define zeroext i16 @ll2us(i64 %0) {
414 ; CHECK-LABEL: ll2us:
416 ; CHECK-NEXT: and %s0, %s0, (48)0
417 ; CHECK-NEXT: b.l.t (, %s10)
418 %2 = trunc i64 %0 to i16
422 define signext i32 @ll2i(i64 %0) {
425 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
426 ; CHECK-NEXT: b.l.t (, %s10)
427 %2 = trunc i64 %0 to i32
431 define zeroext i32 @ll2ui(i64 %0) {
432 ; CHECK-LABEL: ll2ui:
434 ; CHECK-NEXT: and %s0, %s0, (32)0
435 ; CHECK-NEXT: b.l.t (, %s10)
436 %2 = trunc i64 %0 to i32
440 define i64 @ll2ll(i64 returned %0) {
441 ; CHECK-LABEL: ll2ll:
443 ; CHECK-NEXT: b.l.t (, %s10)
447 define i64 @ll2ull(i64 returned %0) {
448 ; CHECK-LABEL: ll2ull:
450 ; CHECK-NEXT: b.l.t (, %s10)
454 define float @ll2f(i64 %x) {
457 ; CHECK-NEXT: cvt.d.l %s0, %s0
458 ; CHECK-NEXT: cvt.s.d %s0, %s0
459 ; CHECK-NEXT: b.l.t (, %s10)
460 %r = sitofp i64 %x to float
464 define double @ll2d(i64 %x) {
467 ; CHECK-NEXT: cvt.d.l %s0, %s0
468 ; CHECK-NEXT: b.l.t (, %s10)
469 %r = sitofp i64 %x to double
473 define fp128 @ll2q(i64) {
476 ; CHECK-NEXT: cvt.d.l %s0, %s0
477 ; CHECK-NEXT: cvt.q.d %s0, %s0
478 ; CHECK-NEXT: b.l.t (, %s10)
479 %2 = sitofp i64 %0 to fp128
483 define signext i8 @ull2c(i64 %0) {
484 ; CHECK-LABEL: ull2c:
486 ; CHECK-NEXT: sll %s0, %s0, 56
487 ; CHECK-NEXT: sra.l %s0, %s0, 56
488 ; CHECK-NEXT: b.l.t (, %s10)
489 %2 = trunc i64 %0 to i8
493 define zeroext i8 @ull2uc(i64 %0) {
494 ; CHECK-LABEL: ull2uc:
496 ; CHECK-NEXT: and %s0, %s0, (56)0
497 ; CHECK-NEXT: b.l.t (, %s10)
498 %2 = trunc i64 %0 to i8
502 define signext i16 @ull2s(i64 %0) {
503 ; CHECK-LABEL: ull2s:
505 ; CHECK-NEXT: sll %s0, %s0, 48
506 ; CHECK-NEXT: sra.l %s0, %s0, 48
507 ; CHECK-NEXT: b.l.t (, %s10)
508 %2 = trunc i64 %0 to i16
512 define zeroext i16 @ull2us(i64 %0) {
513 ; CHECK-LABEL: ull2us:
515 ; CHECK-NEXT: and %s0, %s0, (48)0
516 ; CHECK-NEXT: b.l.t (, %s10)
517 %2 = trunc i64 %0 to i16
521 define signext i32 @ull2i(i64 %0) {
522 ; CHECK-LABEL: ull2i:
524 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
525 ; CHECK-NEXT: b.l.t (, %s10)
526 %2 = trunc i64 %0 to i32
530 define zeroext i32 @ull2ui(i64 %0) {
531 ; CHECK-LABEL: ull2ui:
533 ; CHECK-NEXT: and %s0, %s0, (32)0
534 ; CHECK-NEXT: b.l.t (, %s10)
535 %2 = trunc i64 %0 to i32
539 define i64 @ull2ll(i64 returned %0) {
540 ; CHECK-LABEL: ull2ll:
542 ; CHECK-NEXT: b.l.t (, %s10)
546 define i64 @ull2ull(i64 returned %0) {
547 ; CHECK-LABEL: ull2ull:
549 ; CHECK-NEXT: b.l.t (, %s10)
553 define float @ull2f(i64 %x) {
554 ; CHECK-LABEL: ull2f:
556 ; CHECK-NEXT: cvt.d.l %s1, %s0
557 ; CHECK-NEXT: cvt.s.d %s1, %s1
558 ; CHECK-NEXT: srl %s2, %s0, 1
559 ; CHECK-NEXT: and %s3, 1, %s0
560 ; CHECK-NEXT: or %s2, %s3, %s2
561 ; CHECK-NEXT: cvt.d.l %s2, %s2
562 ; CHECK-NEXT: cvt.s.d %s2, %s2
563 ; CHECK-NEXT: fadd.s %s2, %s2, %s2
564 ; CHECK-NEXT: cmov.l.lt %s1, %s2, %s0
565 ; CHECK-NEXT: or %s0, 0, %s1
566 ; CHECK-NEXT: b.l.t (, %s10)
567 %r = uitofp i64 %x to float
571 define double @ull2d(i64 %x) {
572 ; CHECK-LABEL: ull2d:
574 ; CHECK-NEXT: srl %s1, %s0, 32
575 ; CHECK-NEXT: lea.sl %s2, 1160773632
576 ; CHECK-NEXT: or %s1, %s1, %s2
577 ; CHECK-NEXT: lea %s2, 1048576
578 ; CHECK-NEXT: lea.sl %s2, -986710016(, %s2)
579 ; CHECK-NEXT: fadd.d %s1, %s1, %s2
580 ; CHECK-NEXT: and %s0, %s0, (32)0
581 ; CHECK-NEXT: lea.sl %s2, 1127219200
582 ; CHECK-NEXT: or %s0, %s0, %s2
583 ; CHECK-NEXT: fadd.d %s0, %s0, %s1
584 ; CHECK-NEXT: b.l.t (, %s10)
585 %r = uitofp i64 %x to double
589 define fp128 @ull2q(i64) {
590 ; CHECK-LABEL: ull2q:
592 ; CHECK-NEXT: srl %s1, %s0, 61
593 ; CHECK-NEXT: and %s1, 4, %s1
594 ; CHECK-NEXT: lea %s2, .LCPI{{[0-9]+}}_0@lo
595 ; CHECK-NEXT: and %s2, %s2, (32)0
596 ; CHECK-NEXT: lea.sl %s2, .LCPI{{[0-9]+}}_0@hi(, %s2)
597 ; CHECK-NEXT: ldu %s1, (%s1, %s2)
598 ; CHECK-NEXT: cvt.q.s %s2, %s1
599 ; CHECK-NEXT: cvt.d.l %s0, %s0
600 ; CHECK-NEXT: cvt.q.d %s0, %s0
601 ; CHECK-NEXT: fadd.q %s0, %s0, %s2
602 ; CHECK-NEXT: b.l.t (, %s10)
603 %2 = uitofp i64 %0 to fp128
607 define signext i8 @i2c(i32 signext %0) {
610 ; CHECK-NEXT: sll %s0, %s0, 56
611 ; CHECK-NEXT: sra.l %s0, %s0, 56
612 ; CHECK-NEXT: b.l.t (, %s10)
613 %2 = trunc i32 %0 to i8
617 define zeroext i8 @i2uc(i32 signext %0) {
620 ; CHECK-NEXT: and %s0, %s0, (56)0
621 ; CHECK-NEXT: b.l.t (, %s10)
622 %2 = trunc i32 %0 to i8
626 define signext i16 @i2s(i32 signext %0) {
629 ; CHECK-NEXT: sll %s0, %s0, 48
630 ; CHECK-NEXT: sra.l %s0, %s0, 48
631 ; CHECK-NEXT: b.l.t (, %s10)
632 %2 = trunc i32 %0 to i16
636 define zeroext i16 @i2us(i32 signext %0) {
639 ; CHECK-NEXT: and %s0, %s0, (48)0
640 ; CHECK-NEXT: b.l.t (, %s10)
641 %2 = trunc i32 %0 to i16
645 define signext i32 @i2i(i32 signext returned %0) {
648 ; CHECK-NEXT: b.l.t (, %s10)
652 define zeroext i32 @i2ui(i32 signext returned %0) {
655 ; CHECK-NEXT: and %s0, %s0, (32)0
656 ; CHECK-NEXT: b.l.t (, %s10)
660 define i64 @i2ll(i32 signext %0) {
663 ; CHECK-NEXT: b.l.t (, %s10)
664 %2 = sext i32 %0 to i64
668 define i64 @i2ull(i32 signext %0) {
669 ; CHECK-LABEL: i2ull:
671 ; CHECK-NEXT: b.l.t (, %s10)
672 %2 = sext i32 %0 to i64
676 define float @i2f(i32 signext %x) {
679 ; CHECK-NEXT: cvt.s.w %s0, %s0
680 ; CHECK-NEXT: b.l.t (, %s10)
681 %r = sitofp i32 %x to float
685 define double @i2d(i32 signext %x) {
688 ; CHECK-NEXT: cvt.d.w %s0, %s0
689 ; CHECK-NEXT: b.l.t (, %s10)
690 %r = sitofp i32 %x to double
694 define fp128 @i2q(i32 signext %x) {
697 ; CHECK-NEXT: cvt.d.w %s0, %s0
698 ; CHECK-NEXT: cvt.q.d %s0, %s0
699 ; CHECK-NEXT: b.l.t (, %s10)
700 %r = sitofp i32 %x to fp128
704 define signext i8 @ui2c(i32 zeroext %0) {
707 ; CHECK-NEXT: sll %s0, %s0, 56
708 ; CHECK-NEXT: sra.l %s0, %s0, 56
709 ; CHECK-NEXT: b.l.t (, %s10)
710 %2 = trunc i32 %0 to i8
714 define zeroext i8 @ui2uc(i32 zeroext %0) {
715 ; CHECK-LABEL: ui2uc:
717 ; CHECK-NEXT: and %s0, %s0, (56)0
718 ; CHECK-NEXT: b.l.t (, %s10)
719 %2 = trunc i32 %0 to i8
723 define signext i16 @ui2s(i32 zeroext %0) {
726 ; CHECK-NEXT: sll %s0, %s0, 48
727 ; CHECK-NEXT: sra.l %s0, %s0, 48
728 ; CHECK-NEXT: b.l.t (, %s10)
729 %2 = trunc i32 %0 to i16
733 define zeroext i16 @ui2us(i32 zeroext %0) {
734 ; CHECK-LABEL: ui2us:
736 ; CHECK-NEXT: and %s0, %s0, (48)0
737 ; CHECK-NEXT: b.l.t (, %s10)
738 %2 = trunc i32 %0 to i16
742 define signext i32 @ui2i(i32 zeroext returned %0) {
745 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
746 ; CHECK-NEXT: b.l.t (, %s10)
750 define zeroext i32 @ui2ui(i32 zeroext returned %0) {
751 ; CHECK-LABEL: ui2ui:
753 ; CHECK-NEXT: b.l.t (, %s10)
757 define i64 @ui2ll(i32 zeroext %0) {
758 ; CHECK-LABEL: ui2ll:
760 ; CHECK-NEXT: b.l.t (, %s10)
761 %2 = zext i32 %0 to i64
765 define i64 @ui2ull(i32 zeroext %0) {
766 ; CHECK-LABEL: ui2ull:
768 ; CHECK-NEXT: b.l.t (, %s10)
769 %2 = zext i32 %0 to i64
773 define float @ui2f(i32 zeroext %x) {
776 ; CHECK-NEXT: cvt.d.l %s0, %s0
777 ; CHECK-NEXT: cvt.s.d %s0, %s0
778 ; CHECK-NEXT: b.l.t (, %s10)
779 %r = uitofp i32 %x to float
783 define double @ui2d(i32 zeroext %x) {
786 ; CHECK-NEXT: cvt.d.l %s0, %s0
787 ; CHECK-NEXT: b.l.t (, %s10)
788 %r = uitofp i32 %x to double
792 define fp128 @ui2q(i32 zeroext %0) {
795 ; CHECK-NEXT: cvt.d.l %s0, %s0
796 ; CHECK-NEXT: cvt.q.d %s0, %s0
797 ; CHECK-NEXT: b.l.t (, %s10)
798 %2 = uitofp i32 %0 to fp128
802 define signext i8 @s2c(i16 signext %0) {
805 ; CHECK-NEXT: sll %s0, %s0, 56
806 ; CHECK-NEXT: sra.l %s0, %s0, 56
807 ; CHECK-NEXT: b.l.t (, %s10)
808 %2 = trunc i16 %0 to i8
812 define zeroext i8 @s2uc(i16 signext %0) {
815 ; CHECK-NEXT: and %s0, %s0, (56)0
816 ; CHECK-NEXT: b.l.t (, %s10)
817 %2 = trunc i16 %0 to i8
821 define signext i16 @s2s(i16 returned signext %0) {
824 ; CHECK-NEXT: b.l.t (, %s10)
828 define zeroext i16 @s2us(i16 returned signext %0) {
831 ; CHECK-NEXT: and %s0, %s0, (48)0
832 ; CHECK-NEXT: b.l.t (, %s10)
836 define signext i32 @s2i(i16 signext %0) {
839 ; CHECK-NEXT: b.l.t (, %s10)
840 %2 = sext i16 %0 to i32
844 define zeroext i32 @s2ui(i16 signext %0) {
847 ; CHECK-NEXT: and %s0, %s0, (32)0
848 ; CHECK-NEXT: b.l.t (, %s10)
849 %2 = sext i16 %0 to i32
853 define i64 @s2ll(i16 signext %0) {
856 ; CHECK-NEXT: b.l.t (, %s10)
857 %2 = sext i16 %0 to i64
861 define i64 @s2ull(i16 signext %0) {
862 ; CHECK-LABEL: s2ull:
864 ; CHECK-NEXT: b.l.t (, %s10)
865 %2 = sext i16 %0 to i64
869 define float @s2f(i16 signext %x) {
872 ; CHECK-NEXT: cvt.s.w %s0, %s0
873 ; CHECK-NEXT: b.l.t (, %s10)
874 %r = sitofp i16 %x to float
878 define double @s2d(i16 signext %x) {
881 ; CHECK-NEXT: cvt.d.w %s0, %s0
882 ; CHECK-NEXT: b.l.t (, %s10)
883 %r = sitofp i16 %x to double
887 define fp128 @s2q(i16 signext) {
890 ; CHECK-NEXT: cvt.d.w %s0, %s0
891 ; CHECK-NEXT: cvt.q.d %s0, %s0
892 ; CHECK-NEXT: b.l.t (, %s10)
893 %2 = sitofp i16 %0 to fp128
897 define signext i8 @us2c(i16 zeroext %0) {
900 ; CHECK-NEXT: sll %s0, %s0, 56
901 ; CHECK-NEXT: sra.l %s0, %s0, 56
902 ; CHECK-NEXT: b.l.t (, %s10)
903 %2 = trunc i16 %0 to i8
907 define zeroext i8 @us2uc(i16 zeroext %0) {
908 ; CHECK-LABEL: us2uc:
910 ; CHECK-NEXT: and %s0, %s0, (56)0
911 ; CHECK-NEXT: b.l.t (, %s10)
912 %2 = trunc i16 %0 to i8
916 define signext i16 @us2s(i16 returned zeroext %0) {
919 ; CHECK-NEXT: sll %s0, %s0, 48
920 ; CHECK-NEXT: sra.l %s0, %s0, 48
921 ; CHECK-NEXT: b.l.t (, %s10)
925 define zeroext i16 @us2us(i16 returned zeroext %0) {
926 ; CHECK-LABEL: us2us:
928 ; CHECK-NEXT: b.l.t (, %s10)
932 define signext i32 @us2i(i16 zeroext %0) {
935 ; CHECK-NEXT: b.l.t (, %s10)
936 %2 = zext i16 %0 to i32
940 define zeroext i32 @us2ui(i16 zeroext %0) {
941 ; CHECK-LABEL: us2ui:
943 ; CHECK-NEXT: b.l.t (, %s10)
944 %2 = zext i16 %0 to i32
948 define i64 @us2ll(i16 zeroext %0) {
949 ; CHECK-LABEL: us2ll:
951 ; CHECK-NEXT: b.l.t (, %s10)
952 %2 = zext i16 %0 to i64
956 define i64 @us2ull(i16 zeroext %0) {
957 ; CHECK-LABEL: us2ull:
959 ; CHECK-NEXT: b.l.t (, %s10)
960 %2 = zext i16 %0 to i64
964 define float @us2f(i16 zeroext %x) {
967 ; CHECK-NEXT: cvt.s.w %s0, %s0
968 ; CHECK-NEXT: b.l.t (, %s10)
969 %r = uitofp i16 %x to float
973 define double @us2d(i16 zeroext %x) {
976 ; CHECK-NEXT: cvt.d.w %s0, %s0
977 ; CHECK-NEXT: b.l.t (, %s10)
978 %r = uitofp i16 %x to double
982 define fp128 @us2q(i16 zeroext) {
985 ; CHECK-NEXT: cvt.d.w %s0, %s0
986 ; CHECK-NEXT: cvt.q.d %s0, %s0
987 ; CHECK-NEXT: b.l.t (, %s10)
988 %2 = uitofp i16 %0 to fp128
992 define signext i8 @c2c(i8 returned signext %0) {
995 ; CHECK-NEXT: b.l.t (, %s10)
999 define zeroext i8 @c2uc(i8 returned signext %0) {
1000 ; CHECK-LABEL: c2uc:
1002 ; CHECK-NEXT: and %s0, %s0, (56)0
1003 ; CHECK-NEXT: b.l.t (, %s10)
1007 define signext i16 @c2s(i8 signext %0) {
1010 ; CHECK-NEXT: b.l.t (, %s10)
1011 %2 = sext i8 %0 to i16
1015 define zeroext i16 @c2us(i8 signext %0) {
1016 ; CHECK-LABEL: c2us:
1018 ; CHECK-NEXT: and %s0, %s0, (48)0
1019 ; CHECK-NEXT: b.l.t (, %s10)
1020 %2 = sext i8 %0 to i16
1024 define signext i32 @c2i(i8 signext %0) {
1027 ; CHECK-NEXT: b.l.t (, %s10)
1028 %2 = sext i8 %0 to i32
1032 define zeroext i32 @c2ui(i8 signext %0) {
1033 ; CHECK-LABEL: c2ui:
1035 ; CHECK-NEXT: and %s0, %s0, (32)0
1036 ; CHECK-NEXT: b.l.t (, %s10)
1037 %2 = sext i8 %0 to i32
1041 define i64 @c2ll(i8 signext %0) {
1042 ; CHECK-LABEL: c2ll:
1044 ; CHECK-NEXT: b.l.t (, %s10)
1045 %2 = sext i8 %0 to i64
1049 define i64 @c2ull(i8 signext %0) {
1050 ; CHECK-LABEL: c2ull:
1052 ; CHECK-NEXT: b.l.t (, %s10)
1053 %2 = sext i8 %0 to i64
1057 define float @c2f(i8 signext %x) {
1060 ; CHECK-NEXT: cvt.s.w %s0, %s0
1061 ; CHECK-NEXT: b.l.t (, %s10)
1062 %r = sitofp i8 %x to float
1066 define double @c2d(i8 signext %x) {
1069 ; CHECK-NEXT: cvt.d.w %s0, %s0
1070 ; CHECK-NEXT: b.l.t (, %s10)
1071 %r = sitofp i8 %x to double
1075 define fp128 @c2q(i8 signext) {
1078 ; CHECK-NEXT: cvt.d.w %s0, %s0
1079 ; CHECK-NEXT: cvt.q.d %s0, %s0
1080 ; CHECK-NEXT: b.l.t (, %s10)
1081 %2 = sitofp i8 %0 to fp128
1085 define signext i8 @uc2c(i8 returned zeroext %0) {
1086 ; CHECK-LABEL: uc2c:
1088 ; CHECK-NEXT: sll %s0, %s0, 56
1089 ; CHECK-NEXT: sra.l %s0, %s0, 56
1090 ; CHECK-NEXT: b.l.t (, %s10)
1094 define zeroext i8 @uc2uc(i8 returned zeroext %0) {
1095 ; CHECK-LABEL: uc2uc:
1097 ; CHECK-NEXT: b.l.t (, %s10)
1101 define signext i16 @uc2s(i8 zeroext %0) {
1102 ; CHECK-LABEL: uc2s:
1104 ; CHECK-NEXT: b.l.t (, %s10)
1105 %2 = zext i8 %0 to i16
1109 define zeroext i16 @uc2us(i8 zeroext %0) {
1110 ; CHECK-LABEL: uc2us:
1112 ; CHECK-NEXT: b.l.t (, %s10)
1113 %2 = zext i8 %0 to i16
1117 define signext i32 @uc2i(i8 zeroext %0) {
1118 ; CHECK-LABEL: uc2i:
1120 ; CHECK-NEXT: b.l.t (, %s10)
1121 %2 = zext i8 %0 to i32
1125 define zeroext i32 @uc2ui(i8 zeroext %0) {
1126 ; CHECK-LABEL: uc2ui:
1128 ; CHECK-NEXT: b.l.t (, %s10)
1129 %2 = zext i8 %0 to i32
1133 define i64 @uc2ll(i8 zeroext %0) {
1134 ; CHECK-LABEL: uc2ll:
1136 ; CHECK-NEXT: b.l.t (, %s10)
1137 %2 = zext i8 %0 to i64
1141 define i64 @uc2ull(i8 zeroext %0) {
1142 ; CHECK-LABEL: uc2ull:
1144 ; CHECK-NEXT: b.l.t (, %s10)
1145 %2 = zext i8 %0 to i64
1149 define float @uc2f(i8 zeroext %x) {
1150 ; CHECK-LABEL: uc2f:
1152 ; CHECK-NEXT: cvt.s.w %s0, %s0
1153 ; CHECK-NEXT: b.l.t (, %s10)
1154 %r = uitofp i8 %x to float
1158 define double @uc2d(i8 zeroext %x) {
1159 ; CHECK-LABEL: uc2d:
1161 ; CHECK-NEXT: cvt.d.w %s0, %s0
1162 ; CHECK-NEXT: b.l.t (, %s10)
1163 %r = uitofp i8 %x to double
1167 define fp128 @uc2q(i8 zeroext) {
1168 ; CHECK-LABEL: uc2q:
1170 ; CHECK-NEXT: cvt.d.w %s0, %s0
1171 ; CHECK-NEXT: cvt.q.d %s0, %s0
1172 ; CHECK-NEXT: b.l.t (, %s10)
1173 %2 = uitofp i8 %0 to fp128
1177 ; Function Attrs: norecurse nounwind readnone
1178 define i128 @i128() {
1179 ; CHECK-LABEL: i128:
1181 ; CHECK-NEXT: lea %s0, -2147483648
1182 ; CHECK-NEXT: or %s1, -1, (0)1
1183 ; CHECK-NEXT: b.l.t (, %s10)
1184 ret i128 -2147483648
1187 ; Function Attrs: norecurse nounwind readnone
1188 define i128 @ui128() {
1189 ; CHECK-LABEL: ui128:
1191 ; CHECK-NEXT: lea %s0, -2147483648
1192 ; CHECK-NEXT: or %s1, -1, (0)1
1193 ; CHECK-NEXT: b.l.t (, %s10)
1194 ret i128 -2147483648
1197 ; Function Attrs: norecurse nounwind readnone
1198 define signext i8 @i1282c(i128 %0) {
1199 ; CHECK-LABEL: i1282c:
1201 ; CHECK-NEXT: sll %s0, %s0, 56
1202 ; CHECK-NEXT: sra.l %s0, %s0, 56
1203 ; CHECK-NEXT: b.l.t (, %s10)
1204 %2 = trunc i128 %0 to i8
1208 ; Function Attrs: norecurse nounwind readnone
1209 define signext i8 @ui1282c(i128 %0) {
1210 ; CHECK-LABEL: ui1282c:
1212 ; CHECK-NEXT: sll %s0, %s0, 56
1213 ; CHECK-NEXT: sra.l %s0, %s0, 56
1214 ; CHECK-NEXT: b.l.t (, %s10)
1215 %2 = trunc i128 %0 to i8
1219 ; Function Attrs: norecurse nounwind readnone
1220 define zeroext i8 @i1282uc(i128 %0) {
1221 ; CHECK-LABEL: i1282uc:
1223 ; CHECK-NEXT: and %s0, %s0, (56)0
1224 ; CHECK-NEXT: b.l.t (, %s10)
1225 %2 = trunc i128 %0 to i8
1229 ; Function Attrs: norecurse nounwind readnone
1230 define zeroext i8 @ui1282uc(i128 %0) {
1231 ; CHECK-LABEL: ui1282uc:
1233 ; CHECK-NEXT: and %s0, %s0, (56)0
1234 ; CHECK-NEXT: b.l.t (, %s10)
1235 %2 = trunc i128 %0 to i8
1239 ; Function Attrs: norecurse nounwind readnone
1240 define signext i16 @i1282s(i128 %0) {
1241 ; CHECK-LABEL: i1282s:
1243 ; CHECK-NEXT: sll %s0, %s0, 48
1244 ; CHECK-NEXT: sra.l %s0, %s0, 48
1245 ; CHECK-NEXT: b.l.t (, %s10)
1246 %2 = trunc i128 %0 to i16
1250 ; Function Attrs: norecurse nounwind readnone
1251 define signext i16 @ui1282s(i128 %0) {
1252 ; CHECK-LABEL: ui1282s:
1254 ; CHECK-NEXT: sll %s0, %s0, 48
1255 ; CHECK-NEXT: sra.l %s0, %s0, 48
1256 ; CHECK-NEXT: b.l.t (, %s10)
1257 %2 = trunc i128 %0 to i16
1261 ; Function Attrs: norecurse nounwind readnone
1262 define zeroext i16 @i1282us(i128 %0) {
1263 ; CHECK-LABEL: i1282us:
1265 ; CHECK-NEXT: and %s0, %s0, (48)0
1266 ; CHECK-NEXT: b.l.t (, %s10)
1267 %2 = trunc i128 %0 to i16
1271 ; Function Attrs: norecurse nounwind readnone
1272 define zeroext i16 @ui1282us(i128 %0) {
1273 ; CHECK-LABEL: ui1282us:
1275 ; CHECK-NEXT: and %s0, %s0, (48)0
1276 ; CHECK-NEXT: b.l.t (, %s10)
1277 %2 = trunc i128 %0 to i16
1281 ; Function Attrs: norecurse nounwind readnone
1282 define signext i32 @i1282i(i128 %0) {
1283 ; CHECK-LABEL: i1282i:
1285 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
1286 ; CHECK-NEXT: b.l.t (, %s10)
1287 %2 = trunc i128 %0 to i32
1291 ; Function Attrs: norecurse nounwind readnone
1292 define signext i32 @ui1282i(i128 %0) {
1293 ; CHECK-LABEL: ui1282i:
1295 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
1296 ; CHECK-NEXT: b.l.t (, %s10)
1297 %2 = trunc i128 %0 to i32
1301 ; Function Attrs: norecurse nounwind readnone
1302 define zeroext i32 @i1282ui(i128 %0) {
1303 ; CHECK-LABEL: i1282ui:
1305 ; CHECK-NEXT: and %s0, %s0, (32)0
1306 ; CHECK-NEXT: b.l.t (, %s10)
1307 %2 = trunc i128 %0 to i32
1311 ; Function Attrs: norecurse nounwind readnone
1312 define zeroext i32 @ui1282ui(i128 %0) {
1313 ; CHECK-LABEL: ui1282ui:
1315 ; CHECK-NEXT: and %s0, %s0, (32)0
1316 ; CHECK-NEXT: b.l.t (, %s10)
1317 %2 = trunc i128 %0 to i32
1321 ; Function Attrs: norecurse nounwind readnone
1322 define i64 @i1282ll(i128 %0) {
1323 ; CHECK-LABEL: i1282ll:
1325 ; CHECK-NEXT: b.l.t (, %s10)
1326 %2 = trunc i128 %0 to i64
1330 ; Function Attrs: norecurse nounwind readnone
1331 define i64 @ui1282ll(i128 %0) {
1332 ; CHECK-LABEL: ui1282ll:
1334 ; CHECK-NEXT: b.l.t (, %s10)
1335 %2 = trunc i128 %0 to i64
1339 ; Function Attrs: norecurse nounwind readnone
1340 define i64 @i1282ull(i128 %0) {
1341 ; CHECK-LABEL: i1282ull:
1343 ; CHECK-NEXT: b.l.t (, %s10)
1344 %2 = trunc i128 %0 to i64
1348 ; Function Attrs: norecurse nounwind readnone
1349 define i64 @ui1282ull(i128 %0) {
1350 ; CHECK-LABEL: ui1282ull:
1352 ; CHECK-NEXT: b.l.t (, %s10)
1353 %2 = trunc i128 %0 to i64
1357 ; Function Attrs: norecurse nounwind readnone
1358 define i128 @i1282ui128(i128 returned %0) {
1359 ; CHECK-LABEL: i1282ui128:
1361 ; CHECK-NEXT: b.l.t (, %s10)
1365 ; Function Attrs: norecurse nounwind readnone
1366 define i128 @ui1282i128(i128 returned %0) {
1367 ; CHECK-LABEL: ui1282i128:
1369 ; CHECK-NEXT: b.l.t (, %s10)
1373 ; Function Attrs: norecurse nounwind readnone
1374 define float @i1282f(i128) {
1375 ; CHECK-LABEL: i1282f:
1376 ; CHECK: .LBB{{[0-9]+}}_2:
1377 ; CHECK-NEXT: lea %s2, __floattisf@lo
1378 ; CHECK-NEXT: and %s2, %s2, (32)0
1379 ; CHECK-NEXT: lea.sl %s12, __floattisf@hi(, %s2)
1380 ; CHECK-NEXT: bsic %s10, (, %s12)
1381 ; CHECK-NEXT: or %s11, 0, %s9
1382 %2 = sitofp i128 %0 to float
1386 ; Function Attrs: norecurse nounwind readnone
1387 define float @ui1282f(i128) {
1388 ; CHECK-LABEL: ui1282f:
1389 ; CHECK: .LBB{{[0-9]+}}_2:
1390 ; CHECK-NEXT: lea %s2, __floatuntisf@lo
1391 ; CHECK-NEXT: and %s2, %s2, (32)0
1392 ; CHECK-NEXT: lea.sl %s12, __floatuntisf@hi(, %s2)
1393 ; CHECK-NEXT: bsic %s10, (, %s12)
1394 ; CHECK-NEXT: or %s11, 0, %s9
1395 %2 = uitofp i128 %0 to float
1399 ; Function Attrs: norecurse nounwind readnone
1400 define double @i1282d(i128) {
1401 ; CHECK-LABEL: i1282d:
1402 ; CHECK: .LBB{{[0-9]+}}_2:
1403 ; CHECK-NEXT: lea %s2, __floattidf@lo
1404 ; CHECK-NEXT: and %s2, %s2, (32)0
1405 ; CHECK-NEXT: lea.sl %s12, __floattidf@hi(, %s2)
1406 ; CHECK-NEXT: bsic %s10, (, %s12)
1407 ; CHECK-NEXT: or %s11, 0, %s9
1408 %2 = sitofp i128 %0 to double
1412 ; Function Attrs: norecurse nounwind readnone
1413 define double @ui1282d(i128) {
1414 ; CHECK-LABEL: ui1282d:
1415 ; CHECK: .LBB{{[0-9]+}}_2:
1416 ; CHECK-NEXT: lea %s2, __floatuntidf@lo
1417 ; CHECK-NEXT: and %s2, %s2, (32)0
1418 ; CHECK-NEXT: lea.sl %s12, __floatuntidf@hi(, %s2)
1419 ; CHECK-NEXT: bsic %s10, (, %s12)
1420 ; CHECK-NEXT: or %s11, 0, %s9
1421 %2 = uitofp i128 %0 to double
1425 ; Function Attrs: norecurse nounwind readnone
1426 define i128 @d2i128(double) {
1427 ; CHECK-LABEL: d2i128:
1428 ; CHECK: .LBB{{[0-9]+}}_2:
1429 ; CHECK-NEXT: lea %s1, __fixdfti@lo
1430 ; CHECK-NEXT: and %s1, %s1, (32)0
1431 ; CHECK-NEXT: lea.sl %s12, __fixdfti@hi(, %s1)
1432 ; CHECK-NEXT: bsic %s10, (, %s12)
1433 ; CHECK-NEXT: or %s11, 0, %s9
1434 %2 = fptosi double %0 to i128
1438 ; Function Attrs: norecurse nounwind readnone
1439 define i128 @d2ui128(double) {
1440 ; CHECK-LABEL: d2ui128:
1441 ; CHECK: .LBB{{[0-9]+}}_2:
1442 ; CHECK-NEXT: lea %s1, __fixunsdfti@lo
1443 ; CHECK-NEXT: and %s1, %s1, (32)0
1444 ; CHECK-NEXT: lea.sl %s12, __fixunsdfti@hi(, %s1)
1445 ; CHECK-NEXT: bsic %s10, (, %s12)
1446 ; CHECK-NEXT: or %s11, 0, %s9
1447 %2 = fptoui double %0 to i128
1451 ; Function Attrs: norecurse nounwind readnone
1452 define i128 @f2i128(float) {
1453 ; CHECK-LABEL: f2i128:
1454 ; CHECK: .LBB{{[0-9]+}}_2:
1455 ; CHECK-NEXT: lea %s1, __fixsfti@lo
1456 ; CHECK-NEXT: and %s1, %s1, (32)0
1457 ; CHECK-NEXT: lea.sl %s12, __fixsfti@hi(, %s1)
1458 ; CHECK-NEXT: bsic %s10, (, %s12)
1459 ; CHECK-NEXT: or %s11, 0, %s9
1460 %2 = fptosi float %0 to i128
1464 ; Function Attrs: norecurse nounwind readnone
1465 define i128 @f2ui128(float) {
1466 ; CHECK-LABEL: f2ui128:
1467 ; CHECK: .LBB{{[0-9]+}}_2:
1468 ; CHECK-NEXT: lea %s1, __fixunssfti@lo
1469 ; CHECK-NEXT: and %s1, %s1, (32)0
1470 ; CHECK-NEXT: lea.sl %s12, __fixunssfti@hi(, %s1)
1471 ; CHECK-NEXT: bsic %s10, (, %s12)
1472 ; CHECK-NEXT: or %s11, 0, %s9
1473 %2 = fptoui float %0 to i128
1477 ; Function Attrs: norecurse nounwind readnone
1478 define i128 @ll2i128(i64 %0) {
1479 ; CHECK-LABEL: ll2i128:
1481 ; CHECK-NEXT: sra.l %s1, %s0, 63
1482 ; CHECK-NEXT: b.l.t (, %s10)
1483 %2 = sext i64 %0 to i128
1487 ; Function Attrs: norecurse nounwind readnone
1488 define i128 @ll2ui128(i64 %0) {
1489 ; CHECK-LABEL: ll2ui128:
1491 ; CHECK-NEXT: sra.l %s1, %s0, 63
1492 ; CHECK-NEXT: b.l.t (, %s10)
1493 %2 = sext i64 %0 to i128
1497 ; Function Attrs: norecurse nounwind readnone
1498 define i128 @ull2i128(i64 %0) {
1499 ; CHECK-LABEL: ull2i128:
1501 ; CHECK-NEXT: or %s1, 0, (0)1
1502 ; CHECK-NEXT: b.l.t (, %s10)
1503 %2 = zext i64 %0 to i128
1507 ; Function Attrs: norecurse nounwind readnone
1508 define i128 @ull2ui128(i64 %0) {
1509 ; CHECK-LABEL: ull2ui128:
1511 ; CHECK-NEXT: or %s1, 0, (0)1
1512 ; CHECK-NEXT: b.l.t (, %s10)
1513 %2 = zext i64 %0 to i128
1517 ; Function Attrs: norecurse nounwind readnone
1518 define i128 @i2i128(i32 signext %0) {
1519 ; CHECK-LABEL: i2i128:
1521 ; CHECK-NEXT: sra.l %s1, %s0, 63
1522 ; CHECK-NEXT: b.l.t (, %s10)
1523 %2 = sext i32 %0 to i128
1527 ; Function Attrs: norecurse nounwind readnone
1528 define i128 @i2ui128(i32 signext %0) {
1529 ; CHECK-LABEL: i2ui128:
1531 ; CHECK-NEXT: sra.l %s1, %s0, 63
1532 ; CHECK-NEXT: b.l.t (, %s10)
1533 %2 = sext i32 %0 to i128
1537 ; Function Attrs: norecurse nounwind readnone
1538 define i128 @ui2i128(i32 zeroext %0) {
1539 ; CHECK-LABEL: ui2i128:
1541 ; CHECK-NEXT: or %s1, 0, (0)1
1542 ; CHECK-NEXT: b.l.t (, %s10)
1543 %2 = zext i32 %0 to i128
1547 ; Function Attrs: norecurse nounwind readnone
1548 define i128 @ui2ui128(i32 zeroext %0) {
1549 ; CHECK-LABEL: ui2ui128:
1551 ; CHECK-NEXT: or %s1, 0, (0)1
1552 ; CHECK-NEXT: b.l.t (, %s10)
1553 %2 = zext i32 %0 to i128
1557 ; Function Attrs: norecurse nounwind readnone
1558 define i128 @s2i128(i16 signext %0) {
1559 ; CHECK-LABEL: s2i128:
1561 ; CHECK-NEXT: sra.l %s1, %s0, 63
1562 ; CHECK-NEXT: b.l.t (, %s10)
1563 %2 = sext i16 %0 to i128
1567 ; Function Attrs: norecurse nounwind readnone
1568 define i128 @s2ui128(i16 signext %0) {
1569 ; CHECK-LABEL: s2ui128:
1571 ; CHECK-NEXT: sra.l %s1, %s0, 63
1572 ; CHECK-NEXT: b.l.t (, %s10)
1573 %2 = sext i16 %0 to i128
1577 ; Function Attrs: norecurse nounwind readnone
1578 define i128 @us2i128(i16 zeroext %0) {
1579 ; CHECK-LABEL: us2i128:
1581 ; CHECK-NEXT: or %s1, 0, (0)1
1582 ; CHECK-NEXT: b.l.t (, %s10)
1583 %2 = zext i16 %0 to i128
1587 ; Function Attrs: norecurse nounwind readnone
1588 define i128 @us2ui128(i16 zeroext %0) {
1589 ; CHECK-LABEL: us2ui128:
1591 ; CHECK-NEXT: or %s1, 0, (0)1
1592 ; CHECK-NEXT: b.l.t (, %s10)
1593 %2 = zext i16 %0 to i128
1597 ; Function Attrs: norecurse nounwind readnone
1598 define i128 @c2i128(i8 signext %0) {
1599 ; CHECK-LABEL: c2i128:
1601 ; CHECK-NEXT: sra.l %s1, %s0, 63
1602 ; CHECK-NEXT: b.l.t (, %s10)
1603 %2 = sext i8 %0 to i128
1607 ; Function Attrs: norecurse nounwind readnone
1608 define i128 @char2ui128(i8 signext %0) {
1609 ; CHECK-LABEL: char2ui128:
1611 ; CHECK-NEXT: sra.l %s1, %s0, 63
1612 ; CHECK-NEXT: b.l.t (, %s10)
1613 %2 = sext i8 %0 to i128
1617 ; Function Attrs: norecurse nounwind readnone
1618 define i128 @uc2i128(i8 zeroext %0) {
1619 ; CHECK-LABEL: uc2i128:
1621 ; CHECK-NEXT: or %s1, 0, (0)1
1622 ; CHECK-NEXT: b.l.t (, %s10)
1623 %2 = zext i8 %0 to i128
1627 ; Function Attrs: norecurse nounwind readnone
1628 define i128 @uc2ui128(i8 zeroext %0) {
1629 ; CHECK-LABEL: uc2ui128:
1631 ; CHECK-NEXT: or %s1, 0, (0)1
1632 ; CHECK-NEXT: b.l.t (, %s10)
1633 %2 = zext i8 %0 to i128