@@ -504,15 +504,10 @@ define bfloat @bitcast_bfp16vec_index1(i32 %x) {
504
504
}
505
505
506
506
define float @bitcast_fp32vec_index0 (i64 %x ) {
507
- ; LE64-LABEL: @bitcast_fp32vec_index0(
508
- ; LE64-NEXT: [[TMP1:%.*]] = trunc i64 [[X:%.*]] to i32
509
- ; LE64-NEXT: [[R:%.*]] = bitcast i32 [[TMP1]] to float
510
- ; LE64-NEXT: ret float [[R]]
511
- ;
512
- ; LE128-LABEL: @bitcast_fp32vec_index0(
513
- ; LE128-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <2 x float>
514
- ; LE128-NEXT: [[R:%.*]] = extractelement <2 x float> [[V]], i64 0
515
- ; LE128-NEXT: ret float [[R]]
507
+ ; ANYLE-LABEL: @bitcast_fp32vec_index0(
508
+ ; ANYLE-NEXT: [[TMP1:%.*]] = trunc i64 [[X:%.*]] to i32
509
+ ; ANYLE-NEXT: [[R:%.*]] = bitcast i32 [[TMP1]] to float
510
+ ; ANYLE-NEXT: ret float [[R]]
516
511
;
517
512
; BE64-LABEL: @bitcast_fp32vec_index0(
518
513
; BE64-NEXT: [[EXTELT_OFFSET:%.*]] = lshr i64 [[X:%.*]], 32
@@ -542,55 +537,31 @@ define float @bitcast_fp32vec_index1(i64 %x) {
542
537
; LE128-NEXT: [[R:%.*]] = extractelement <2 x float> [[V]], i64 1
543
538
; LE128-NEXT: ret float [[R]]
544
539
;
545
- ; BE64-LABEL: @bitcast_fp32vec_index1(
546
- ; BE64-NEXT: [[TMP1:%.*]] = trunc i64 [[X:%.*]] to i32
547
- ; BE64-NEXT: [[R:%.*]] = bitcast i32 [[TMP1]] to float
548
- ; BE64-NEXT: ret float [[R]]
549
- ;
550
- ; BE128-LABEL: @bitcast_fp32vec_index1(
551
- ; BE128-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <2 x float>
552
- ; BE128-NEXT: [[R:%.*]] = extractelement <2 x float> [[V]], i64 1
553
- ; BE128-NEXT: ret float [[R]]
540
+ ; ANYBE-LABEL: @bitcast_fp32vec_index1(
541
+ ; ANYBE-NEXT: [[TMP1:%.*]] = trunc i64 [[X:%.*]] to i32
542
+ ; ANYBE-NEXT: [[R:%.*]] = bitcast i32 [[TMP1]] to float
543
+ ; ANYBE-NEXT: ret float [[R]]
554
544
;
555
545
%v = bitcast i64 %x to <2 x float >
556
546
%r = extractelement <2 x float > %v , i8 1
557
547
ret float %r
558
548
}
559
549
560
550
define double @bitcast_fp64vec64_index0 (i64 %x ) {
561
- ; LE64-LABEL: @bitcast_fp64vec64_index0(
562
- ; LE64-NEXT: [[R:%.*]] = bitcast i64 [[X:%.*]] to double
563
- ; LE64-NEXT: ret double [[R]]
564
- ;
565
- ; LE128-LABEL: @bitcast_fp64vec64_index0(
566
- ; LE128-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <1 x double>
567
- ; LE128-NEXT: [[R:%.*]] = extractelement <1 x double> [[V]], i64 0
568
- ; LE128-NEXT: ret double [[R]]
569
- ;
570
- ; BE64-LABEL: @bitcast_fp64vec64_index0(
571
- ; BE64-NEXT: [[R:%.*]] = bitcast i64 [[X:%.*]] to double
572
- ; BE64-NEXT: ret double [[R]]
573
- ;
574
- ; BE128-LABEL: @bitcast_fp64vec64_index0(
575
- ; BE128-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <1 x double>
576
- ; BE128-NEXT: [[R:%.*]] = extractelement <1 x double> [[V]], i64 0
577
- ; BE128-NEXT: ret double [[R]]
551
+ ; ANY-LABEL: @bitcast_fp64vec64_index0(
552
+ ; ANY-NEXT: [[R:%.*]] = bitcast i64 [[X:%.*]] to double
553
+ ; ANY-NEXT: ret double [[R]]
578
554
;
579
555
%v = bitcast i64 %x to <1 x double >
580
556
%r = extractelement <1 x double > %v , i8 0
581
557
ret double %r
582
558
}
583
559
584
560
define double @bitcast_fp64vec_index0 (i128 %x ) {
585
- ; LE64-LABEL: @bitcast_fp64vec_index0(
586
- ; LE64-NEXT: [[V:%.*]] = bitcast i128 [[X:%.*]] to <2 x double>
587
- ; LE64-NEXT: [[R:%.*]] = extractelement <2 x double> [[V]], i64 0
588
- ; LE64-NEXT: ret double [[R]]
589
- ;
590
- ; LE128-LABEL: @bitcast_fp64vec_index0(
591
- ; LE128-NEXT: [[TMP1:%.*]] = trunc i128 [[X:%.*]] to i64
592
- ; LE128-NEXT: [[R:%.*]] = bitcast i64 [[TMP1]] to double
593
- ; LE128-NEXT: ret double [[R]]
561
+ ; ANYLE-LABEL: @bitcast_fp64vec_index0(
562
+ ; ANYLE-NEXT: [[TMP1:%.*]] = trunc i128 [[X:%.*]] to i64
563
+ ; ANYLE-NEXT: [[R:%.*]] = bitcast i64 [[TMP1]] to double
564
+ ; ANYLE-NEXT: ret double [[R]]
594
565
;
595
566
; BE64-LABEL: @bitcast_fp64vec_index0(
596
567
; BE64-NEXT: [[V:%.*]] = bitcast i128 [[X:%.*]] to <2 x double>
@@ -620,15 +591,10 @@ define double @bitcast_fp64vec_index1(i128 %x) {
620
591
; LE128-NEXT: [[R:%.*]] = bitcast i64 [[TMP1]] to double
621
592
; LE128-NEXT: ret double [[R]]
622
593
;
623
- ; BE64-LABEL: @bitcast_fp64vec_index1(
624
- ; BE64-NEXT: [[V:%.*]] = bitcast i128 [[X:%.*]] to <2 x double>
625
- ; BE64-NEXT: [[R:%.*]] = extractelement <2 x double> [[V]], i64 1
626
- ; BE64-NEXT: ret double [[R]]
627
- ;
628
- ; BE128-LABEL: @bitcast_fp64vec_index1(
629
- ; BE128-NEXT: [[TMP1:%.*]] = trunc i128 [[X:%.*]] to i64
630
- ; BE128-NEXT: [[R:%.*]] = bitcast i64 [[TMP1]] to double
631
- ; BE128-NEXT: ret double [[R]]
594
+ ; ANYBE-LABEL: @bitcast_fp64vec_index1(
595
+ ; ANYBE-NEXT: [[TMP1:%.*]] = trunc i128 [[X:%.*]] to i64
596
+ ; ANYBE-NEXT: [[R:%.*]] = bitcast i64 [[TMP1]] to double
597
+ ; ANYBE-NEXT: ret double [[R]]
632
598
;
633
599
%v = bitcast i128 %x to <2 x double >
634
600
%r = extractelement <2 x double > %v , i8 1
@@ -638,10 +604,15 @@ define double @bitcast_fp64vec_index1(i128 %x) {
638
604
; negative test - input integer should be legal
639
605
640
606
define x86_fp80 @bitcast_x86fp80vec_index0 (i160 %x ) {
641
- ; ANY-LABEL: @bitcast_x86fp80vec_index0(
642
- ; ANY-NEXT: [[V:%.*]] = bitcast i160 [[X:%.*]] to <2 x x86_fp80>
643
- ; ANY-NEXT: [[R:%.*]] = extractelement <2 x x86_fp80> [[V]], i64 0
644
- ; ANY-NEXT: ret x86_fp80 [[R]]
607
+ ; ANYLE-LABEL: @bitcast_x86fp80vec_index0(
608
+ ; ANYLE-NEXT: [[TMP1:%.*]] = trunc i160 [[X:%.*]] to i80
609
+ ; ANYLE-NEXT: [[R:%.*]] = bitcast i80 [[TMP1]] to x86_fp80
610
+ ; ANYLE-NEXT: ret x86_fp80 [[R]]
611
+ ;
612
+ ; ANYBE-LABEL: @bitcast_x86fp80vec_index0(
613
+ ; ANYBE-NEXT: [[V:%.*]] = bitcast i160 [[X:%.*]] to <2 x x86_fp80>
614
+ ; ANYBE-NEXT: [[R:%.*]] = extractelement <2 x x86_fp80> [[V]], i64 0
615
+ ; ANYBE-NEXT: ret x86_fp80 [[R]]
645
616
;
646
617
%v = bitcast i160 %x to <2 x x86_fp80 >
647
618
%r = extractelement <2 x x86_fp80 > %v , i8 0
@@ -651,10 +622,15 @@ define x86_fp80 @bitcast_x86fp80vec_index0(i160 %x) {
651
622
; negative test - input integer should be legal
652
623
653
624
define x86_fp80 @bitcast_x86fp80vec_index1 (i160 %x ) {
654
- ; ANY-LABEL: @bitcast_x86fp80vec_index1(
655
- ; ANY-NEXT: [[V:%.*]] = bitcast i160 [[X:%.*]] to <2 x x86_fp80>
656
- ; ANY-NEXT: [[R:%.*]] = extractelement <2 x x86_fp80> [[V]], i64 1
657
- ; ANY-NEXT: ret x86_fp80 [[R]]
625
+ ; ANYLE-LABEL: @bitcast_x86fp80vec_index1(
626
+ ; ANYLE-NEXT: [[V:%.*]] = bitcast i160 [[X:%.*]] to <2 x x86_fp80>
627
+ ; ANYLE-NEXT: [[R:%.*]] = extractelement <2 x x86_fp80> [[V]], i64 1
628
+ ; ANYLE-NEXT: ret x86_fp80 [[R]]
629
+ ;
630
+ ; ANYBE-LABEL: @bitcast_x86fp80vec_index1(
631
+ ; ANYBE-NEXT: [[TMP1:%.*]] = trunc i160 [[X:%.*]] to i80
632
+ ; ANYBE-NEXT: [[R:%.*]] = bitcast i80 [[TMP1]] to x86_fp80
633
+ ; ANYBE-NEXT: ret x86_fp80 [[R]]
658
634
;
659
635
%v = bitcast i160 %x to <2 x x86_fp80 >
660
636
%r = extractelement <2 x x86_fp80 > %v , i8 1
@@ -664,10 +640,15 @@ define x86_fp80 @bitcast_x86fp80vec_index1(i160 %x) {
664
640
; negative test - input integer should be legal
665
641
666
642
define fp128 @bitcast_fp128vec_index0 (i256 %x ) {
667
- ; ANY-LABEL: @bitcast_fp128vec_index0(
668
- ; ANY-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x fp128>
669
- ; ANY-NEXT: [[R:%.*]] = extractelement <2 x fp128> [[V]], i64 0
670
- ; ANY-NEXT: ret fp128 [[R]]
643
+ ; ANYLE-LABEL: @bitcast_fp128vec_index0(
644
+ ; ANYLE-NEXT: [[TMP1:%.*]] = trunc i256 [[X:%.*]] to i128
645
+ ; ANYLE-NEXT: [[R:%.*]] = bitcast i128 [[TMP1]] to fp128
646
+ ; ANYLE-NEXT: ret fp128 [[R]]
647
+ ;
648
+ ; ANYBE-LABEL: @bitcast_fp128vec_index0(
649
+ ; ANYBE-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x fp128>
650
+ ; ANYBE-NEXT: [[R:%.*]] = extractelement <2 x fp128> [[V]], i64 0
651
+ ; ANYBE-NEXT: ret fp128 [[R]]
671
652
;
672
653
%v = bitcast i256 %x to <2 x fp128 >
673
654
%r = extractelement <2 x fp128 > %v , i8 0
@@ -677,10 +658,15 @@ define fp128 @bitcast_fp128vec_index0(i256 %x) {
677
658
; negative test - input integer should be legal
678
659
679
660
define fp128 @bitcast_fp128vec_index1 (i256 %x ) {
680
- ; ANY-LABEL: @bitcast_fp128vec_index1(
681
- ; ANY-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x fp128>
682
- ; ANY-NEXT: [[R:%.*]] = extractelement <2 x fp128> [[V]], i64 1
683
- ; ANY-NEXT: ret fp128 [[R]]
661
+ ; ANYLE-LABEL: @bitcast_fp128vec_index1(
662
+ ; ANYLE-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x fp128>
663
+ ; ANYLE-NEXT: [[R:%.*]] = extractelement <2 x fp128> [[V]], i64 1
664
+ ; ANYLE-NEXT: ret fp128 [[R]]
665
+ ;
666
+ ; ANYBE-LABEL: @bitcast_fp128vec_index1(
667
+ ; ANYBE-NEXT: [[TMP1:%.*]] = trunc i256 [[X:%.*]] to i128
668
+ ; ANYBE-NEXT: [[R:%.*]] = bitcast i128 [[TMP1]] to fp128
669
+ ; ANYBE-NEXT: ret fp128 [[R]]
684
670
;
685
671
%v = bitcast i256 %x to <2 x fp128 >
686
672
%r = extractelement <2 x fp128 > %v , i8 1
@@ -690,10 +676,15 @@ define fp128 @bitcast_fp128vec_index1(i256 %x) {
690
676
; negative test - input integer should be legal
691
677
692
678
define ppc_fp128 @bitcast_ppcfp128vec_index0 (i256 %x ) {
693
- ; ANY-LABEL: @bitcast_ppcfp128vec_index0(
694
- ; ANY-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x ppc_fp128>
695
- ; ANY-NEXT: [[R:%.*]] = extractelement <2 x ppc_fp128> [[V]], i64 0
696
- ; ANY-NEXT: ret ppc_fp128 [[R]]
679
+ ; ANYLE-LABEL: @bitcast_ppcfp128vec_index0(
680
+ ; ANYLE-NEXT: [[TMP1:%.*]] = trunc i256 [[X:%.*]] to i128
681
+ ; ANYLE-NEXT: [[R:%.*]] = bitcast i128 [[TMP1]] to ppc_fp128
682
+ ; ANYLE-NEXT: ret ppc_fp128 [[R]]
683
+ ;
684
+ ; ANYBE-LABEL: @bitcast_ppcfp128vec_index0(
685
+ ; ANYBE-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x ppc_fp128>
686
+ ; ANYBE-NEXT: [[R:%.*]] = extractelement <2 x ppc_fp128> [[V]], i64 0
687
+ ; ANYBE-NEXT: ret ppc_fp128 [[R]]
697
688
;
698
689
%v = bitcast i256 %x to <2 x ppc_fp128 >
699
690
%r = extractelement <2 x ppc_fp128 > %v , i8 0
@@ -703,10 +694,15 @@ define ppc_fp128 @bitcast_ppcfp128vec_index0(i256 %x) {
703
694
; negative test -input integer should be legal
704
695
705
696
define ppc_fp128 @bitcast_ppcfp128vec_index1 (i256 %x ) {
706
- ; ANY-LABEL: @bitcast_ppcfp128vec_index1(
707
- ; ANY-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x ppc_fp128>
708
- ; ANY-NEXT: [[R:%.*]] = extractelement <2 x ppc_fp128> [[V]], i64 1
709
- ; ANY-NEXT: ret ppc_fp128 [[R]]
697
+ ; ANYLE-LABEL: @bitcast_ppcfp128vec_index1(
698
+ ; ANYLE-NEXT: [[V:%.*]] = bitcast i256 [[X:%.*]] to <2 x ppc_fp128>
699
+ ; ANYLE-NEXT: [[R:%.*]] = extractelement <2 x ppc_fp128> [[V]], i64 1
700
+ ; ANYLE-NEXT: ret ppc_fp128 [[R]]
701
+ ;
702
+ ; ANYBE-LABEL: @bitcast_ppcfp128vec_index1(
703
+ ; ANYBE-NEXT: [[TMP1:%.*]] = trunc i256 [[X:%.*]] to i128
704
+ ; ANYBE-NEXT: [[R:%.*]] = bitcast i128 [[TMP1]] to ppc_fp128
705
+ ; ANYBE-NEXT: ret ppc_fp128 [[R]]
710
706
;
711
707
%v = bitcast i256 %x to <2 x ppc_fp128 >
712
708
%r = extractelement <2 x ppc_fp128 > %v , i8 1
@@ -729,17 +725,11 @@ define i8 @bitcast_scalar_index_variable(i32 %x, i64 %y) {
729
725
; extra use is ok if we don't need a shift
730
726
731
727
define i8 @bitcast_scalar_index0_use (i64 %x ) {
732
- ; LE64-LABEL: @bitcast_scalar_index0_use(
733
- ; LE64-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <8 x i8>
734
- ; LE64-NEXT: call void @use(<8 x i8> [[V]])
735
- ; LE64-NEXT: [[R:%.*]] = trunc i64 [[X]] to i8
736
- ; LE64-NEXT: ret i8 [[R]]
737
- ;
738
- ; LE128-LABEL: @bitcast_scalar_index0_use(
739
- ; LE128-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <8 x i8>
740
- ; LE128-NEXT: call void @use(<8 x i8> [[V]])
741
- ; LE128-NEXT: [[R:%.*]] = extractelement <8 x i8> [[V]], i64 0
742
- ; LE128-NEXT: ret i8 [[R]]
728
+ ; ANYLE-LABEL: @bitcast_scalar_index0_use(
729
+ ; ANYLE-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <8 x i8>
730
+ ; ANYLE-NEXT: call void @use(<8 x i8> [[V]])
731
+ ; ANYLE-NEXT: [[R:%.*]] = trunc i64 [[X]] to i8
732
+ ; ANYLE-NEXT: ret i8 [[R]]
743
733
;
744
734
; ANYBE-LABEL: @bitcast_scalar_index0_use(
745
735
; ANYBE-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <8 x i8>
@@ -766,16 +756,10 @@ define i1 @bit_extract_cmp(i64 %x) {
766
756
; LE128-NEXT: [[R:%.*]] = fcmp oeq float [[E]], 0.000000e+00
767
757
; LE128-NEXT: ret i1 [[R]]
768
758
;
769
- ; BE64-LABEL: @bit_extract_cmp(
770
- ; BE64-NEXT: [[TMP1:%.*]] = and i64 [[X:%.*]], 2147483647
771
- ; BE64-NEXT: [[R:%.*]] = icmp eq i64 [[TMP1]], 0
772
- ; BE64-NEXT: ret i1 [[R]]
773
- ;
774
- ; BE128-LABEL: @bit_extract_cmp(
775
- ; BE128-NEXT: [[V:%.*]] = bitcast i64 [[X:%.*]] to <2 x float>
776
- ; BE128-NEXT: [[E:%.*]] = extractelement <2 x float> [[V]], i64 1
777
- ; BE128-NEXT: [[R:%.*]] = fcmp oeq float [[E]], 0.000000e+00
778
- ; BE128-NEXT: ret i1 [[R]]
759
+ ; ANYBE-LABEL: @bit_extract_cmp(
760
+ ; ANYBE-NEXT: [[TMP1:%.*]] = and i64 [[X:%.*]], 2147483647
761
+ ; ANYBE-NEXT: [[R:%.*]] = icmp eq i64 [[TMP1]], 0
762
+ ; ANYBE-NEXT: ret i1 [[R]]
779
763
;
780
764
%v = bitcast i64 %x to <2 x float >
781
765
%e = extractelement <2 x float > %v , i8 1
0 commit comments