Lines Matching refs:CGP
3 …sa3d -mcpu=hawaii -denormal-fp-math-f32=preserve-sign < %s | FileCheck -check-prefixes=CHECK,CGP %s
690 ; CGP-LABEL: v_sdiv_v2i64:
691 ; CGP: ; %bb.0:
692 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
693 ; CGP-NEXT: v_mov_b32_e32 v9, v1
694 ; CGP-NEXT: v_mov_b32_e32 v8, v0
695 ; CGP-NEXT: v_or_b32_e32 v1, v9, v5
696 ; CGP-NEXT: v_mov_b32_e32 v0, 0
697 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
698 ; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
699 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
700 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
701 ; CGP-NEXT: s_cbranch_execz BB2_2
702 ; CGP-NEXT: ; %bb.1:
703 ; CGP-NEXT: v_ashrrev_i32_e32 v0, 31, v5
704 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v4, v0
705 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, v5, v0, vcc
706 ; CGP-NEXT: v_xor_b32_e32 v1, v1, v0
707 ; CGP-NEXT: v_xor_b32_e32 v5, v5, v0
708 ; CGP-NEXT: v_cvt_f32_u32_e32 v10, v1
709 ; CGP-NEXT: v_cvt_f32_u32_e32 v11, v5
710 ; CGP-NEXT: v_ashrrev_i32_e32 v12, 31, v9
711 ; CGP-NEXT: v_mac_f32_e32 v10, 0x4f800000, v11
712 ; CGP-NEXT: v_rcp_iflag_f32_e32 v10, v10
713 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v8, v12
714 ; CGP-NEXT: v_addc_u32_e32 v9, vcc, v9, v12, vcc
715 ; CGP-NEXT: v_sub_i32_e32 v14, vcc, 0, v1
716 ; CGP-NEXT: v_mul_f32_e32 v10, 0x5f7ffffc, v10
717 ; CGP-NEXT: v_mul_f32_e32 v13, 0x2f800000, v10
718 ; CGP-NEXT: v_trunc_f32_e32 v13, v13
719 ; CGP-NEXT: v_mac_f32_e32 v10, 0xcf800000, v13
720 ; CGP-NEXT: v_cvt_u32_f32_e32 v10, v10
721 ; CGP-NEXT: v_cvt_u32_f32_e32 v13, v13
722 ; CGP-NEXT: v_subb_u32_e32 v15, vcc, 0, v5, vcc
723 ; CGP-NEXT: v_xor_b32_e32 v11, v11, v12
724 ; CGP-NEXT: v_mul_lo_u32 v16, v15, v10
725 ; CGP-NEXT: v_mul_lo_u32 v17, v14, v13
726 ; CGP-NEXT: v_mul_hi_u32 v19, v14, v10
727 ; CGP-NEXT: v_mul_lo_u32 v18, v14, v10
728 ; CGP-NEXT: v_xor_b32_e32 v9, v9, v12
729 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v17
730 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v19
731 ; CGP-NEXT: v_mul_lo_u32 v17, v13, v18
732 ; CGP-NEXT: v_mul_lo_u32 v19, v10, v16
733 ; CGP-NEXT: v_mul_hi_u32 v20, v10, v18
734 ; CGP-NEXT: v_mul_hi_u32 v18, v13, v18
735 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v17, v19
736 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
737 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v17, v20
738 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
739 ; CGP-NEXT: v_mul_lo_u32 v20, v13, v16
740 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v19, v17
741 ; CGP-NEXT: v_mul_hi_u32 v19, v10, v16
742 ; CGP-NEXT: v_mul_hi_u32 v16, v13, v16
743 ; CGP-NEXT: v_add_i32_e32 v18, vcc, v20, v18
744 ; CGP-NEXT: v_cndmask_b32_e64 v20, 0, 1, vcc
745 ; CGP-NEXT: v_add_i32_e32 v18, vcc, v18, v19
746 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
747 ; CGP-NEXT: v_add_i32_e32 v19, vcc, v20, v19
748 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v18, v17
749 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
750 ; CGP-NEXT: v_add_i32_e32 v18, vcc, v19, v18
751 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v18
752 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v17
753 ; CGP-NEXT: v_addc_u32_e64 v17, s[4:5], v13, v16, vcc
754 ; CGP-NEXT: v_mul_lo_u32 v15, v15, v10
755 ; CGP-NEXT: v_mul_lo_u32 v18, v14, v17
756 ; CGP-NEXT: v_mul_lo_u32 v19, v14, v10
757 ; CGP-NEXT: v_mul_hi_u32 v14, v14, v10
758 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v16
759 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v15, v18
760 ; CGP-NEXT: v_mul_hi_u32 v16, v10, v19
761 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v15, v14
762 ; CGP-NEXT: v_mul_lo_u32 v15, v17, v19
763 ; CGP-NEXT: v_mul_lo_u32 v18, v10, v14
764 ; CGP-NEXT: v_mul_hi_u32 v19, v17, v19
765 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v15, v18
766 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[4:5]
767 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v15, v16
768 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
769 ; CGP-NEXT: v_mul_lo_u32 v16, v17, v14
770 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v18, v15
771 ; CGP-NEXT: v_mul_hi_u32 v18, v10, v14
772 ; CGP-NEXT: v_mul_hi_u32 v14, v17, v14
773 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v16, v19
774 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, s[4:5]
775 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v16, v18
776 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[4:5]
777 ; CGP-NEXT: v_add_i32_e64 v18, s[4:5], v19, v18
778 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v16, v15
779 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
780 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v18, v16
781 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v14, v16
782 ; CGP-NEXT: v_addc_u32_e32 v13, vcc, v13, v14, vcc
783 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v15
784 ; CGP-NEXT: v_addc_u32_e32 v13, vcc, 0, v13, vcc
785 ; CGP-NEXT: v_mul_lo_u32 v14, v9, v10
786 ; CGP-NEXT: v_mul_lo_u32 v15, v11, v13
787 ; CGP-NEXT: v_mul_hi_u32 v16, v11, v10
788 ; CGP-NEXT: v_mul_hi_u32 v10, v9, v10
789 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
790 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
791 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
792 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
793 ; CGP-NEXT: v_mul_lo_u32 v16, v9, v13
794 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
795 ; CGP-NEXT: v_mul_hi_u32 v15, v11, v13
796 ; CGP-NEXT: v_mul_hi_u32 v13, v9, v13
797 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v16, v10
798 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
799 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v15
800 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
801 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v16, v15
802 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v14
803 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
804 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
805 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
806 ; CGP-NEXT: v_mul_lo_u32 v14, v5, v10
807 ; CGP-NEXT: v_mul_lo_u32 v15, v1, v13
808 ; CGP-NEXT: v_mul_hi_u32 v17, v1, v10
809 ; CGP-NEXT: v_mul_lo_u32 v16, v1, v10
810 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
811 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
812 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v11, v16
813 ; CGP-NEXT: v_subb_u32_e64 v15, s[4:5], v9, v14, vcc
814 ; CGP-NEXT: v_sub_i32_e64 v9, s[4:5], v9, v14
815 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v15, v5
816 ; CGP-NEXT: v_subb_u32_e32 v9, vcc, v9, v5, vcc
817 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, -1, s[4:5]
818 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v11, v1
819 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v11, v1
820 ; CGP-NEXT: v_subbrev_u32_e32 v9, vcc, 0, v9, vcc
821 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, -1, s[4:5]
822 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], v15, v5
823 ; CGP-NEXT: v_add_i32_e32 v15, vcc, 1, v10
824 ; CGP-NEXT: v_cndmask_b32_e64 v14, v14, v16, s[4:5]
825 ; CGP-NEXT: v_addc_u32_e32 v16, vcc, 0, v13, vcc
826 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v9, v5
827 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, -1, vcc
828 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v11, v1
829 ; CGP-NEXT: v_cndmask_b32_e64 v1, 0, -1, vcc
830 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v9, v5
831 ; CGP-NEXT: v_cndmask_b32_e32 v1, v17, v1, vcc
832 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v15
833 ; CGP-NEXT: v_addc_u32_e32 v9, vcc, 0, v16, vcc
834 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v1
835 ; CGP-NEXT: v_cndmask_b32_e32 v1, v15, v5, vcc
836 ; CGP-NEXT: v_cndmask_b32_e32 v5, v16, v9, vcc
837 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v14
838 ; CGP-NEXT: v_cndmask_b32_e32 v1, v10, v1, vcc
839 ; CGP-NEXT: v_xor_b32_e32 v9, v12, v0
840 ; CGP-NEXT: v_cndmask_b32_e32 v5, v13, v5, vcc
841 ; CGP-NEXT: v_xor_b32_e32 v0, v1, v9
842 ; CGP-NEXT: v_xor_b32_e32 v1, v5, v9
843 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v9
844 ; CGP-NEXT: v_subb_u32_e32 v1, vcc, v1, v9, vcc
845 ; CGP-NEXT: BB2_2: ; %Flow2
846 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
847 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
848 ; CGP-NEXT: s_cbranch_execz BB2_4
849 ; CGP-NEXT: ; %bb.3:
850 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
851 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
852 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
853 ; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
854 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
855 ; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
856 ; CGP-NEXT: v_mul_hi_u32 v1, v0, v1
857 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v1
858 ; CGP-NEXT: v_mul_hi_u32 v0, v8, v0
859 ; CGP-NEXT: v_mul_lo_u32 v1, v0, v4
860 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v0
861 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v8, v1
862 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v4
863 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
864 ; CGP-NEXT: v_sub_i32_e64 v5, s[4:5], v1, v4
865 ; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v5, vcc
866 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v0
867 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v4
868 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
869 ; CGP-NEXT: v_mov_b32_e32 v1, 0
870 ; CGP-NEXT: BB2_4:
871 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
872 ; CGP-NEXT: v_or_b32_e32 v5, v3, v7
873 ; CGP-NEXT: v_mov_b32_e32 v4, 0
874 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[4:5]
875 ; CGP-NEXT: ; implicit-def: $vgpr4_vgpr5
876 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
877 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
878 ; CGP-NEXT: s_cbranch_execz BB2_6
879 ; CGP-NEXT: ; %bb.5:
880 ; CGP-NEXT: v_ashrrev_i32_e32 v4, 31, v7
881 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v6, v4
882 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, v7, v4, vcc
883 ; CGP-NEXT: v_xor_b32_e32 v5, v5, v4
884 ; CGP-NEXT: v_xor_b32_e32 v7, v7, v4
885 ; CGP-NEXT: v_cvt_f32_u32_e32 v8, v5
886 ; CGP-NEXT: v_cvt_f32_u32_e32 v9, v7
887 ; CGP-NEXT: v_ashrrev_i32_e32 v10, 31, v3
888 ; CGP-NEXT: v_mac_f32_e32 v8, 0x4f800000, v9
889 ; CGP-NEXT: v_rcp_iflag_f32_e32 v8, v8
890 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v2, v10
891 ; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v10, vcc
892 ; CGP-NEXT: v_sub_i32_e32 v12, vcc, 0, v5
893 ; CGP-NEXT: v_mul_f32_e32 v8, 0x5f7ffffc, v8
894 ; CGP-NEXT: v_mul_f32_e32 v11, 0x2f800000, v8
895 ; CGP-NEXT: v_trunc_f32_e32 v11, v11
896 ; CGP-NEXT: v_mac_f32_e32 v8, 0xcf800000, v11
897 ; CGP-NEXT: v_cvt_u32_f32_e32 v8, v8
898 ; CGP-NEXT: v_cvt_u32_f32_e32 v11, v11
899 ; CGP-NEXT: v_subb_u32_e32 v13, vcc, 0, v7, vcc
900 ; CGP-NEXT: v_xor_b32_e32 v9, v9, v10
901 ; CGP-NEXT: v_mul_lo_u32 v14, v13, v8
902 ; CGP-NEXT: v_mul_lo_u32 v15, v12, v11
903 ; CGP-NEXT: v_mul_hi_u32 v17, v12, v8
904 ; CGP-NEXT: v_mul_lo_u32 v16, v12, v8
905 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v10
906 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
907 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
908 ; CGP-NEXT: v_mul_lo_u32 v15, v11, v16
909 ; CGP-NEXT: v_mul_lo_u32 v17, v8, v14
910 ; CGP-NEXT: v_mul_hi_u32 v18, v8, v16
911 ; CGP-NEXT: v_mul_hi_u32 v16, v11, v16
912 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v15, v17
913 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
914 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v15, v18
915 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
916 ; CGP-NEXT: v_mul_lo_u32 v18, v11, v14
917 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v17, v15
918 ; CGP-NEXT: v_mul_hi_u32 v17, v8, v14
919 ; CGP-NEXT: v_mul_hi_u32 v14, v11, v14
920 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v18, v16
921 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
922 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v17
923 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
924 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v18, v17
925 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v16, v15
926 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
927 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v17, v16
928 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
929 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v15
930 ; CGP-NEXT: v_addc_u32_e64 v15, s[4:5], v11, v14, vcc
931 ; CGP-NEXT: v_mul_lo_u32 v13, v13, v8
932 ; CGP-NEXT: v_mul_lo_u32 v16, v12, v15
933 ; CGP-NEXT: v_mul_lo_u32 v17, v12, v8
934 ; CGP-NEXT: v_mul_hi_u32 v12, v12, v8
935 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v14
936 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v16
937 ; CGP-NEXT: v_mul_hi_u32 v14, v8, v17
938 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v13, v12
939 ; CGP-NEXT: v_mul_lo_u32 v13, v15, v17
940 ; CGP-NEXT: v_mul_lo_u32 v16, v8, v12
941 ; CGP-NEXT: v_mul_hi_u32 v17, v15, v17
942 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v16
943 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
944 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v14
945 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
946 ; CGP-NEXT: v_mul_lo_u32 v14, v15, v12
947 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v16, v13
948 ; CGP-NEXT: v_mul_hi_u32 v16, v8, v12
949 ; CGP-NEXT: v_mul_hi_u32 v12, v15, v12
950 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v14, v17
951 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, s[4:5]
952 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v14, v16
953 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
954 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v17, v16
955 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v13
956 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
957 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v16, v14
958 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v14
959 ; CGP-NEXT: v_addc_u32_e32 v11, vcc, v11, v12, vcc
960 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v13
961 ; CGP-NEXT: v_addc_u32_e32 v11, vcc, 0, v11, vcc
962 ; CGP-NEXT: v_mul_lo_u32 v12, v3, v8
963 ; CGP-NEXT: v_mul_lo_u32 v13, v9, v11
964 ; CGP-NEXT: v_mul_hi_u32 v14, v9, v8
965 ; CGP-NEXT: v_mul_hi_u32 v8, v3, v8
966 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
967 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
968 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
969 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
970 ; CGP-NEXT: v_mul_lo_u32 v14, v3, v11
971 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
972 ; CGP-NEXT: v_mul_hi_u32 v13, v9, v11
973 ; CGP-NEXT: v_mul_hi_u32 v11, v3, v11
974 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v14, v8
975 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
976 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v13
977 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
978 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v14, v13
979 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
980 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
981 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
982 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
983 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v8
984 ; CGP-NEXT: v_mul_lo_u32 v13, v5, v11
985 ; CGP-NEXT: v_mul_hi_u32 v15, v5, v8
986 ; CGP-NEXT: v_mul_lo_u32 v14, v5, v8
987 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
988 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
989 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v9, v14
990 ; CGP-NEXT: v_subb_u32_e64 v13, s[4:5], v3, v12, vcc
991 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v12
992 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v13, v7
993 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v7, vcc
994 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, s[4:5]
995 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v9, v5
996 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v9, v5
997 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
998 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, -1, s[4:5]
999 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], v13, v7
1000 ; CGP-NEXT: v_add_i32_e32 v13, vcc, 1, v8
1001 ; CGP-NEXT: v_cndmask_b32_e64 v12, v12, v14, s[4:5]
1002 ; CGP-NEXT: v_addc_u32_e32 v14, vcc, 0, v11, vcc
1003 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v3, v7
1004 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, -1, vcc
1005 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v9, v5
1006 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, -1, vcc
1007 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v7
1008 ; CGP-NEXT: v_cndmask_b32_e32 v3, v15, v5, vcc
1009 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v13
1010 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v14, vcc
1011 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v3
1012 ; CGP-NEXT: v_cndmask_b32_e32 v3, v13, v5, vcc
1013 ; CGP-NEXT: v_cndmask_b32_e32 v5, v14, v7, vcc
1014 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v12
1015 ; CGP-NEXT: v_cndmask_b32_e32 v3, v8, v3, vcc
1016 ; CGP-NEXT: v_xor_b32_e32 v7, v10, v4
1017 ; CGP-NEXT: v_cndmask_b32_e32 v5, v11, v5, vcc
1018 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v7
1019 ; CGP-NEXT: v_xor_b32_e32 v5, v5, v7
1020 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, v3, v7
1021 ; CGP-NEXT: v_subb_u32_e32 v5, vcc, v5, v7, vcc
1022 ; CGP-NEXT: BB2_6: ; %Flow
1023 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
1024 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
1025 ; CGP-NEXT: s_cbranch_execz BB2_8
1026 ; CGP-NEXT: ; %bb.7:
1027 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v6
1028 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v6
1029 ; CGP-NEXT: v_rcp_iflag_f32_e32 v3, v3
1030 ; CGP-NEXT: v_mul_f32_e32 v3, 0x4f7ffffe, v3
1031 ; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
1032 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
1033 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
1034 ; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v4
1035 ; CGP-NEXT: v_mul_hi_u32 v3, v2, v3
1036 ; CGP-NEXT: v_mul_lo_u32 v4, v3, v6
1037 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v3
1038 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v4
1039 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v6
1040 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v2, v6
1041 ; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
1042 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
1043 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v3
1044 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v6
1045 ; CGP-NEXT: v_cndmask_b32_e32 v4, v3, v4, vcc
1046 ; CGP-NEXT: v_mov_b32_e32 v5, 0
1047 ; CGP-NEXT: BB2_8:
1048 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
1049 ; CGP-NEXT: v_mov_b32_e32 v2, v4
1050 ; CGP-NEXT: v_mov_b32_e32 v3, v5
1051 ; CGP-NEXT: s_setpc_b64 s[30:31]
1502 ; CGP-LABEL: v_sdiv_v2i64_pow2k_denom:
1503 ; CGP: ; %bb.0:
1504 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1505 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, 0x1000
1506 ; CGP-NEXT: v_cvt_f32_ubyte0_e32 v6, 0
1507 ; CGP-NEXT: s_movk_i32 s6, 0xf000
1508 ; CGP-NEXT: v_ashrrev_i32_e32 v5, 31, v1
1509 ; CGP-NEXT: v_mov_b32_e32 v7, v4
1510 ; CGP-NEXT: v_mac_f32_e32 v7, 0x4f800000, v6
1511 ; CGP-NEXT: v_rcp_iflag_f32_e32 v7, v7
1512 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v5
1513 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v5, vcc
1514 ; CGP-NEXT: v_xor_b32_e32 v0, v0, v5
1515 ; CGP-NEXT: v_mul_f32_e32 v7, 0x5f7ffffc, v7
1516 ; CGP-NEXT: v_mul_f32_e32 v8, 0x2f800000, v7
1517 ; CGP-NEXT: v_trunc_f32_e32 v8, v8
1518 ; CGP-NEXT: v_mac_f32_e32 v7, 0xcf800000, v8
1519 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
1520 ; CGP-NEXT: v_cvt_u32_f32_e32 v8, v8
1521 ; CGP-NEXT: v_xor_b32_e32 v1, v1, v5
1522 ; CGP-NEXT: s_movk_i32 s7, 0x1000
1523 ; CGP-NEXT: v_mul_lo_u32 v9, -1, v7
1524 ; CGP-NEXT: v_mul_lo_u32 v10, s6, v8
1525 ; CGP-NEXT: v_mul_hi_u32 v12, s6, v7
1526 ; CGP-NEXT: v_mul_lo_u32 v11, s6, v7
1527 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v6
1528 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v10
1529 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
1530 ; CGP-NEXT: v_mul_lo_u32 v10, v8, v11
1531 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v9
1532 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v11
1533 ; CGP-NEXT: v_mul_hi_u32 v11, v8, v11
1534 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
1535 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
1536 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
1537 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
1538 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
1539 ; CGP-NEXT: v_mul_lo_u32 v13, v8, v9
1540 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
1541 ; CGP-NEXT: v_mul_hi_u32 v12, v7, v9
1542 ; CGP-NEXT: v_mul_hi_u32 v9, v8, v9
1543 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v13, v11
1544 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
1545 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
1546 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
1547 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
1548 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
1549 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1550 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
1551 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
1552 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v10
1553 ; CGP-NEXT: v_addc_u32_e64 v10, s[4:5], v8, v9, vcc
1554 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v7
1555 ; CGP-NEXT: v_mul_lo_u32 v12, s6, v10
1556 ; CGP-NEXT: v_mul_hi_u32 v14, s6, v7
1557 ; CGP-NEXT: v_mul_lo_u32 v13, s6, v7
1558 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v8, v9
1559 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
1560 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v14
1561 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v13
1562 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v11
1563 ; CGP-NEXT: v_mul_hi_u32 v9, v7, v13
1564 ; CGP-NEXT: v_mul_hi_u32 v13, v10, v13
1565 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
1566 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v14
1567 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
1568 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v12, v9
1569 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
1570 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v11
1571 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v14, v9
1572 ; CGP-NEXT: v_mul_hi_u32 v14, v7, v11
1573 ; CGP-NEXT: v_mul_hi_u32 v10, v10, v11
1574 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v13
1575 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
1576 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v14
1577 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
1578 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v14
1579 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v12, v9
1580 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
1581 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v13, v12
1582 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v11
1583 ; CGP-NEXT: v_addc_u32_e32 v8, vcc, v8, v10, vcc
1584 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
1585 ; CGP-NEXT: v_addc_u32_e32 v8, vcc, 0, v8, vcc
1586 ; CGP-NEXT: v_mul_lo_u32 v9, v1, v7
1587 ; CGP-NEXT: v_mul_lo_u32 v10, v0, v8
1588 ; CGP-NEXT: v_mul_hi_u32 v11, v0, v7
1589 ; CGP-NEXT: v_mul_hi_u32 v7, v1, v7
1590 ; CGP-NEXT: v_ashrrev_i32_e32 v6, 31, v3
1591 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v10
1592 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
1593 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
1594 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1595 ; CGP-NEXT: v_mul_lo_u32 v11, v1, v8
1596 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v10, v9
1597 ; CGP-NEXT: v_mul_hi_u32 v10, v0, v8
1598 ; CGP-NEXT: v_mul_hi_u32 v8, v1, v8
1599 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v11, v7
1600 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1601 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v10
1602 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
1603 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
1604 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
1605 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1606 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v10, v9
1607 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
1608 ; CGP-NEXT: v_mul_lo_u32 v9, 0, v7
1609 ; CGP-NEXT: v_mul_lo_u32 v10, s7, v8
1610 ; CGP-NEXT: v_mul_hi_u32 v12, s7, v7
1611 ; CGP-NEXT: v_mul_lo_u32 v11, s7, v7
1612 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v10
1613 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
1614 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v11
1615 ; CGP-NEXT: v_subb_u32_e64 v10, s[4:5], v1, v9, vcc
1616 ; CGP-NEXT: v_sub_i32_e64 v1, s[4:5], v1, v9
1617 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], 0, v10
1618 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
1619 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, s[4:5]
1620 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s7, v0
1621 ; CGP-NEXT: v_subrev_i32_e32 v0, vcc, s7, v0
1622 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
1623 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, s[4:5]
1624 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v10
1625 ; CGP-NEXT: v_add_i32_e32 v10, vcc, 1, v7
1626 ; CGP-NEXT: v_cndmask_b32_e64 v9, v9, v11, s[4:5]
1627 ; CGP-NEXT: v_addc_u32_e32 v11, vcc, 0, v8, vcc
1628 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v1
1629 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
1630 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s7, v0
1631 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, -1, vcc
1632 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
1633 ; CGP-NEXT: v_cndmask_b32_e32 v0, v12, v0, vcc
1634 ; CGP-NEXT: v_add_i32_e32 v1, vcc, 1, v10
1635 ; CGP-NEXT: v_addc_u32_e32 v12, vcc, 0, v11, vcc
1636 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v0
1637 ; CGP-NEXT: v_cndmask_b32_e32 v0, v10, v1, vcc
1638 ; CGP-NEXT: v_cndmask_b32_e32 v1, v11, v12, vcc
1639 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v9
1640 ; CGP-NEXT: v_cndmask_b32_e32 v0, v7, v0, vcc
1641 ; CGP-NEXT: v_mul_f32_e32 v7, 0x2f800000, v4
1642 ; CGP-NEXT: v_trunc_f32_e32 v7, v7
1643 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v7
1644 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
1645 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
1646 ; CGP-NEXT: v_cndmask_b32_e32 v1, v8, v1, vcc
1647 ; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v6
1648 ; CGP-NEXT: v_mul_lo_u32 v8, -1, v4
1649 ; CGP-NEXT: v_mul_lo_u32 v9, s6, v7
1650 ; CGP-NEXT: v_mul_hi_u32 v11, s6, v4
1651 ; CGP-NEXT: v_mul_lo_u32 v10, s6, v4
1652 ; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v6, vcc
1653 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
1654 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
1655 ; CGP-NEXT: v_mul_lo_u32 v9, v7, v10
1656 ; CGP-NEXT: v_mul_lo_u32 v11, v4, v8
1657 ; CGP-NEXT: v_mul_hi_u32 v12, v4, v10
1658 ; CGP-NEXT: v_mul_hi_u32 v10, v7, v10
1659 ; CGP-NEXT: v_xor_b32_e32 v0, v0, v5
1660 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
1661 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1662 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
1663 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1664 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v8
1665 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
1666 ; CGP-NEXT: v_mul_hi_u32 v11, v4, v8
1667 ; CGP-NEXT: v_mul_hi_u32 v8, v7, v8
1668 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
1669 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
1670 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
1671 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1672 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
1673 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v10, v9
1674 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
1675 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
1676 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
1677 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v9
1678 ; CGP-NEXT: v_addc_u32_e64 v9, s[4:5], v7, v8, vcc
1679 ; CGP-NEXT: v_mul_lo_u32 v10, -1, v4
1680 ; CGP-NEXT: v_mul_lo_u32 v11, s6, v9
1681 ; CGP-NEXT: v_mul_hi_u32 v13, s6, v4
1682 ; CGP-NEXT: v_mul_lo_u32 v12, s6, v4
1683 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v7, v8
1684 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v11
1685 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v13
1686 ; CGP-NEXT: v_mul_lo_u32 v11, v9, v12
1687 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v10
1688 ; CGP-NEXT: v_mul_hi_u32 v8, v4, v12
1689 ; CGP-NEXT: v_mul_hi_u32 v12, v9, v12
1690 ; CGP-NEXT: v_xor_b32_e32 v2, v2, v6
1691 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v13
1692 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
1693 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v11, v8
1694 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, s[4:5]
1695 ; CGP-NEXT: v_mul_lo_u32 v11, v9, v10
1696 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v13, v8
1697 ; CGP-NEXT: v_mul_hi_u32 v13, v4, v10
1698 ; CGP-NEXT: v_mul_hi_u32 v9, v9, v10
1699 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
1700 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
1701 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v13
1702 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
1703 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v13
1704 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v11, v8
1705 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
1706 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v12, v11
1707 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v9, v10
1708 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, v7, v9, vcc
1709 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
1710 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v7, vcc
1711 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v6
1712 ; CGP-NEXT: v_xor_b32_e32 v1, v1, v5
1713 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v5
1714 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
1715 ; CGP-NEXT: v_mul_lo_u32 v9, v2, v7
1716 ; CGP-NEXT: v_subb_u32_e32 v1, vcc, v1, v5, vcc
1717 ; CGP-NEXT: v_mul_hi_u32 v5, v2, v4
1718 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
1719 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
1720 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1721 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v8, v5
1722 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, 1, vcc
1723 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v7
1724 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v9, v5
1725 ; CGP-NEXT: v_mul_hi_u32 v9, v2, v7
1726 ; CGP-NEXT: v_mul_hi_u32 v7, v3, v7
1727 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v8, v4
1728 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
1729 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v9
1730 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1731 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
1732 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v5
1733 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, 1, vcc
1734 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v8, v5
1735 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v7, v5
1736 ; CGP-NEXT: v_mul_lo_u32 v7, 0, v4
1737 ; CGP-NEXT: v_mul_lo_u32 v8, s7, v5
1738 ; CGP-NEXT: v_mul_hi_u32 v10, s7, v4
1739 ; CGP-NEXT: v_mul_lo_u32 v9, s7, v4
1740 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v8
1741 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v10
1742 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v9
1743 ; CGP-NEXT: v_subb_u32_e64 v8, s[4:5], v3, v7, vcc
1744 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v7
1745 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], 0, v8
1746 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
1747 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, -1, s[4:5]
1748 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s7, v2
1749 ; CGP-NEXT: v_subrev_i32_e32 v2, vcc, s7, v2
1750 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
1751 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, s[4:5]
1752 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v8
1753 ; CGP-NEXT: v_add_i32_e32 v8, vcc, 1, v4
1754 ; CGP-NEXT: v_cndmask_b32_e64 v7, v7, v9, s[4:5]
1755 ; CGP-NEXT: v_addc_u32_e32 v9, vcc, 0, v5, vcc
1756 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v3
1757 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, vcc
1758 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s7, v2
1759 ; CGP-NEXT: v_cndmask_b32_e64 v2, 0, -1, vcc
1760 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
1761 ; CGP-NEXT: v_cndmask_b32_e32 v2, v10, v2, vcc
1762 ; CGP-NEXT: v_add_i32_e32 v3, vcc, 1, v8
1763 ; CGP-NEXT: v_addc_u32_e32 v10, vcc, 0, v9, vcc
1764 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v2
1765 ; CGP-NEXT: v_cndmask_b32_e32 v2, v8, v3, vcc
1766 ; CGP-NEXT: v_cndmask_b32_e32 v3, v9, v10, vcc
1767 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v7
1768 ; CGP-NEXT: v_cndmask_b32_e32 v2, v4, v2, vcc
1769 ; CGP-NEXT: v_cndmask_b32_e32 v3, v5, v3, vcc
1770 ; CGP-NEXT: v_xor_b32_e32 v2, v2, v6
1771 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v6
1772 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v6
1773 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v6, vcc
1774 ; CGP-NEXT: s_setpc_b64 s[30:31]
2225 ; CGP-LABEL: v_sdiv_v2i64_oddk_denom:
2226 ; CGP: ; %bb.0:
2227 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2228 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, 0x12d8fb
2229 ; CGP-NEXT: v_cvt_f32_ubyte0_e32 v6, 0
2230 ; CGP-NEXT: s_mov_b32 s6, 0xffed2705
2231 ; CGP-NEXT: v_ashrrev_i32_e32 v5, 31, v1
2232 ; CGP-NEXT: v_mov_b32_e32 v7, v4
2233 ; CGP-NEXT: v_mac_f32_e32 v7, 0x4f800000, v6
2234 ; CGP-NEXT: v_rcp_iflag_f32_e32 v7, v7
2235 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v5
2236 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v5, vcc
2237 ; CGP-NEXT: v_xor_b32_e32 v0, v0, v5
2238 ; CGP-NEXT: v_mul_f32_e32 v7, 0x5f7ffffc, v7
2239 ; CGP-NEXT: v_mul_f32_e32 v8, 0x2f800000, v7
2240 ; CGP-NEXT: v_trunc_f32_e32 v8, v8
2241 ; CGP-NEXT: v_mac_f32_e32 v7, 0xcf800000, v8
2242 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
2243 ; CGP-NEXT: v_cvt_u32_f32_e32 v8, v8
2244 ; CGP-NEXT: v_xor_b32_e32 v1, v1, v5
2245 ; CGP-NEXT: s_mov_b32 s7, 0x12d8fb
2246 ; CGP-NEXT: v_mul_lo_u32 v9, -1, v7
2247 ; CGP-NEXT: v_mul_lo_u32 v10, s6, v8
2248 ; CGP-NEXT: v_mul_hi_u32 v12, s6, v7
2249 ; CGP-NEXT: v_mul_lo_u32 v11, s6, v7
2250 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v6
2251 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v10
2252 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
2253 ; CGP-NEXT: v_mul_lo_u32 v10, v8, v11
2254 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v9
2255 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v11
2256 ; CGP-NEXT: v_mul_hi_u32 v11, v8, v11
2257 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
2258 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
2259 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2260 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
2261 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2262 ; CGP-NEXT: v_mul_lo_u32 v13, v8, v9
2263 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
2264 ; CGP-NEXT: v_mul_hi_u32 v12, v7, v9
2265 ; CGP-NEXT: v_mul_hi_u32 v9, v8, v9
2266 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v13, v11
2267 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2268 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
2269 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2270 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
2271 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
2272 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2273 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
2274 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
2275 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v10
2276 ; CGP-NEXT: v_addc_u32_e64 v10, s[4:5], v8, v9, vcc
2277 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v7
2278 ; CGP-NEXT: v_mul_lo_u32 v12, s6, v10
2279 ; CGP-NEXT: v_mul_hi_u32 v14, s6, v7
2280 ; CGP-NEXT: v_mul_lo_u32 v13, s6, v7
2281 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v8, v9
2282 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
2283 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v14
2284 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v13
2285 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v11
2286 ; CGP-NEXT: v_mul_hi_u32 v9, v7, v13
2287 ; CGP-NEXT: v_mul_hi_u32 v13, v10, v13
2288 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
2289 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v14
2290 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
2291 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v12, v9
2292 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
2293 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v11
2294 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v14, v9
2295 ; CGP-NEXT: v_mul_hi_u32 v14, v7, v11
2296 ; CGP-NEXT: v_mul_hi_u32 v10, v10, v11
2297 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v13
2298 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2299 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v14
2300 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
2301 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v14
2302 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v12, v9
2303 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2304 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v13, v12
2305 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v11
2306 ; CGP-NEXT: v_addc_u32_e32 v8, vcc, v8, v10, vcc
2307 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
2308 ; CGP-NEXT: v_addc_u32_e32 v8, vcc, 0, v8, vcc
2309 ; CGP-NEXT: v_mul_lo_u32 v9, v1, v7
2310 ; CGP-NEXT: v_mul_lo_u32 v10, v0, v8
2311 ; CGP-NEXT: v_mul_hi_u32 v11, v0, v7
2312 ; CGP-NEXT: v_mul_hi_u32 v7, v1, v7
2313 ; CGP-NEXT: v_ashrrev_i32_e32 v6, 31, v3
2314 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v10
2315 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2316 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
2317 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2318 ; CGP-NEXT: v_mul_lo_u32 v11, v1, v8
2319 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v10, v9
2320 ; CGP-NEXT: v_mul_hi_u32 v10, v0, v8
2321 ; CGP-NEXT: v_mul_hi_u32 v8, v1, v8
2322 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v11, v7
2323 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2324 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v10
2325 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2326 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
2327 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
2328 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2329 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v10, v9
2330 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
2331 ; CGP-NEXT: v_mul_lo_u32 v9, 0, v7
2332 ; CGP-NEXT: v_mul_lo_u32 v10, s7, v8
2333 ; CGP-NEXT: v_mul_hi_u32 v12, s7, v7
2334 ; CGP-NEXT: v_mul_lo_u32 v11, s7, v7
2335 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v10
2336 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
2337 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v11
2338 ; CGP-NEXT: v_subb_u32_e64 v10, s[4:5], v1, v9, vcc
2339 ; CGP-NEXT: v_sub_i32_e64 v1, s[4:5], v1, v9
2340 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], 0, v10
2341 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
2342 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, s[4:5]
2343 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s7, v0
2344 ; CGP-NEXT: v_subrev_i32_e32 v0, vcc, s7, v0
2345 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
2346 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, s[4:5]
2347 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v10
2348 ; CGP-NEXT: v_add_i32_e32 v10, vcc, 1, v7
2349 ; CGP-NEXT: v_cndmask_b32_e64 v9, v9, v11, s[4:5]
2350 ; CGP-NEXT: v_addc_u32_e32 v11, vcc, 0, v8, vcc
2351 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v1
2352 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
2353 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s7, v0
2354 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, -1, vcc
2355 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
2356 ; CGP-NEXT: v_cndmask_b32_e32 v0, v12, v0, vcc
2357 ; CGP-NEXT: v_add_i32_e32 v1, vcc, 1, v10
2358 ; CGP-NEXT: v_addc_u32_e32 v12, vcc, 0, v11, vcc
2359 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v0
2360 ; CGP-NEXT: v_cndmask_b32_e32 v0, v10, v1, vcc
2361 ; CGP-NEXT: v_cndmask_b32_e32 v1, v11, v12, vcc
2362 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v9
2363 ; CGP-NEXT: v_cndmask_b32_e32 v0, v7, v0, vcc
2364 ; CGP-NEXT: v_mul_f32_e32 v7, 0x2f800000, v4
2365 ; CGP-NEXT: v_trunc_f32_e32 v7, v7
2366 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v7
2367 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
2368 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
2369 ; CGP-NEXT: v_cndmask_b32_e32 v1, v8, v1, vcc
2370 ; CGP-NEXT: v_add_i32_e32 v2, vcc, v2, v6
2371 ; CGP-NEXT: v_mul_lo_u32 v8, -1, v4
2372 ; CGP-NEXT: v_mul_lo_u32 v9, s6, v7
2373 ; CGP-NEXT: v_mul_hi_u32 v11, s6, v4
2374 ; CGP-NEXT: v_mul_lo_u32 v10, s6, v4
2375 ; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v6, vcc
2376 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
2377 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
2378 ; CGP-NEXT: v_mul_lo_u32 v9, v7, v10
2379 ; CGP-NEXT: v_mul_lo_u32 v11, v4, v8
2380 ; CGP-NEXT: v_mul_hi_u32 v12, v4, v10
2381 ; CGP-NEXT: v_mul_hi_u32 v10, v7, v10
2382 ; CGP-NEXT: v_xor_b32_e32 v0, v0, v5
2383 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
2384 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2385 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
2386 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2387 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v8
2388 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
2389 ; CGP-NEXT: v_mul_hi_u32 v11, v4, v8
2390 ; CGP-NEXT: v_mul_hi_u32 v8, v7, v8
2391 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
2392 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2393 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
2394 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2395 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
2396 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v10, v9
2397 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2398 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
2399 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
2400 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v9
2401 ; CGP-NEXT: v_addc_u32_e64 v9, s[4:5], v7, v8, vcc
2402 ; CGP-NEXT: v_mul_lo_u32 v10, -1, v4
2403 ; CGP-NEXT: v_mul_lo_u32 v11, s6, v9
2404 ; CGP-NEXT: v_mul_hi_u32 v13, s6, v4
2405 ; CGP-NEXT: v_mul_lo_u32 v12, s6, v4
2406 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v7, v8
2407 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v11
2408 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v13
2409 ; CGP-NEXT: v_mul_lo_u32 v11, v9, v12
2410 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v10
2411 ; CGP-NEXT: v_mul_hi_u32 v8, v4, v12
2412 ; CGP-NEXT: v_mul_hi_u32 v12, v9, v12
2413 ; CGP-NEXT: v_xor_b32_e32 v2, v2, v6
2414 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v13
2415 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2416 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v11, v8
2417 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, s[4:5]
2418 ; CGP-NEXT: v_mul_lo_u32 v11, v9, v10
2419 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v13, v8
2420 ; CGP-NEXT: v_mul_hi_u32 v13, v4, v10
2421 ; CGP-NEXT: v_mul_hi_u32 v9, v9, v10
2422 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
2423 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2424 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v13
2425 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2426 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v13
2427 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v11, v8
2428 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
2429 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v12, v11
2430 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v9, v10
2431 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, v7, v9, vcc
2432 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
2433 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v7, vcc
2434 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v6
2435 ; CGP-NEXT: v_xor_b32_e32 v1, v1, v5
2436 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v5
2437 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
2438 ; CGP-NEXT: v_mul_lo_u32 v9, v2, v7
2439 ; CGP-NEXT: v_subb_u32_e32 v1, vcc, v1, v5, vcc
2440 ; CGP-NEXT: v_mul_hi_u32 v5, v2, v4
2441 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
2442 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
2443 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2444 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v8, v5
2445 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, 1, vcc
2446 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v7
2447 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v9, v5
2448 ; CGP-NEXT: v_mul_hi_u32 v9, v2, v7
2449 ; CGP-NEXT: v_mul_hi_u32 v7, v3, v7
2450 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v8, v4
2451 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
2452 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v9
2453 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2454 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
2455 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v5
2456 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, 1, vcc
2457 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v8, v5
2458 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v7, v5
2459 ; CGP-NEXT: v_mul_lo_u32 v7, 0, v4
2460 ; CGP-NEXT: v_mul_lo_u32 v8, s7, v5
2461 ; CGP-NEXT: v_mul_hi_u32 v10, s7, v4
2462 ; CGP-NEXT: v_mul_lo_u32 v9, s7, v4
2463 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v8
2464 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v10
2465 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v9
2466 ; CGP-NEXT: v_subb_u32_e64 v8, s[4:5], v3, v7, vcc
2467 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v7
2468 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], 0, v8
2469 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2470 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, -1, s[4:5]
2471 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s7, v2
2472 ; CGP-NEXT: v_subrev_i32_e32 v2, vcc, s7, v2
2473 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2474 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, s[4:5]
2475 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], 0, v8
2476 ; CGP-NEXT: v_add_i32_e32 v8, vcc, 1, v4
2477 ; CGP-NEXT: v_cndmask_b32_e64 v7, v7, v9, s[4:5]
2478 ; CGP-NEXT: v_addc_u32_e32 v9, vcc, 0, v5, vcc
2479 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v3
2480 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, vcc
2481 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s7, v2
2482 ; CGP-NEXT: v_cndmask_b32_e64 v2, 0, -1, vcc
2483 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
2484 ; CGP-NEXT: v_cndmask_b32_e32 v2, v10, v2, vcc
2485 ; CGP-NEXT: v_add_i32_e32 v3, vcc, 1, v8
2486 ; CGP-NEXT: v_addc_u32_e32 v10, vcc, 0, v9, vcc
2487 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v2
2488 ; CGP-NEXT: v_cndmask_b32_e32 v2, v8, v3, vcc
2489 ; CGP-NEXT: v_cndmask_b32_e32 v3, v9, v10, vcc
2490 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v7
2491 ; CGP-NEXT: v_cndmask_b32_e32 v2, v4, v2, vcc
2492 ; CGP-NEXT: v_cndmask_b32_e32 v3, v5, v3, vcc
2493 ; CGP-NEXT: v_xor_b32_e32 v2, v2, v6
2494 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v6
2495 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v6
2496 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v6, vcc
2497 ; CGP-NEXT: s_setpc_b64 s[30:31]
2988 ; CGP-LABEL: v_sdiv_v2i64_pow2_shl_denom:
2989 ; CGP: ; %bb.0:
2990 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2991 ; CGP-NEXT: s_movk_i32 s4, 0x1000
2992 ; CGP-NEXT: s_mov_b32 s5, 0
2993 ; CGP-NEXT: v_lshl_b64 v[10:11], s[4:5], v4
2994 ; CGP-NEXT: v_mov_b32_e32 v7, v1
2995 ; CGP-NEXT: v_mov_b32_e32 v5, v0
2996 ; CGP-NEXT: v_or_b32_e32 v1, v7, v11
2997 ; CGP-NEXT: v_mov_b32_e32 v0, 0
2998 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
2999 ; CGP-NEXT: v_lshl_b64 v[8:9], s[4:5], v6
3000 ; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
3001 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
3002 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
3003 ; CGP-NEXT: s_cbranch_execz BB8_2
3004 ; CGP-NEXT: ; %bb.1:
3005 ; CGP-NEXT: v_ashrrev_i32_e32 v0, 31, v11
3006 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v10, v0
3007 ; CGP-NEXT: v_addc_u32_e32 v4, vcc, v11, v0, vcc
3008 ; CGP-NEXT: v_xor_b32_e32 v1, v1, v0
3009 ; CGP-NEXT: v_xor_b32_e32 v4, v4, v0
3010 ; CGP-NEXT: v_cvt_f32_u32_e32 v6, v1
3011 ; CGP-NEXT: v_cvt_f32_u32_e32 v11, v4
3012 ; CGP-NEXT: v_ashrrev_i32_e32 v12, 31, v7
3013 ; CGP-NEXT: v_mac_f32_e32 v6, 0x4f800000, v11
3014 ; CGP-NEXT: v_rcp_iflag_f32_e32 v6, v6
3015 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v5, v12
3016 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, v7, v12, vcc
3017 ; CGP-NEXT: v_sub_i32_e32 v14, vcc, 0, v1
3018 ; CGP-NEXT: v_mul_f32_e32 v6, 0x5f7ffffc, v6
3019 ; CGP-NEXT: v_mul_f32_e32 v13, 0x2f800000, v6
3020 ; CGP-NEXT: v_trunc_f32_e32 v13, v13
3021 ; CGP-NEXT: v_mac_f32_e32 v6, 0xcf800000, v13
3022 ; CGP-NEXT: v_cvt_u32_f32_e32 v6, v6
3023 ; CGP-NEXT: v_cvt_u32_f32_e32 v13, v13
3024 ; CGP-NEXT: v_subb_u32_e32 v15, vcc, 0, v4, vcc
3025 ; CGP-NEXT: v_xor_b32_e32 v11, v11, v12
3026 ; CGP-NEXT: v_mul_lo_u32 v16, v15, v6
3027 ; CGP-NEXT: v_mul_lo_u32 v17, v14, v13
3028 ; CGP-NEXT: v_mul_hi_u32 v19, v14, v6
3029 ; CGP-NEXT: v_mul_lo_u32 v18, v14, v6
3030 ; CGP-NEXT: v_xor_b32_e32 v7, v7, v12
3031 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v17
3032 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v19
3033 ; CGP-NEXT: v_mul_lo_u32 v17, v13, v18
3034 ; CGP-NEXT: v_mul_lo_u32 v19, v6, v16
3035 ; CGP-NEXT: v_mul_hi_u32 v20, v6, v18
3036 ; CGP-NEXT: v_mul_hi_u32 v18, v13, v18
3037 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v17, v19
3038 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
3039 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v17, v20
3040 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
3041 ; CGP-NEXT: v_mul_lo_u32 v20, v13, v16
3042 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v19, v17
3043 ; CGP-NEXT: v_mul_hi_u32 v19, v6, v16
3044 ; CGP-NEXT: v_mul_hi_u32 v16, v13, v16
3045 ; CGP-NEXT: v_add_i32_e32 v18, vcc, v20, v18
3046 ; CGP-NEXT: v_cndmask_b32_e64 v20, 0, 1, vcc
3047 ; CGP-NEXT: v_add_i32_e32 v18, vcc, v18, v19
3048 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
3049 ; CGP-NEXT: v_add_i32_e32 v19, vcc, v20, v19
3050 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v18, v17
3051 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
3052 ; CGP-NEXT: v_add_i32_e32 v18, vcc, v19, v18
3053 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v18
3054 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v17
3055 ; CGP-NEXT: v_addc_u32_e64 v17, s[4:5], v13, v16, vcc
3056 ; CGP-NEXT: v_mul_lo_u32 v15, v15, v6
3057 ; CGP-NEXT: v_mul_lo_u32 v18, v14, v17
3058 ; CGP-NEXT: v_mul_lo_u32 v19, v14, v6
3059 ; CGP-NEXT: v_mul_hi_u32 v14, v14, v6
3060 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v16
3061 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v15, v18
3062 ; CGP-NEXT: v_mul_hi_u32 v16, v6, v19
3063 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v15, v14
3064 ; CGP-NEXT: v_mul_lo_u32 v15, v17, v19
3065 ; CGP-NEXT: v_mul_lo_u32 v18, v6, v14
3066 ; CGP-NEXT: v_mul_hi_u32 v19, v17, v19
3067 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v15, v18
3068 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[4:5]
3069 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v15, v16
3070 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
3071 ; CGP-NEXT: v_mul_lo_u32 v16, v17, v14
3072 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v18, v15
3073 ; CGP-NEXT: v_mul_hi_u32 v18, v6, v14
3074 ; CGP-NEXT: v_mul_hi_u32 v14, v17, v14
3075 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v16, v19
3076 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, s[4:5]
3077 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v16, v18
3078 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[4:5]
3079 ; CGP-NEXT: v_add_i32_e64 v18, s[4:5], v19, v18
3080 ; CGP-NEXT: v_add_i32_e64 v15, s[4:5], v16, v15
3081 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
3082 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v18, v16
3083 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v14, v16
3084 ; CGP-NEXT: v_addc_u32_e32 v13, vcc, v13, v14, vcc
3085 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v15
3086 ; CGP-NEXT: v_addc_u32_e32 v13, vcc, 0, v13, vcc
3087 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v6
3088 ; CGP-NEXT: v_mul_lo_u32 v15, v11, v13
3089 ; CGP-NEXT: v_mul_hi_u32 v16, v11, v6
3090 ; CGP-NEXT: v_mul_hi_u32 v6, v7, v6
3091 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
3092 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
3093 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
3094 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
3095 ; CGP-NEXT: v_mul_lo_u32 v16, v7, v13
3096 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
3097 ; CGP-NEXT: v_mul_hi_u32 v15, v11, v13
3098 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v13
3099 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v16, v6
3100 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
3101 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v15
3102 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
3103 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v16, v15
3104 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v14
3105 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
3106 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
3107 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
3108 ; CGP-NEXT: v_mul_lo_u32 v14, v4, v6
3109 ; CGP-NEXT: v_mul_lo_u32 v15, v1, v13
3110 ; CGP-NEXT: v_mul_hi_u32 v17, v1, v6
3111 ; CGP-NEXT: v_mul_lo_u32 v16, v1, v6
3112 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
3113 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
3114 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v11, v16
3115 ; CGP-NEXT: v_subb_u32_e64 v15, s[4:5], v7, v14, vcc
3116 ; CGP-NEXT: v_sub_i32_e64 v7, s[4:5], v7, v14
3117 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v15, v4
3118 ; CGP-NEXT: v_subb_u32_e32 v7, vcc, v7, v4, vcc
3119 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, -1, s[4:5]
3120 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v11, v1
3121 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v11, v1
3122 ; CGP-NEXT: v_subbrev_u32_e32 v7, vcc, 0, v7, vcc
3123 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, -1, s[4:5]
3124 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], v15, v4
3125 ; CGP-NEXT: v_add_i32_e32 v15, vcc, 1, v6
3126 ; CGP-NEXT: v_cndmask_b32_e64 v14, v14, v16, s[4:5]
3127 ; CGP-NEXT: v_addc_u32_e32 v16, vcc, 0, v13, vcc
3128 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v7, v4
3129 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, -1, vcc
3130 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v11, v1
3131 ; CGP-NEXT: v_cndmask_b32_e64 v1, 0, -1, vcc
3132 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v7, v4
3133 ; CGP-NEXT: v_cndmask_b32_e32 v1, v17, v1, vcc
3134 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v15
3135 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v16, vcc
3136 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v1
3137 ; CGP-NEXT: v_cndmask_b32_e32 v1, v15, v4, vcc
3138 ; CGP-NEXT: v_cndmask_b32_e32 v4, v16, v7, vcc
3139 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v14
3140 ; CGP-NEXT: v_cndmask_b32_e32 v1, v6, v1, vcc
3141 ; CGP-NEXT: v_xor_b32_e32 v6, v12, v0
3142 ; CGP-NEXT: v_cndmask_b32_e32 v4, v13, v4, vcc
3143 ; CGP-NEXT: v_xor_b32_e32 v0, v1, v6
3144 ; CGP-NEXT: v_xor_b32_e32 v1, v4, v6
3145 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v6
3146 ; CGP-NEXT: v_subb_u32_e32 v1, vcc, v1, v6, vcc
3147 ; CGP-NEXT: BB8_2: ; %Flow2
3148 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
3149 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
3150 ; CGP-NEXT: s_cbranch_execz BB8_4
3151 ; CGP-NEXT: ; %bb.3:
3152 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v10
3153 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v10
3154 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
3155 ; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
3156 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
3157 ; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
3158 ; CGP-NEXT: v_mul_hi_u32 v1, v0, v1
3159 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v1
3160 ; CGP-NEXT: v_mul_hi_u32 v0, v5, v0
3161 ; CGP-NEXT: v_mul_lo_u32 v1, v0, v10
3162 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v0
3163 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v5, v1
3164 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v10
3165 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
3166 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v1, v10
3167 ; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v4, vcc
3168 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v0
3169 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v10
3170 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
3171 ; CGP-NEXT: v_mov_b32_e32 v1, 0
3172 ; CGP-NEXT: BB8_4:
3173 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
3174 ; CGP-NEXT: v_or_b32_e32 v5, v3, v9
3175 ; CGP-NEXT: v_mov_b32_e32 v4, 0
3176 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[4:5]
3177 ; CGP-NEXT: ; implicit-def: $vgpr4_vgpr5
3178 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
3179 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
3180 ; CGP-NEXT: s_cbranch_execz BB8_6
3181 ; CGP-NEXT: ; %bb.5:
3182 ; CGP-NEXT: v_ashrrev_i32_e32 v4, 31, v9
3183 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v8, v4
3184 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, v9, v4, vcc
3185 ; CGP-NEXT: v_xor_b32_e32 v5, v5, v4
3186 ; CGP-NEXT: v_xor_b32_e32 v6, v6, v4
3187 ; CGP-NEXT: v_cvt_f32_u32_e32 v7, v5
3188 ; CGP-NEXT: v_cvt_f32_u32_e32 v9, v6
3189 ; CGP-NEXT: v_ashrrev_i32_e32 v10, 31, v3
3190 ; CGP-NEXT: v_mac_f32_e32 v7, 0x4f800000, v9
3191 ; CGP-NEXT: v_rcp_iflag_f32_e32 v7, v7
3192 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v2, v10
3193 ; CGP-NEXT: v_addc_u32_e32 v3, vcc, v3, v10, vcc
3194 ; CGP-NEXT: v_sub_i32_e32 v12, vcc, 0, v5
3195 ; CGP-NEXT: v_mul_f32_e32 v7, 0x5f7ffffc, v7
3196 ; CGP-NEXT: v_mul_f32_e32 v11, 0x2f800000, v7
3197 ; CGP-NEXT: v_trunc_f32_e32 v11, v11
3198 ; CGP-NEXT: v_mac_f32_e32 v7, 0xcf800000, v11
3199 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
3200 ; CGP-NEXT: v_cvt_u32_f32_e32 v11, v11
3201 ; CGP-NEXT: v_subb_u32_e32 v13, vcc, 0, v6, vcc
3202 ; CGP-NEXT: v_xor_b32_e32 v9, v9, v10
3203 ; CGP-NEXT: v_mul_lo_u32 v14, v13, v7
3204 ; CGP-NEXT: v_mul_lo_u32 v15, v12, v11
3205 ; CGP-NEXT: v_mul_hi_u32 v17, v12, v7
3206 ; CGP-NEXT: v_mul_lo_u32 v16, v12, v7
3207 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v10
3208 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
3209 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
3210 ; CGP-NEXT: v_mul_lo_u32 v15, v11, v16
3211 ; CGP-NEXT: v_mul_lo_u32 v17, v7, v14
3212 ; CGP-NEXT: v_mul_hi_u32 v18, v7, v16
3213 ; CGP-NEXT: v_mul_hi_u32 v16, v11, v16
3214 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v15, v17
3215 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
3216 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v15, v18
3217 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
3218 ; CGP-NEXT: v_mul_lo_u32 v18, v11, v14
3219 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v17, v15
3220 ; CGP-NEXT: v_mul_hi_u32 v17, v7, v14
3221 ; CGP-NEXT: v_mul_hi_u32 v14, v11, v14
3222 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v18, v16
3223 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
3224 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v16, v17
3225 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
3226 ; CGP-NEXT: v_add_i32_e32 v17, vcc, v18, v17
3227 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v16, v15
3228 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
3229 ; CGP-NEXT: v_add_i32_e32 v16, vcc, v17, v16
3230 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
3231 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v15
3232 ; CGP-NEXT: v_addc_u32_e64 v15, s[4:5], v11, v14, vcc
3233 ; CGP-NEXT: v_mul_lo_u32 v13, v13, v7
3234 ; CGP-NEXT: v_mul_lo_u32 v16, v12, v15
3235 ; CGP-NEXT: v_mul_lo_u32 v17, v12, v7
3236 ; CGP-NEXT: v_mul_hi_u32 v12, v12, v7
3237 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v14
3238 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v16
3239 ; CGP-NEXT: v_mul_hi_u32 v14, v7, v17
3240 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v13, v12
3241 ; CGP-NEXT: v_mul_lo_u32 v13, v15, v17
3242 ; CGP-NEXT: v_mul_lo_u32 v16, v7, v12
3243 ; CGP-NEXT: v_mul_hi_u32 v17, v15, v17
3244 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v16
3245 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
3246 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v13, v14
3247 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
3248 ; CGP-NEXT: v_mul_lo_u32 v14, v15, v12
3249 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v16, v13
3250 ; CGP-NEXT: v_mul_hi_u32 v16, v7, v12
3251 ; CGP-NEXT: v_mul_hi_u32 v12, v15, v12
3252 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v14, v17
3253 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, s[4:5]
3254 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v14, v16
3255 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
3256 ; CGP-NEXT: v_add_i32_e64 v16, s[4:5], v17, v16
3257 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v13
3258 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
3259 ; CGP-NEXT: v_add_i32_e64 v14, s[4:5], v16, v14
3260 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v14
3261 ; CGP-NEXT: v_addc_u32_e32 v11, vcc, v11, v12, vcc
3262 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v13
3263 ; CGP-NEXT: v_addc_u32_e32 v11, vcc, 0, v11, vcc
3264 ; CGP-NEXT: v_mul_lo_u32 v12, v3, v7
3265 ; CGP-NEXT: v_mul_lo_u32 v13, v9, v11
3266 ; CGP-NEXT: v_mul_hi_u32 v14, v9, v7
3267 ; CGP-NEXT: v_mul_hi_u32 v7, v3, v7
3268 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
3269 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
3270 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
3271 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
3272 ; CGP-NEXT: v_mul_lo_u32 v14, v3, v11
3273 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
3274 ; CGP-NEXT: v_mul_hi_u32 v13, v9, v11
3275 ; CGP-NEXT: v_mul_hi_u32 v11, v3, v11
3276 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v14, v7
3277 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
3278 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v13
3279 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
3280 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v14, v13
3281 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v12
3282 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
3283 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
3284 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
3285 ; CGP-NEXT: v_mul_lo_u32 v12, v6, v7
3286 ; CGP-NEXT: v_mul_lo_u32 v13, v5, v11
3287 ; CGP-NEXT: v_mul_hi_u32 v15, v5, v7
3288 ; CGP-NEXT: v_mul_lo_u32 v14, v5, v7
3289 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
3290 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
3291 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v9, v14
3292 ; CGP-NEXT: v_subb_u32_e64 v13, s[4:5], v3, v12, vcc
3293 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v12
3294 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v13, v6
3295 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v6, vcc
3296 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, s[4:5]
3297 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v9, v5
3298 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v9, v5
3299 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
3300 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, -1, s[4:5]
3301 ; CGP-NEXT: v_cmp_eq_u32_e64 s[4:5], v13, v6
3302 ; CGP-NEXT: v_add_i32_e32 v13, vcc, 1, v7
3303 ; CGP-NEXT: v_cndmask_b32_e64 v12, v12, v14, s[4:5]
3304 ; CGP-NEXT: v_addc_u32_e32 v14, vcc, 0, v11, vcc
3305 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v3, v6
3306 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, -1, vcc
3307 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v9, v5
3308 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, -1, vcc
3309 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v6
3310 ; CGP-NEXT: v_cndmask_b32_e32 v3, v15, v5, vcc
3311 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v13
3312 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, 0, v14, vcc
3313 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v3
3314 ; CGP-NEXT: v_cndmask_b32_e32 v3, v13, v5, vcc
3315 ; CGP-NEXT: v_cndmask_b32_e32 v5, v14, v6, vcc
3316 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v12
3317 ; CGP-NEXT: v_cndmask_b32_e32 v3, v7, v3, vcc
3318 ; CGP-NEXT: v_xor_b32_e32 v6, v10, v4
3319 ; CGP-NEXT: v_cndmask_b32_e32 v5, v11, v5, vcc
3320 ; CGP-NEXT: v_xor_b32_e32 v3, v3, v6
3321 ; CGP-NEXT: v_xor_b32_e32 v5, v5, v6
3322 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, v3, v6
3323 ; CGP-NEXT: v_subb_u32_e32 v5, vcc, v5, v6, vcc
3324 ; CGP-NEXT: BB8_6: ; %Flow
3325 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
3326 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
3327 ; CGP-NEXT: s_cbranch_execz BB8_8
3328 ; CGP-NEXT: ; %bb.7:
3329 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v8
3330 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v8
3331 ; CGP-NEXT: v_rcp_iflag_f32_e32 v3, v3
3332 ; CGP-NEXT: v_mul_f32_e32 v3, 0x4f7ffffe, v3
3333 ; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
3334 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
3335 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
3336 ; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v4
3337 ; CGP-NEXT: v_mul_hi_u32 v3, v2, v3
3338 ; CGP-NEXT: v_mul_lo_u32 v4, v3, v8
3339 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v3
3340 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v4
3341 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v8
3342 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v2, v8
3343 ; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
3344 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
3345 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v3
3346 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v8
3347 ; CGP-NEXT: v_cndmask_b32_e32 v4, v3, v4, vcc
3348 ; CGP-NEXT: v_mov_b32_e32 v5, 0
3349 ; CGP-NEXT: BB8_8:
3350 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
3351 ; CGP-NEXT: v_mov_b32_e32 v2, v4
3352 ; CGP-NEXT: v_mov_b32_e32 v3, v5
3353 ; CGP-NEXT: s_setpc_b64 s[30:31]
3388 ; CGP-LABEL: v_sdiv_i64_24bit:
3389 ; CGP: ; %bb.0:
3390 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3391 ; CGP-NEXT: s_mov_b32 s4, 0xffffff
3392 ; CGP-NEXT: v_and_b32_e32 v1, s4, v2
3393 ; CGP-NEXT: v_cvt_f32_i32_e32 v1, v1
3394 ; CGP-NEXT: v_and_b32_e32 v0, s4, v0
3395 ; CGP-NEXT: v_cvt_f32_i32_e32 v0, v0
3396 ; CGP-NEXT: v_rcp_f32_e32 v2, v1
3397 ; CGP-NEXT: v_mul_f32_e32 v2, v0, v2
3398 ; CGP-NEXT: v_trunc_f32_e32 v2, v2
3399 ; CGP-NEXT: v_mad_f32 v0, -v2, v1, v0
3400 ; CGP-NEXT: v_cvt_i32_f32_e32 v2, v2
3401 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v0|, |v1|
3402 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
3403 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v2, v0
3404 ; CGP-NEXT: v_bfe_i32 v0, v0, 0, 25
3405 ; CGP-NEXT: v_ashrrev_i32_e32 v1, 31, v0
3406 ; CGP-NEXT: s_setpc_b64 s[30:31]
3690 ; CGP-LABEL: v_sdiv_v2i64_24bit:
3691 ; CGP: ; %bb.0:
3692 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3693 ; CGP-NEXT: s_mov_b32 s4, 0xffffff
3694 ; CGP-NEXT: v_and_b32_e32 v1, s4, v4
3695 ; CGP-NEXT: v_cvt_f32_i32_e32 v1, v1
3696 ; CGP-NEXT: v_and_b32_e32 v0, s4, v0
3697 ; CGP-NEXT: v_cvt_f32_i32_e32 v0, v0
3698 ; CGP-NEXT: v_and_b32_e32 v4, s4, v6
3699 ; CGP-NEXT: v_rcp_f32_e32 v3, v1
3700 ; CGP-NEXT: v_cvt_f32_i32_e32 v4, v4
3701 ; CGP-NEXT: v_and_b32_e32 v2, s4, v2
3702 ; CGP-NEXT: v_cvt_f32_i32_e32 v2, v2
3703 ; CGP-NEXT: v_mul_f32_e32 v3, v0, v3
3704 ; CGP-NEXT: v_trunc_f32_e32 v3, v3
3705 ; CGP-NEXT: v_mad_f32 v0, -v3, v1, v0
3706 ; CGP-NEXT: v_cvt_i32_f32_e32 v3, v3
3707 ; CGP-NEXT: v_rcp_f32_e32 v5, v4
3708 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v0|, |v1|
3709 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
3710 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v3, v0
3711 ; CGP-NEXT: v_mul_f32_e32 v3, v2, v5
3712 ; CGP-NEXT: v_trunc_f32_e32 v3, v3
3713 ; CGP-NEXT: v_mad_f32 v2, -v3, v4, v2
3714 ; CGP-NEXT: v_cvt_i32_f32_e32 v3, v3
3715 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v2|, |v4|
3716 ; CGP-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
3717 ; CGP-NEXT: v_bfe_i32 v0, v0, 0, 25
3718 ; CGP-NEXT: v_add_i32_e32 v2, vcc, v3, v2
3719 ; CGP-NEXT: v_bfe_i32 v2, v2, 0, 25
3720 ; CGP-NEXT: v_ashrrev_i32_e32 v1, 31, v0
3721 ; CGP-NEXT: v_ashrrev_i32_e32 v3, 31, v2
3722 ; CGP-NEXT: s_setpc_b64 s[30:31]