@@ -673,38 +673,38 @@ define double @sitofp_i128_to_f64(i128 %x) {
673
673
; GISEL-NEXT: v_ashrrev_i32_e32 v6, 31, v3
674
674
; GISEL-NEXT: v_xor_b32_e32 v0, v6, v4
675
675
; GISEL-NEXT: v_xor_b32_e32 v1, v6, v5
676
- ; GISEL-NEXT: v_sub_co_u32_e32 v0, vcc, v0, v6
677
- ; GISEL-NEXT: v_xor_b32_e32 v2, v6, v2
678
- ; GISEL-NEXT: v_subb_co_u32_e32 v1, vcc, v1, v6, vcc
679
- ; GISEL-NEXT: v_xor_b32_e32 v3, v6, v3
680
- ; GISEL-NEXT: v_subb_co_u32_e32 v2 , vcc, v2 , v6, vcc
681
- ; GISEL-NEXT: v_ffbh_u32_e32 v5, v0
682
- ; GISEL-NEXT: v_subb_co_u32_e32 v3 , vcc, v3 , v6, vcc
683
- ; GISEL-NEXT: v_ffbh_u32_e32 v4, v1
684
- ; GISEL-NEXT: v_add_u32_e32 v5 , 32, v5
685
- ; GISEL-NEXT: v_ffbh_u32_e32 v7, v2
686
- ; GISEL-NEXT: v_min_u32_e32 v4, v4, v5
687
- ; GISEL-NEXT: v_ffbh_u32_e32 v5, v3
676
+ ; GISEL-NEXT: v_xor_b32_e32 v4, v6, v2
677
+ ; GISEL-NEXT: v_sub_co_u32_e32 v2, vcc, v0, v6
678
+ ; GISEL-NEXT: v_xor_b32_e32 v5, v6, v3
679
+ ; GISEL-NEXT: v_subb_co_u32_e32 v3, vcc, v1, v6, vcc
680
+ ; GISEL-NEXT: v_subb_co_u32_e32 v4 , vcc, v4 , v6, vcc
681
+ ; GISEL-NEXT: v_ffbh_u32_e32 v1, v2
682
+ ; GISEL-NEXT: v_subb_co_u32_e32 v5 , vcc, v5 , v6, vcc
683
+ ; GISEL-NEXT: v_ffbh_u32_e32 v0, v3
684
+ ; GISEL-NEXT: v_add_u32_e32 v1 , 32, v1
685
+ ; GISEL-NEXT: v_ffbh_u32_e32 v7, v4
686
+ ; GISEL-NEXT: v_min_u32_e32 v0, v0, v1
687
+ ; GISEL-NEXT: v_ffbh_u32_e32 v1, v5
688
688
; GISEL-NEXT: v_add_u32_e32 v7, 32, v7
689
- ; GISEL-NEXT: v_cmp_eq_u64_e32 vcc, 0, v[2:3 ]
690
- ; GISEL-NEXT: v_add_u32_e32 v4 , 64, v4
691
- ; GISEL-NEXT: v_min_u32_e32 v5, v5 , v7
692
- ; GISEL-NEXT: v_cndmask_b32_e32 v9, v5, v4 , vcc
689
+ ; GISEL-NEXT: v_cmp_eq_u64_e32 vcc, 0, v[4:5 ]
690
+ ; GISEL-NEXT: v_add_u32_e32 v0 , 64, v0
691
+ ; GISEL-NEXT: v_min_u32_e32 v1, v1 , v7
692
+ ; GISEL-NEXT: v_cndmask_b32_e32 v9, v1, v0 , vcc
693
693
; GISEL-NEXT: v_sub_u32_e32 v8, 0x80, v9
694
694
; GISEL-NEXT: v_sub_u32_e32 v7, 0x7f, v9
695
695
; GISEL-NEXT: v_cmp_ge_i32_e32 vcc, 53, v8
696
696
; GISEL-NEXT: ; implicit-def: $vgpr10
697
- ; GISEL-NEXT: ; implicit-def: $vgpr4_vgpr5
697
+ ; GISEL-NEXT: ; implicit-def: $vgpr0_vgpr1
698
698
; GISEL-NEXT: s_and_saveexec_b64 s[4:5], vcc
699
699
; GISEL-NEXT: s_xor_b64 s[4:5], exec, s[4:5]
700
700
; GISEL-NEXT: ; %bb.2: ; %itofp-if-else
701
- ; GISEL-NEXT: v_add_u32_e32 v2 , 0xffffffb5, v9
702
- ; GISEL-NEXT: v_lshlrev_b64 v[0:1], v2 , v[0:1 ]
703
- ; GISEL-NEXT: v_cmp_gt_u32_e32 vcc, 64, v2
704
- ; GISEL-NEXT: v_cndmask_b32_e32 v4 , 0, v0, vcc
701
+ ; GISEL-NEXT: v_add_u32_e32 v4 , 0xffffffb5, v9
702
+ ; GISEL-NEXT: v_lshlrev_b64 v[0:1], v4 , v[2:3 ]
703
+ ; GISEL-NEXT: v_cmp_gt_u32_e32 vcc, 64, v4
704
+ ; GISEL-NEXT: v_cndmask_b32_e32 v0 , 0, v0, vcc
705
705
; GISEL-NEXT: v_cndmask_b32_e32 v10, 0, v1, vcc
706
706
; GISEL-NEXT: ; implicit-def: $vgpr8
707
- ; GISEL-NEXT: ; implicit-def: $vgpr0
707
+ ; GISEL-NEXT: ; implicit-def: $vgpr2
708
708
; GISEL-NEXT: ; implicit-def: $vgpr9
709
709
; GISEL-NEXT: ; %bb.3: ; %Flow3
710
710
; GISEL-NEXT: s_andn2_saveexec_b64 s[8:9], s[4:5]
@@ -721,89 +721,88 @@ define double @sitofp_i128_to_f64(i128 %x) {
721
721
; GISEL-NEXT: ; %bb.6: ; %itofp-sw-default
722
722
; GISEL-NEXT: v_sub_u32_e32 v14, 0x49, v9
723
723
; GISEL-NEXT: v_sub_u32_e32 v10, 64, v14
724
- ; GISEL-NEXT: v_lshrrev_b64 v[4:5 ], v14, v[0:1 ]
725
- ; GISEL-NEXT: v_lshlrev_b64 v[10:11], v10, v[2:3 ]
724
+ ; GISEL-NEXT: v_lshrrev_b64 v[0:1 ], v14, v[2:3 ]
725
+ ; GISEL-NEXT: v_lshlrev_b64 v[10:11], v10, v[4:5 ]
726
726
; GISEL-NEXT: v_subrev_u32_e32 v15, 64, v14
727
- ; GISEL-NEXT: v_or_b32_e32 v10, v4, v10
728
- ; GISEL-NEXT: v_or_b32_e32 v11, v5, v11
729
- ; GISEL-NEXT: v_lshrrev_b64 v[4:5], v15, v[2:3]
730
- ; GISEL-NEXT: v_lshrrev_b64 v[12:13 ], v14 , v[2:3 ]
727
+ ; GISEL-NEXT: v_lshrrev_b64 v[12:13], v14, v[4:5]
728
+ ; GISEL-NEXT: v_or_b32_e32 v10, v0, v10
729
+ ; GISEL-NEXT: v_or_b32_e32 v11, v1, v11
730
+ ; GISEL-NEXT: v_lshrrev_b64 v[0:1 ], v15 , v[4:5 ]
731
731
; GISEL-NEXT: v_cmp_gt_u32_e32 vcc, 64, v14
732
+ ; GISEL-NEXT: v_add_u32_e32 v9, 55, v9
733
+ ; GISEL-NEXT: v_cndmask_b32_e32 v0, v0, v10, vcc
734
+ ; GISEL-NEXT: v_cndmask_b32_e32 v1, v1, v11, vcc
732
735
; GISEL-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v14
733
- ; GISEL-NEXT: v_add_u32_e32 v14, 55, v9
734
- ; GISEL-NEXT: v_cndmask_b32_e32 v4, v4, v10, vcc
735
- ; GISEL-NEXT: v_cndmask_b32_e32 v5, v5, v11, vcc
736
- ; GISEL-NEXT: v_sub_u32_e32 v11, 64, v14
737
- ; GISEL-NEXT: v_cndmask_b32_e64 v13, v4, v0, s[4:5]
738
- ; GISEL-NEXT: v_cndmask_b32_e64 v4, v5, v1, s[4:5]
739
- ; GISEL-NEXT: v_cndmask_b32_e32 v5, 0, v12, vcc
740
- ; GISEL-NEXT: v_lshrrev_b64 v[9:10], v14, -1
741
- ; GISEL-NEXT: v_lshlrev_b64 v[11:12], v11, -1
742
- ; GISEL-NEXT: v_subrev_u32_e32 v15, 64, v14
743
- ; GISEL-NEXT: v_or_b32_e32 v16, v9, v11
744
- ; GISEL-NEXT: v_or_b32_e32 v17, v10, v12
745
- ; GISEL-NEXT: v_lshrrev_b64 v[11:12], v15, -1
746
- ; GISEL-NEXT: v_cmp_gt_u32_e32 vcc, 64, v14
747
- ; GISEL-NEXT: v_cndmask_b32_e32 v11, v11, v16, vcc
748
- ; GISEL-NEXT: v_cndmask_b32_e32 v12, v12, v17, vcc
749
- ; GISEL-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v14
750
- ; GISEL-NEXT: v_cndmask_b32_e32 v9, 0, v9, vcc
751
- ; GISEL-NEXT: v_cndmask_b32_e32 v10, 0, v10, vcc
752
- ; GISEL-NEXT: v_cndmask_b32_e64 v11, v11, -1, s[4:5]
753
- ; GISEL-NEXT: v_cndmask_b32_e64 v12, v12, -1, s[4:5]
754
- ; GISEL-NEXT: v_and_b32_e32 v2, v9, v2
755
- ; GISEL-NEXT: v_and_b32_e32 v3, v10, v3
756
- ; GISEL-NEXT: v_and_or_b32 v0, v11, v0, v2
757
- ; GISEL-NEXT: v_and_or_b32 v1, v12, v1, v3
736
+ ; GISEL-NEXT: v_cndmask_b32_e32 v11, 0, v12, vcc
737
+ ; GISEL-NEXT: v_sub_u32_e32 v12, 64, v9
738
+ ; GISEL-NEXT: v_cndmask_b32_e64 v14, v0, v2, s[4:5]
739
+ ; GISEL-NEXT: v_cndmask_b32_e64 v10, v1, v3, s[4:5]
740
+ ; GISEL-NEXT: v_lshrrev_b64 v[0:1], v9, -1
741
+ ; GISEL-NEXT: v_lshlrev_b64 v[12:13], v12, -1
742
+ ; GISEL-NEXT: v_subrev_u32_e32 v15, 64, v9
743
+ ; GISEL-NEXT: v_or_b32_e32 v16, v0, v12
744
+ ; GISEL-NEXT: v_or_b32_e32 v17, v1, v13
745
+ ; GISEL-NEXT: v_lshrrev_b64 v[12:13], v15, -1
746
+ ; GISEL-NEXT: v_cmp_gt_u32_e32 vcc, 64, v9
747
+ ; GISEL-NEXT: v_cndmask_b32_e32 v12, v12, v16, vcc
748
+ ; GISEL-NEXT: v_cndmask_b32_e32 v13, v13, v17, vcc
749
+ ; GISEL-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v9
750
+ ; GISEL-NEXT: v_cndmask_b32_e32 v0, 0, v0, vcc
751
+ ; GISEL-NEXT: v_cndmask_b32_e32 v1, 0, v1, vcc
752
+ ; GISEL-NEXT: v_cndmask_b32_e64 v9, v12, -1, s[4:5]
753
+ ; GISEL-NEXT: v_cndmask_b32_e64 v12, v13, -1, s[4:5]
754
+ ; GISEL-NEXT: v_and_b32_e32 v0, v0, v4
755
+ ; GISEL-NEXT: v_and_b32_e32 v1, v1, v5
756
+ ; GISEL-NEXT: v_and_or_b32 v0, v9, v2, v0
757
+ ; GISEL-NEXT: v_and_or_b32 v1, v12, v3, v1
758
758
; GISEL-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
759
759
; GISEL-NEXT: v_cndmask_b32_e64 v0, 0, 1, vcc
760
- ; GISEL-NEXT: v_or_b32_e32 v3, v13 , v0
761
- ; GISEL-NEXT: v_mov_b32_e32 v0, v3
762
- ; GISEL-NEXT: v_mov_b32_e32 v1, v4
763
- ; GISEL-NEXT: v_mov_b32_e32 v2, v5
764
- ; GISEL-NEXT: v_mov_b32_e32 v3, v6
760
+ ; GISEL-NEXT: v_or_b32_e32 v9, v14 , v0
761
+ ; GISEL-NEXT: v_mov_b32_e32 v2, v9
762
+ ; GISEL-NEXT: v_mov_b32_e32 v3, v10
763
+ ; GISEL-NEXT: v_mov_b32_e32 v4, v11
764
+ ; GISEL-NEXT: v_mov_b32_e32 v5, v12
765
765
; GISEL-NEXT: .LBB2_7: ; %Flow1
766
766
; GISEL-NEXT: s_or_b64 exec, exec, s[12:13]
767
767
; GISEL-NEXT: .LBB2_8: ; %Flow2
768
768
; GISEL-NEXT: s_andn2_saveexec_b64 s[4:5], s[10:11]
769
769
; GISEL-NEXT: s_cbranch_execz .LBB2_10
770
770
; GISEL-NEXT: ; %bb.9: ; %itofp-sw-bb
771
- ; GISEL-NEXT: v_lshlrev_b64 v[9:10 ], 1, v[0:1 ]
772
- ; GISEL-NEXT: v_lshlrev_b64 v[2:3 ], 1, v[2:3]
773
- ; GISEL-NEXT: v_lshrrev_b32_e32 v0 , 31, v1
774
- ; GISEL-NEXT: v_or_b32_e32 v11, v2, v0
775
- ; GISEL-NEXT: v_mov_b32_e32 v0, v9
776
- ; GISEL-NEXT: v_mov_b32_e32 v1, v10
777
- ; GISEL-NEXT: v_mov_b32_e32 v2, v11
778
- ; GISEL-NEXT: v_mov_b32_e32 v3, v12
771
+ ; GISEL-NEXT: v_lshlrev_b64 v[4:5 ], 1, v[4:5 ]
772
+ ; GISEL-NEXT: v_lshlrev_b64 v[0:1 ], 1, v[2:3]
773
+ ; GISEL-NEXT: v_lshrrev_b32_e32 v2 , 31, v3
774
+ ; GISEL-NEXT: v_or_b32_e32 v2, v4, v2
775
+ ; GISEL-NEXT: v_mov_b32_e32 v5, v3
776
+ ; GISEL-NEXT: v_mov_b32_e32 v4, v2
777
+ ; GISEL-NEXT: v_mov_b32_e32 v3, v1
778
+ ; GISEL-NEXT: v_mov_b32_e32 v2, v0
779
779
; GISEL-NEXT: .LBB2_10: ; %itofp-sw-epilog
780
780
; GISEL-NEXT: s_or_b64 exec, exec, s[4:5]
781
- ; GISEL-NEXT: v_bfe_u32 v3, v0 , 2, 1
782
- ; GISEL-NEXT: v_or_b32_e32 v0, v0, v3
783
- ; GISEL-NEXT: v_add_co_u32_e32 v0 , vcc, 1, v0
784
- ; GISEL-NEXT: v_addc_co_u32_e32 v1 , vcc, 0, v1 , vcc
785
- ; GISEL-NEXT: v_addc_co_u32_e32 v2 , vcc, 0, v2 , vcc
786
- ; GISEL-NEXT: v_lshrrev_b64 v[4:5 ], 2, v[0:1 ]
781
+ ; GISEL-NEXT: v_bfe_u32 v0, v2 , 2, 1
782
+ ; GISEL-NEXT: v_or_b32_e32 v0, v2, v0
783
+ ; GISEL-NEXT: v_add_co_u32_e32 v2 , vcc, 1, v0
784
+ ; GISEL-NEXT: v_addc_co_u32_e32 v3 , vcc, 0, v3 , vcc
785
+ ; GISEL-NEXT: v_addc_co_u32_e32 v4 , vcc, 0, v4 , vcc
786
+ ; GISEL-NEXT: v_lshrrev_b64 v[0:1 ], 2, v[2:3 ]
787
787
; GISEL-NEXT: v_mov_b32_e32 v9, 0
788
- ; GISEL-NEXT: v_and_b32_e32 v10, 0x800000, v1
788
+ ; GISEL-NEXT: v_and_b32_e32 v10, 0x800000, v3
789
789
; GISEL-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[9:10]
790
- ; GISEL-NEXT: v_lshl_or_b32 v10, v2 , 30, v5
790
+ ; GISEL-NEXT: v_lshl_or_b32 v10, v4 , 30, v1
791
791
; GISEL-NEXT: s_and_saveexec_b64 s[4:5], vcc
792
792
; GISEL-NEXT: ; %bb.11: ; %itofp-if-then20
793
- ; GISEL-NEXT: v_lshrrev_b64 v[4:5 ], 3, v[0:1 ]
793
+ ; GISEL-NEXT: v_lshrrev_b64 v[0:1 ], 3, v[2:3 ]
794
794
; GISEL-NEXT: v_mov_b32_e32 v7, v8
795
- ; GISEL-NEXT: v_lshl_or_b32 v10, v2 , 29, v5
795
+ ; GISEL-NEXT: v_lshl_or_b32 v10, v4 , 29, v1
796
796
; GISEL-NEXT: ; %bb.12: ; %Flow
797
797
; GISEL-NEXT: s_or_b64 exec, exec, s[4:5]
798
798
; GISEL-NEXT: .LBB2_13: ; %Flow4
799
799
; GISEL-NEXT: s_or_b64 exec, exec, s[8:9]
800
- ; GISEL-NEXT: v_and_b32_e32 v0, 0x80000000, v6
801
- ; GISEL-NEXT: v_mov_b32_e32 v1, 0x3ff00000
802
- ; GISEL-NEXT: v_mov_b32_e32 v2, 0xfffff
803
- ; GISEL-NEXT: v_lshl_add_u32 v1, v7, 20, v1
804
- ; GISEL-NEXT: v_and_or_b32 v2, v10, v2, v0
805
- ; GISEL-NEXT: v_and_or_b32 v0, v4, -1, 0
806
- ; GISEL-NEXT: v_or3_b32 v1, v2, v1, 0
800
+ ; GISEL-NEXT: v_and_b32_e32 v1, 0x80000000, v6
801
+ ; GISEL-NEXT: v_mov_b32_e32 v2, 0x3ff00000
802
+ ; GISEL-NEXT: v_mov_b32_e32 v3, 0xfffff
803
+ ; GISEL-NEXT: v_lshl_add_u32 v2, v7, 20, v2
804
+ ; GISEL-NEXT: v_and_or_b32 v1, v10, v3, v1
805
+ ; GISEL-NEXT: v_or3_b32 v1, v1, v2, 0
807
806
; GISEL-NEXT: .LBB2_14: ; %Flow5
808
807
; GISEL-NEXT: s_or_b64 exec, exec, s[6:7]
809
808
; GISEL-NEXT: s_setpc_b64 s[30:31]
@@ -1083,7 +1082,6 @@ define double @uitofp_i128_to_f64(i128 %x) {
1083
1082
; GISEL-NEXT: v_mov_b32_e32 v0, 0x3ff00000
1084
1083
; GISEL-NEXT: v_lshl_add_u32 v0, v6, 20, v0
1085
1084
; GISEL-NEXT: v_and_b32_e32 v1, 0xfffff, v9
1086
- ; GISEL-NEXT: v_and_or_b32 v4, v4, -1, 0
1087
1085
; GISEL-NEXT: v_or3_b32 v5, v1, v0, 0
1088
1086
; GISEL-NEXT: .LBB3_14: ; %Flow5
1089
1087
; GISEL-NEXT: s_or_b64 exec, exec, s[6:7]
0 commit comments