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: cmps.l %s2, %s0, (0)1
557 ; CHECK-NEXT: cvt.d.l %s1, %s0
558 ; CHECK-NEXT: cvt.s.d %s1, %s1
559 ; CHECK-NEXT: srl %s3, %s0, 1
560 ; CHECK-NEXT: and %s0, 1, %s0
561 ; CHECK-NEXT: or %s0, %s0, %s3
562 ; CHECK-NEXT: cvt.d.l %s0, %s0
563 ; CHECK-NEXT: cvt.s.d %s0, %s0
564 ; CHECK-NEXT: fadd.s %s0, %s0, %s0
565 ; CHECK-NEXT: cmov.l.lt %s1, %s0, %s2
566 ; CHECK-NEXT: or %s0, 0, %s1
567 ; CHECK-NEXT: b.l.t (, %s10)
568 %r = uitofp i64 %x to float
572 define double @ull2d(i64 %x) {
573 ; CHECK-LABEL: ull2d:
575 ; CHECK-NEXT: srl %s1, %s0, 32
576 ; CHECK-NEXT: lea.sl %s2, 1160773632
577 ; CHECK-NEXT: or %s1, %s1, %s2
578 ; CHECK-NEXT: lea %s2, 1048576
579 ; CHECK-NEXT: lea.sl %s2, -986710016(, %s2)
580 ; CHECK-NEXT: fadd.d %s1, %s1, %s2
581 ; CHECK-NEXT: and %s0, %s0, (32)0
582 ; CHECK-NEXT: lea.sl %s2, 1127219200
583 ; CHECK-NEXT: or %s0, %s0, %s2
584 ; CHECK-NEXT: fadd.d %s0, %s0, %s1
585 ; CHECK-NEXT: b.l.t (, %s10)
586 %r = uitofp i64 %x to double
590 define fp128 @ull2q(i64) {
591 ; CHECK-LABEL: ull2q:
593 ; CHECK-NEXT: srl %s1, %s0, 61
594 ; CHECK-NEXT: and %s1, 4, %s1
595 ; CHECK-NEXT: lea %s2, .LCPI{{[0-9]+}}_0@lo
596 ; CHECK-NEXT: and %s2, %s2, (32)0
597 ; CHECK-NEXT: lea.sl %s2, .LCPI{{[0-9]+}}_0@hi(, %s2)
598 ; CHECK-NEXT: ldu %s1, (%s1, %s2)
599 ; CHECK-NEXT: cvt.q.s %s2, %s1
600 ; CHECK-NEXT: cvt.d.l %s0, %s0
601 ; CHECK-NEXT: cvt.q.d %s0, %s0
602 ; CHECK-NEXT: fadd.q %s0, %s0, %s2
603 ; CHECK-NEXT: b.l.t (, %s10)
604 %2 = uitofp i64 %0 to fp128
608 define signext i8 @i2c(i32 signext %0) {
611 ; CHECK-NEXT: sll %s0, %s0, 56
612 ; CHECK-NEXT: sra.l %s0, %s0, 56
613 ; CHECK-NEXT: b.l.t (, %s10)
614 %2 = trunc i32 %0 to i8
618 define zeroext i8 @i2uc(i32 signext %0) {
621 ; CHECK-NEXT: and %s0, %s0, (56)0
622 ; CHECK-NEXT: b.l.t (, %s10)
623 %2 = trunc i32 %0 to i8
627 define signext i16 @i2s(i32 signext %0) {
630 ; CHECK-NEXT: sll %s0, %s0, 48
631 ; CHECK-NEXT: sra.l %s0, %s0, 48
632 ; CHECK-NEXT: b.l.t (, %s10)
633 %2 = trunc i32 %0 to i16
637 define zeroext i16 @i2us(i32 signext %0) {
640 ; CHECK-NEXT: and %s0, %s0, (48)0
641 ; CHECK-NEXT: b.l.t (, %s10)
642 %2 = trunc i32 %0 to i16
646 define signext i32 @i2i(i32 signext returned %0) {
649 ; CHECK-NEXT: b.l.t (, %s10)
653 define zeroext i32 @i2ui(i32 signext returned %0) {
656 ; CHECK-NEXT: and %s0, %s0, (32)0
657 ; CHECK-NEXT: b.l.t (, %s10)
661 define i64 @i2ll(i32 signext %0) {
664 ; CHECK-NEXT: b.l.t (, %s10)
665 %2 = sext i32 %0 to i64
669 define i64 @i2ull(i32 signext %0) {
670 ; CHECK-LABEL: i2ull:
672 ; CHECK-NEXT: b.l.t (, %s10)
673 %2 = sext i32 %0 to i64
677 define float @i2f(i32 signext %x) {
680 ; CHECK-NEXT: cvt.s.w %s0, %s0
681 ; CHECK-NEXT: b.l.t (, %s10)
682 %r = sitofp i32 %x to float
686 define double @i2d(i32 signext %x) {
689 ; CHECK-NEXT: cvt.d.w %s0, %s0
690 ; CHECK-NEXT: b.l.t (, %s10)
691 %r = sitofp i32 %x to double
695 define fp128 @i2q(i32 signext %x) {
698 ; CHECK-NEXT: cvt.d.w %s0, %s0
699 ; CHECK-NEXT: cvt.q.d %s0, %s0
700 ; CHECK-NEXT: b.l.t (, %s10)
701 %r = sitofp i32 %x to fp128
705 define signext i8 @ui2c(i32 zeroext %0) {
708 ; CHECK-NEXT: sll %s0, %s0, 56
709 ; CHECK-NEXT: sra.l %s0, %s0, 56
710 ; CHECK-NEXT: b.l.t (, %s10)
711 %2 = trunc i32 %0 to i8
715 define zeroext i8 @ui2uc(i32 zeroext %0) {
716 ; CHECK-LABEL: ui2uc:
718 ; CHECK-NEXT: and %s0, %s0, (56)0
719 ; CHECK-NEXT: b.l.t (, %s10)
720 %2 = trunc i32 %0 to i8
724 define signext i16 @ui2s(i32 zeroext %0) {
727 ; CHECK-NEXT: sll %s0, %s0, 48
728 ; CHECK-NEXT: sra.l %s0, %s0, 48
729 ; CHECK-NEXT: b.l.t (, %s10)
730 %2 = trunc i32 %0 to i16
734 define zeroext i16 @ui2us(i32 zeroext %0) {
735 ; CHECK-LABEL: ui2us:
737 ; CHECK-NEXT: and %s0, %s0, (48)0
738 ; CHECK-NEXT: b.l.t (, %s10)
739 %2 = trunc i32 %0 to i16
743 define signext i32 @ui2i(i32 zeroext returned %0) {
746 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
747 ; CHECK-NEXT: b.l.t (, %s10)
751 define zeroext i32 @ui2ui(i32 zeroext returned %0) {
752 ; CHECK-LABEL: ui2ui:
754 ; CHECK-NEXT: b.l.t (, %s10)
758 define i64 @ui2ll(i32 zeroext %0) {
759 ; CHECK-LABEL: ui2ll:
761 ; CHECK-NEXT: b.l.t (, %s10)
762 %2 = zext i32 %0 to i64
766 define i64 @ui2ull(i32 zeroext %0) {
767 ; CHECK-LABEL: ui2ull:
769 ; CHECK-NEXT: b.l.t (, %s10)
770 %2 = zext i32 %0 to i64
774 define float @ui2f(i32 zeroext %x) {
777 ; CHECK-NEXT: cvt.d.l %s0, %s0
778 ; CHECK-NEXT: cvt.s.d %s0, %s0
779 ; CHECK-NEXT: b.l.t (, %s10)
780 %r = uitofp i32 %x to float
784 define double @ui2d(i32 zeroext %x) {
787 ; CHECK-NEXT: cvt.d.l %s0, %s0
788 ; CHECK-NEXT: b.l.t (, %s10)
789 %r = uitofp i32 %x to double
793 define fp128 @ui2q(i32 zeroext %0) {
796 ; CHECK-NEXT: cvt.d.l %s0, %s0
797 ; CHECK-NEXT: cvt.q.d %s0, %s0
798 ; CHECK-NEXT: b.l.t (, %s10)
799 %2 = uitofp i32 %0 to fp128
803 define signext i8 @s2c(i16 signext %0) {
806 ; CHECK-NEXT: sll %s0, %s0, 56
807 ; CHECK-NEXT: sra.l %s0, %s0, 56
808 ; CHECK-NEXT: b.l.t (, %s10)
809 %2 = trunc i16 %0 to i8
813 define zeroext i8 @s2uc(i16 signext %0) {
816 ; CHECK-NEXT: and %s0, %s0, (56)0
817 ; CHECK-NEXT: b.l.t (, %s10)
818 %2 = trunc i16 %0 to i8
822 define signext i16 @s2s(i16 returned signext %0) {
825 ; CHECK-NEXT: b.l.t (, %s10)
829 define zeroext i16 @s2us(i16 returned signext %0) {
832 ; CHECK-NEXT: and %s0, %s0, (48)0
833 ; CHECK-NEXT: b.l.t (, %s10)
837 define signext i32 @s2i(i16 signext %0) {
840 ; CHECK-NEXT: b.l.t (, %s10)
841 %2 = sext i16 %0 to i32
845 define zeroext i32 @s2ui(i16 signext %0) {
848 ; CHECK-NEXT: and %s0, %s0, (32)0
849 ; CHECK-NEXT: b.l.t (, %s10)
850 %2 = sext i16 %0 to i32
854 define i64 @s2ll(i16 signext %0) {
857 ; CHECK-NEXT: b.l.t (, %s10)
858 %2 = sext i16 %0 to i64
862 define i64 @s2ull(i16 signext %0) {
863 ; CHECK-LABEL: s2ull:
865 ; CHECK-NEXT: b.l.t (, %s10)
866 %2 = sext i16 %0 to i64
870 define float @s2f(i16 signext %x) {
873 ; CHECK-NEXT: cvt.s.w %s0, %s0
874 ; CHECK-NEXT: b.l.t (, %s10)
875 %r = sitofp i16 %x to float
879 define double @s2d(i16 signext %x) {
882 ; CHECK-NEXT: cvt.d.w %s0, %s0
883 ; CHECK-NEXT: b.l.t (, %s10)
884 %r = sitofp i16 %x to double
888 define fp128 @s2q(i16 signext) {
891 ; CHECK-NEXT: cvt.d.w %s0, %s0
892 ; CHECK-NEXT: cvt.q.d %s0, %s0
893 ; CHECK-NEXT: b.l.t (, %s10)
894 %2 = sitofp i16 %0 to fp128
898 define signext i8 @us2c(i16 zeroext %0) {
901 ; CHECK-NEXT: sll %s0, %s0, 56
902 ; CHECK-NEXT: sra.l %s0, %s0, 56
903 ; CHECK-NEXT: b.l.t (, %s10)
904 %2 = trunc i16 %0 to i8
908 define zeroext i8 @us2uc(i16 zeroext %0) {
909 ; CHECK-LABEL: us2uc:
911 ; CHECK-NEXT: and %s0, %s0, (56)0
912 ; CHECK-NEXT: b.l.t (, %s10)
913 %2 = trunc i16 %0 to i8
917 define signext i16 @us2s(i16 returned zeroext %0) {
920 ; CHECK-NEXT: sll %s0, %s0, 48
921 ; CHECK-NEXT: sra.l %s0, %s0, 48
922 ; CHECK-NEXT: b.l.t (, %s10)
926 define zeroext i16 @us2us(i16 returned zeroext %0) {
927 ; CHECK-LABEL: us2us:
929 ; CHECK-NEXT: b.l.t (, %s10)
933 define signext i32 @us2i(i16 zeroext %0) {
936 ; CHECK-NEXT: b.l.t (, %s10)
937 %2 = zext i16 %0 to i32
941 define zeroext i32 @us2ui(i16 zeroext %0) {
942 ; CHECK-LABEL: us2ui:
944 ; CHECK-NEXT: b.l.t (, %s10)
945 %2 = zext i16 %0 to i32
949 define i64 @us2ll(i16 zeroext %0) {
950 ; CHECK-LABEL: us2ll:
952 ; CHECK-NEXT: b.l.t (, %s10)
953 %2 = zext i16 %0 to i64
957 define i64 @us2ull(i16 zeroext %0) {
958 ; CHECK-LABEL: us2ull:
960 ; CHECK-NEXT: b.l.t (, %s10)
961 %2 = zext i16 %0 to i64
965 define float @us2f(i16 zeroext %x) {
968 ; CHECK-NEXT: cvt.s.w %s0, %s0
969 ; CHECK-NEXT: b.l.t (, %s10)
970 %r = uitofp i16 %x to float
974 define double @us2d(i16 zeroext %x) {
977 ; CHECK-NEXT: cvt.d.w %s0, %s0
978 ; CHECK-NEXT: b.l.t (, %s10)
979 %r = uitofp i16 %x to double
983 define fp128 @us2q(i16 zeroext) {
986 ; CHECK-NEXT: cvt.d.w %s0, %s0
987 ; CHECK-NEXT: cvt.q.d %s0, %s0
988 ; CHECK-NEXT: b.l.t (, %s10)
989 %2 = uitofp i16 %0 to fp128
993 define signext i8 @c2c(i8 returned signext %0) {
996 ; CHECK-NEXT: b.l.t (, %s10)
1000 define zeroext i8 @c2uc(i8 returned signext %0) {
1001 ; CHECK-LABEL: c2uc:
1003 ; CHECK-NEXT: and %s0, %s0, (56)0
1004 ; CHECK-NEXT: b.l.t (, %s10)
1008 define signext i16 @c2s(i8 signext %0) {
1011 ; CHECK-NEXT: b.l.t (, %s10)
1012 %2 = sext i8 %0 to i16
1016 define zeroext i16 @c2us(i8 signext %0) {
1017 ; CHECK-LABEL: c2us:
1019 ; CHECK-NEXT: and %s0, %s0, (48)0
1020 ; CHECK-NEXT: b.l.t (, %s10)
1021 %2 = sext i8 %0 to i16
1025 define signext i32 @c2i(i8 signext %0) {
1028 ; CHECK-NEXT: b.l.t (, %s10)
1029 %2 = sext i8 %0 to i32
1033 define zeroext i32 @c2ui(i8 signext %0) {
1034 ; CHECK-LABEL: c2ui:
1036 ; CHECK-NEXT: and %s0, %s0, (32)0
1037 ; CHECK-NEXT: b.l.t (, %s10)
1038 %2 = sext i8 %0 to i32
1042 define i64 @c2ll(i8 signext %0) {
1043 ; CHECK-LABEL: c2ll:
1045 ; CHECK-NEXT: b.l.t (, %s10)
1046 %2 = sext i8 %0 to i64
1050 define i64 @c2ull(i8 signext %0) {
1051 ; CHECK-LABEL: c2ull:
1053 ; CHECK-NEXT: b.l.t (, %s10)
1054 %2 = sext i8 %0 to i64
1058 define float @c2f(i8 signext %x) {
1061 ; CHECK-NEXT: cvt.s.w %s0, %s0
1062 ; CHECK-NEXT: b.l.t (, %s10)
1063 %r = sitofp i8 %x to float
1067 define double @c2d(i8 signext %x) {
1070 ; CHECK-NEXT: cvt.d.w %s0, %s0
1071 ; CHECK-NEXT: b.l.t (, %s10)
1072 %r = sitofp i8 %x to double
1076 define fp128 @c2q(i8 signext) {
1079 ; CHECK-NEXT: cvt.d.w %s0, %s0
1080 ; CHECK-NEXT: cvt.q.d %s0, %s0
1081 ; CHECK-NEXT: b.l.t (, %s10)
1082 %2 = sitofp i8 %0 to fp128
1086 define signext i8 @uc2c(i8 returned zeroext %0) {
1087 ; CHECK-LABEL: uc2c:
1089 ; CHECK-NEXT: sll %s0, %s0, 56
1090 ; CHECK-NEXT: sra.l %s0, %s0, 56
1091 ; CHECK-NEXT: b.l.t (, %s10)
1095 define zeroext i8 @uc2uc(i8 returned zeroext %0) {
1096 ; CHECK-LABEL: uc2uc:
1098 ; CHECK-NEXT: b.l.t (, %s10)
1102 define signext i16 @uc2s(i8 zeroext %0) {
1103 ; CHECK-LABEL: uc2s:
1105 ; CHECK-NEXT: b.l.t (, %s10)
1106 %2 = zext i8 %0 to i16
1110 define zeroext i16 @uc2us(i8 zeroext %0) {
1111 ; CHECK-LABEL: uc2us:
1113 ; CHECK-NEXT: b.l.t (, %s10)
1114 %2 = zext i8 %0 to i16
1118 define signext i32 @uc2i(i8 zeroext %0) {
1119 ; CHECK-LABEL: uc2i:
1121 ; CHECK-NEXT: b.l.t (, %s10)
1122 %2 = zext i8 %0 to i32
1126 define zeroext i32 @uc2ui(i8 zeroext %0) {
1127 ; CHECK-LABEL: uc2ui:
1129 ; CHECK-NEXT: b.l.t (, %s10)
1130 %2 = zext i8 %0 to i32
1134 define i64 @uc2ll(i8 zeroext %0) {
1135 ; CHECK-LABEL: uc2ll:
1137 ; CHECK-NEXT: b.l.t (, %s10)
1138 %2 = zext i8 %0 to i64
1142 define i64 @uc2ull(i8 zeroext %0) {
1143 ; CHECK-LABEL: uc2ull:
1145 ; CHECK-NEXT: b.l.t (, %s10)
1146 %2 = zext i8 %0 to i64
1150 define float @uc2f(i8 zeroext %x) {
1151 ; CHECK-LABEL: uc2f:
1153 ; CHECK-NEXT: cvt.s.w %s0, %s0
1154 ; CHECK-NEXT: b.l.t (, %s10)
1155 %r = uitofp i8 %x to float
1159 define double @uc2d(i8 zeroext %x) {
1160 ; CHECK-LABEL: uc2d:
1162 ; CHECK-NEXT: cvt.d.w %s0, %s0
1163 ; CHECK-NEXT: b.l.t (, %s10)
1164 %r = uitofp i8 %x to double
1168 define fp128 @uc2q(i8 zeroext) {
1169 ; CHECK-LABEL: uc2q:
1171 ; CHECK-NEXT: cvt.d.w %s0, %s0
1172 ; CHECK-NEXT: cvt.q.d %s0, %s0
1173 ; CHECK-NEXT: b.l.t (, %s10)
1174 %2 = uitofp i8 %0 to fp128
1178 ; Function Attrs: norecurse nounwind readnone
1179 define i128 @i128() {
1180 ; CHECK-LABEL: i128:
1182 ; CHECK-NEXT: lea %s0, -2147483648
1183 ; CHECK-NEXT: or %s1, -1, (0)1
1184 ; CHECK-NEXT: b.l.t (, %s10)
1185 ret i128 -2147483648
1188 ; Function Attrs: norecurse nounwind readnone
1189 define i128 @ui128() {
1190 ; CHECK-LABEL: ui128:
1192 ; CHECK-NEXT: lea %s0, -2147483648
1193 ; CHECK-NEXT: or %s1, -1, (0)1
1194 ; CHECK-NEXT: b.l.t (, %s10)
1195 ret i128 -2147483648
1198 ; Function Attrs: norecurse nounwind readnone
1199 define signext i8 @i1282c(i128 %0) {
1200 ; CHECK-LABEL: i1282c:
1202 ; CHECK-NEXT: sll %s0, %s0, 56
1203 ; CHECK-NEXT: sra.l %s0, %s0, 56
1204 ; CHECK-NEXT: b.l.t (, %s10)
1205 %2 = trunc i128 %0 to i8
1209 ; Function Attrs: norecurse nounwind readnone
1210 define signext i8 @ui1282c(i128 %0) {
1211 ; CHECK-LABEL: ui1282c:
1213 ; CHECK-NEXT: sll %s0, %s0, 56
1214 ; CHECK-NEXT: sra.l %s0, %s0, 56
1215 ; CHECK-NEXT: b.l.t (, %s10)
1216 %2 = trunc i128 %0 to i8
1220 ; Function Attrs: norecurse nounwind readnone
1221 define zeroext i8 @i1282uc(i128 %0) {
1222 ; CHECK-LABEL: i1282uc:
1224 ; CHECK-NEXT: and %s0, %s0, (56)0
1225 ; CHECK-NEXT: b.l.t (, %s10)
1226 %2 = trunc i128 %0 to i8
1230 ; Function Attrs: norecurse nounwind readnone
1231 define zeroext i8 @ui1282uc(i128 %0) {
1232 ; CHECK-LABEL: ui1282uc:
1234 ; CHECK-NEXT: and %s0, %s0, (56)0
1235 ; CHECK-NEXT: b.l.t (, %s10)
1236 %2 = trunc i128 %0 to i8
1240 ; Function Attrs: norecurse nounwind readnone
1241 define signext i16 @i1282s(i128 %0) {
1242 ; CHECK-LABEL: i1282s:
1244 ; CHECK-NEXT: sll %s0, %s0, 48
1245 ; CHECK-NEXT: sra.l %s0, %s0, 48
1246 ; CHECK-NEXT: b.l.t (, %s10)
1247 %2 = trunc i128 %0 to i16
1251 ; Function Attrs: norecurse nounwind readnone
1252 define signext i16 @ui1282s(i128 %0) {
1253 ; CHECK-LABEL: ui1282s:
1255 ; CHECK-NEXT: sll %s0, %s0, 48
1256 ; CHECK-NEXT: sra.l %s0, %s0, 48
1257 ; CHECK-NEXT: b.l.t (, %s10)
1258 %2 = trunc i128 %0 to i16
1262 ; Function Attrs: norecurse nounwind readnone
1263 define zeroext i16 @i1282us(i128 %0) {
1264 ; CHECK-LABEL: i1282us:
1266 ; CHECK-NEXT: and %s0, %s0, (48)0
1267 ; CHECK-NEXT: b.l.t (, %s10)
1268 %2 = trunc i128 %0 to i16
1272 ; Function Attrs: norecurse nounwind readnone
1273 define zeroext i16 @ui1282us(i128 %0) {
1274 ; CHECK-LABEL: ui1282us:
1276 ; CHECK-NEXT: and %s0, %s0, (48)0
1277 ; CHECK-NEXT: b.l.t (, %s10)
1278 %2 = trunc i128 %0 to i16
1282 ; Function Attrs: norecurse nounwind readnone
1283 define signext i32 @i1282i(i128 %0) {
1284 ; CHECK-LABEL: i1282i:
1286 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
1287 ; CHECK-NEXT: b.l.t (, %s10)
1288 %2 = trunc i128 %0 to i32
1292 ; Function Attrs: norecurse nounwind readnone
1293 define signext i32 @ui1282i(i128 %0) {
1294 ; CHECK-LABEL: ui1282i:
1296 ; CHECK-NEXT: adds.w.sx %s0, %s0, (0)1
1297 ; CHECK-NEXT: b.l.t (, %s10)
1298 %2 = trunc i128 %0 to i32
1302 ; Function Attrs: norecurse nounwind readnone
1303 define zeroext i32 @i1282ui(i128 %0) {
1304 ; CHECK-LABEL: i1282ui:
1306 ; CHECK-NEXT: and %s0, %s0, (32)0
1307 ; CHECK-NEXT: b.l.t (, %s10)
1308 %2 = trunc i128 %0 to i32
1312 ; Function Attrs: norecurse nounwind readnone
1313 define zeroext i32 @ui1282ui(i128 %0) {
1314 ; CHECK-LABEL: ui1282ui:
1316 ; CHECK-NEXT: and %s0, %s0, (32)0
1317 ; CHECK-NEXT: b.l.t (, %s10)
1318 %2 = trunc i128 %0 to i32
1322 ; Function Attrs: norecurse nounwind readnone
1323 define i64 @i1282ll(i128 %0) {
1324 ; CHECK-LABEL: i1282ll:
1326 ; CHECK-NEXT: b.l.t (, %s10)
1327 %2 = trunc i128 %0 to i64
1331 ; Function Attrs: norecurse nounwind readnone
1332 define i64 @ui1282ll(i128 %0) {
1333 ; CHECK-LABEL: ui1282ll:
1335 ; CHECK-NEXT: b.l.t (, %s10)
1336 %2 = trunc i128 %0 to i64
1340 ; Function Attrs: norecurse nounwind readnone
1341 define i64 @i1282ull(i128 %0) {
1342 ; CHECK-LABEL: i1282ull:
1344 ; CHECK-NEXT: b.l.t (, %s10)
1345 %2 = trunc i128 %0 to i64
1349 ; Function Attrs: norecurse nounwind readnone
1350 define i64 @ui1282ull(i128 %0) {
1351 ; CHECK-LABEL: ui1282ull:
1353 ; CHECK-NEXT: b.l.t (, %s10)
1354 %2 = trunc i128 %0 to i64
1358 ; Function Attrs: norecurse nounwind readnone
1359 define i128 @i1282ui128(i128 returned %0) {
1360 ; CHECK-LABEL: i1282ui128:
1362 ; CHECK-NEXT: b.l.t (, %s10)
1366 ; Function Attrs: norecurse nounwind readnone
1367 define i128 @ui1282i128(i128 returned %0) {
1368 ; CHECK-LABEL: ui1282i128:
1370 ; CHECK-NEXT: b.l.t (, %s10)
1374 ; Function Attrs: norecurse nounwind readnone
1375 define float @i1282f(i128) {
1376 ; CHECK-LABEL: i1282f:
1377 ; CHECK: .LBB{{[0-9]+}}_2:
1378 ; CHECK-NEXT: lea %s2, __floattisf@lo
1379 ; CHECK-NEXT: and %s2, %s2, (32)0
1380 ; CHECK-NEXT: lea.sl %s12, __floattisf@hi(, %s2)
1381 ; CHECK-NEXT: bsic %s10, (, %s12)
1382 ; CHECK-NEXT: or %s11, 0, %s9
1383 %2 = sitofp i128 %0 to float
1387 ; Function Attrs: norecurse nounwind readnone
1388 define float @ui1282f(i128) {
1389 ; CHECK-LABEL: ui1282f:
1390 ; CHECK: .LBB{{[0-9]+}}_2:
1391 ; CHECK-NEXT: lea %s2, __floatuntisf@lo
1392 ; CHECK-NEXT: and %s2, %s2, (32)0
1393 ; CHECK-NEXT: lea.sl %s12, __floatuntisf@hi(, %s2)
1394 ; CHECK-NEXT: bsic %s10, (, %s12)
1395 ; CHECK-NEXT: or %s11, 0, %s9
1396 %2 = uitofp i128 %0 to float
1400 ; Function Attrs: norecurse nounwind readnone
1401 define double @i1282d(i128) {
1402 ; CHECK-LABEL: i1282d:
1403 ; CHECK: .LBB{{[0-9]+}}_2:
1404 ; CHECK-NEXT: lea %s2, __floattidf@lo
1405 ; CHECK-NEXT: and %s2, %s2, (32)0
1406 ; CHECK-NEXT: lea.sl %s12, __floattidf@hi(, %s2)
1407 ; CHECK-NEXT: bsic %s10, (, %s12)
1408 ; CHECK-NEXT: or %s11, 0, %s9
1409 %2 = sitofp i128 %0 to double
1413 ; Function Attrs: norecurse nounwind readnone
1414 define double @ui1282d(i128) {
1415 ; CHECK-LABEL: ui1282d:
1416 ; CHECK: .LBB{{[0-9]+}}_2:
1417 ; CHECK-NEXT: lea %s2, __floatuntidf@lo
1418 ; CHECK-NEXT: and %s2, %s2, (32)0
1419 ; CHECK-NEXT: lea.sl %s12, __floatuntidf@hi(, %s2)
1420 ; CHECK-NEXT: bsic %s10, (, %s12)
1421 ; CHECK-NEXT: or %s11, 0, %s9
1422 %2 = uitofp i128 %0 to double
1426 ; Function Attrs: norecurse nounwind readnone
1427 define i128 @d2i128(double) {
1428 ; CHECK-LABEL: d2i128:
1429 ; CHECK: .LBB{{[0-9]+}}_2:
1430 ; CHECK-NEXT: lea %s1, __fixdfti@lo
1431 ; CHECK-NEXT: and %s1, %s1, (32)0
1432 ; CHECK-NEXT: lea.sl %s12, __fixdfti@hi(, %s1)
1433 ; CHECK-NEXT: bsic %s10, (, %s12)
1434 ; CHECK-NEXT: or %s11, 0, %s9
1435 %2 = fptosi double %0 to i128
1439 ; Function Attrs: norecurse nounwind readnone
1440 define i128 @d2ui128(double) {
1441 ; CHECK-LABEL: d2ui128:
1442 ; CHECK: .LBB{{[0-9]+}}_2:
1443 ; CHECK-NEXT: lea %s1, __fixunsdfti@lo
1444 ; CHECK-NEXT: and %s1, %s1, (32)0
1445 ; CHECK-NEXT: lea.sl %s12, __fixunsdfti@hi(, %s1)
1446 ; CHECK-NEXT: bsic %s10, (, %s12)
1447 ; CHECK-NEXT: or %s11, 0, %s9
1448 %2 = fptoui double %0 to i128
1452 ; Function Attrs: norecurse nounwind readnone
1453 define i128 @f2i128(float) {
1454 ; CHECK-LABEL: f2i128:
1455 ; CHECK: .LBB{{[0-9]+}}_2:
1456 ; CHECK-NEXT: lea %s1, __fixsfti@lo
1457 ; CHECK-NEXT: and %s1, %s1, (32)0
1458 ; CHECK-NEXT: lea.sl %s12, __fixsfti@hi(, %s1)
1459 ; CHECK-NEXT: bsic %s10, (, %s12)
1460 ; CHECK-NEXT: or %s11, 0, %s9
1461 %2 = fptosi float %0 to i128
1465 ; Function Attrs: norecurse nounwind readnone
1466 define i128 @f2ui128(float) {
1467 ; CHECK-LABEL: f2ui128:
1468 ; CHECK: .LBB{{[0-9]+}}_2:
1469 ; CHECK-NEXT: lea %s1, __fixunssfti@lo
1470 ; CHECK-NEXT: and %s1, %s1, (32)0
1471 ; CHECK-NEXT: lea.sl %s12, __fixunssfti@hi(, %s1)
1472 ; CHECK-NEXT: bsic %s10, (, %s12)
1473 ; CHECK-NEXT: or %s11, 0, %s9
1474 %2 = fptoui float %0 to i128
1478 ; Function Attrs: norecurse nounwind readnone
1479 define i128 @ll2i128(i64 %0) {
1480 ; CHECK-LABEL: ll2i128:
1482 ; CHECK-NEXT: sra.l %s1, %s0, 63
1483 ; CHECK-NEXT: b.l.t (, %s10)
1484 %2 = sext i64 %0 to i128
1488 ; Function Attrs: norecurse nounwind readnone
1489 define i128 @ll2ui128(i64 %0) {
1490 ; CHECK-LABEL: ll2ui128:
1492 ; CHECK-NEXT: sra.l %s1, %s0, 63
1493 ; CHECK-NEXT: b.l.t (, %s10)
1494 %2 = sext i64 %0 to i128
1498 ; Function Attrs: norecurse nounwind readnone
1499 define i128 @ull2i128(i64 %0) {
1500 ; CHECK-LABEL: ull2i128:
1502 ; CHECK-NEXT: or %s1, 0, (0)1
1503 ; CHECK-NEXT: b.l.t (, %s10)
1504 %2 = zext i64 %0 to i128
1508 ; Function Attrs: norecurse nounwind readnone
1509 define i128 @ull2ui128(i64 %0) {
1510 ; CHECK-LABEL: ull2ui128:
1512 ; CHECK-NEXT: or %s1, 0, (0)1
1513 ; CHECK-NEXT: b.l.t (, %s10)
1514 %2 = zext i64 %0 to i128
1518 ; Function Attrs: norecurse nounwind readnone
1519 define i128 @i2i128(i32 signext %0) {
1520 ; CHECK-LABEL: i2i128:
1522 ; CHECK-NEXT: sra.l %s1, %s0, 63
1523 ; CHECK-NEXT: b.l.t (, %s10)
1524 %2 = sext i32 %0 to i128
1528 ; Function Attrs: norecurse nounwind readnone
1529 define i128 @i2ui128(i32 signext %0) {
1530 ; CHECK-LABEL: i2ui128:
1532 ; CHECK-NEXT: sra.l %s1, %s0, 63
1533 ; CHECK-NEXT: b.l.t (, %s10)
1534 %2 = sext i32 %0 to i128
1538 ; Function Attrs: norecurse nounwind readnone
1539 define i128 @ui2i128(i32 zeroext %0) {
1540 ; CHECK-LABEL: ui2i128:
1542 ; CHECK-NEXT: or %s1, 0, (0)1
1543 ; CHECK-NEXT: b.l.t (, %s10)
1544 %2 = zext i32 %0 to i128
1548 ; Function Attrs: norecurse nounwind readnone
1549 define i128 @ui2ui128(i32 zeroext %0) {
1550 ; CHECK-LABEL: ui2ui128:
1552 ; CHECK-NEXT: or %s1, 0, (0)1
1553 ; CHECK-NEXT: b.l.t (, %s10)
1554 %2 = zext i32 %0 to i128
1558 ; Function Attrs: norecurse nounwind readnone
1559 define i128 @s2i128(i16 signext %0) {
1560 ; CHECK-LABEL: s2i128:
1562 ; CHECK-NEXT: sra.l %s1, %s0, 63
1563 ; CHECK-NEXT: b.l.t (, %s10)
1564 %2 = sext i16 %0 to i128
1568 ; Function Attrs: norecurse nounwind readnone
1569 define i128 @s2ui128(i16 signext %0) {
1570 ; CHECK-LABEL: s2ui128:
1572 ; CHECK-NEXT: sra.l %s1, %s0, 63
1573 ; CHECK-NEXT: b.l.t (, %s10)
1574 %2 = sext i16 %0 to i128
1578 ; Function Attrs: norecurse nounwind readnone
1579 define i128 @us2i128(i16 zeroext %0) {
1580 ; CHECK-LABEL: us2i128:
1582 ; CHECK-NEXT: or %s1, 0, (0)1
1583 ; CHECK-NEXT: b.l.t (, %s10)
1584 %2 = zext i16 %0 to i128
1588 ; Function Attrs: norecurse nounwind readnone
1589 define i128 @us2ui128(i16 zeroext %0) {
1590 ; CHECK-LABEL: us2ui128:
1592 ; CHECK-NEXT: or %s1, 0, (0)1
1593 ; CHECK-NEXT: b.l.t (, %s10)
1594 %2 = zext i16 %0 to i128
1598 ; Function Attrs: norecurse nounwind readnone
1599 define i128 @c2i128(i8 signext %0) {
1600 ; CHECK-LABEL: c2i128:
1602 ; CHECK-NEXT: sra.l %s1, %s0, 63
1603 ; CHECK-NEXT: b.l.t (, %s10)
1604 %2 = sext i8 %0 to i128
1608 ; Function Attrs: norecurse nounwind readnone
1609 define i128 @char2ui128(i8 signext %0) {
1610 ; CHECK-LABEL: char2ui128:
1612 ; CHECK-NEXT: sra.l %s1, %s0, 63
1613 ; CHECK-NEXT: b.l.t (, %s10)
1614 %2 = sext i8 %0 to i128
1618 ; Function Attrs: norecurse nounwind readnone
1619 define i128 @uc2i128(i8 zeroext %0) {
1620 ; CHECK-LABEL: uc2i128:
1622 ; CHECK-NEXT: or %s1, 0, (0)1
1623 ; CHECK-NEXT: b.l.t (, %s10)
1624 %2 = zext i8 %0 to i128
1628 ; Function Attrs: norecurse nounwind readnone
1629 define i128 @uc2ui128(i8 zeroext %0) {
1630 ; CHECK-LABEL: uc2ui128:
1632 ; CHECK-NEXT: or %s1, 0, (0)1
1633 ; CHECK-NEXT: b.l.t (, %s10)
1634 %2 = zext i8 %0 to i128