Lines Matching refs:CGP
3 …l-fp-math-f32=preserve-sign -mattr=+mad-mac-f32-insts < %s | FileCheck -check-prefixes=CHECK,CGP %s
626 ; CGP-LABEL: v_udiv_v2i64:
627 ; CGP: ; %bb.0:
628 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
629 ; CGP-NEXT: v_mov_b32_e32 v8, v0
630 ; CGP-NEXT: v_mov_b32_e32 v9, v1
631 ; CGP-NEXT: v_or_b32_e32 v1, v9, v5
632 ; CGP-NEXT: v_mov_b32_e32 v0, 0
633 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
634 ; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
635 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
636 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
637 ; CGP-NEXT: s_cbranch_execz BB2_2
638 ; CGP-NEXT: ; %bb.1:
639 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
640 ; CGP-NEXT: v_cvt_f32_u32_e32 v1, v5
641 ; CGP-NEXT: v_sub_i32_e32 v10, vcc, 0, v4
642 ; CGP-NEXT: v_subb_u32_e32 v11, vcc, 0, v5, vcc
643 ; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
644 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
645 ; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
646 ; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
647 ; CGP-NEXT: v_trunc_f32_e32 v1, v1
648 ; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
649 ; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
650 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
651 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v1
652 ; CGP-NEXT: v_mul_lo_u32 v13, v10, v0
653 ; CGP-NEXT: v_mul_lo_u32 v14, v11, v0
654 ; CGP-NEXT: v_mul_hi_u32 v15, v10, v0
655 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v12
656 ; CGP-NEXT: v_mul_lo_u32 v14, v1, v13
657 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v13
658 ; CGP-NEXT: v_mul_hi_u32 v13, v1, v13
659 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
660 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v12
661 ; CGP-NEXT: v_mul_lo_u32 v17, v1, v12
662 ; CGP-NEXT: v_mul_hi_u32 v18, v0, v12
663 ; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
664 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
665 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
666 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v17, v13
667 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
668 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
669 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
670 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v18
671 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
672 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
673 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v17, v16
674 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
675 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
676 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
677 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
678 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v13
679 ; CGP-NEXT: v_addc_u32_e64 v13, s[4:5], v1, v12, vcc
680 ; CGP-NEXT: v_add_i32_e64 v1, s[4:5], v1, v12
681 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v0
682 ; CGP-NEXT: v_mul_lo_u32 v11, v11, v0
683 ; CGP-NEXT: v_mul_hi_u32 v14, v10, v0
684 ; CGP-NEXT: v_mul_lo_u32 v10, v10, v13
685 ; CGP-NEXT: v_mul_lo_u32 v15, v13, v12
686 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v12
687 ; CGP-NEXT: v_mul_hi_u32 v12, v13, v12
688 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v11, v10
689 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v14
690 ; CGP-NEXT: v_mul_lo_u32 v11, v0, v10
691 ; CGP-NEXT: v_mul_lo_u32 v14, v13, v10
692 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v10
693 ; CGP-NEXT: v_mul_hi_u32 v10, v13, v10
694 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v15, v11
695 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
696 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v14, v12
697 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
698 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v16
699 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
700 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v17
701 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
702 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v13, v11
703 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v15
704 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v12, v11
705 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
706 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v13, v12
707 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v12
708 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v10, vcc
709 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v11
710 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
711 ; CGP-NEXT: v_mul_lo_u32 v10, v9, v0
712 ; CGP-NEXT: v_mul_hi_u32 v11, v8, v0
713 ; CGP-NEXT: v_mul_hi_u32 v0, v9, v0
714 ; CGP-NEXT: v_mul_lo_u32 v12, v8, v1
715 ; CGP-NEXT: v_mul_lo_u32 v13, v9, v1
716 ; CGP-NEXT: v_mul_hi_u32 v14, v8, v1
717 ; CGP-NEXT: v_mul_hi_u32 v1, v9, v1
718 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
719 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
720 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v13, v0
721 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
722 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
723 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
724 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v14
725 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
726 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
727 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v13, v11
728 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v10
729 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
730 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
731 ; CGP-NEXT: v_mul_lo_u32 v11, v4, v0
732 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v0
733 ; CGP-NEXT: v_mul_hi_u32 v13, v4, v0
734 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v10
735 ; CGP-NEXT: v_mul_lo_u32 v10, v4, v1
736 ; CGP-NEXT: v_add_i32_e32 v14, vcc, 1, v0
737 ; CGP-NEXT: v_addc_u32_e32 v15, vcc, 0, v1, vcc
738 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
739 ; CGP-NEXT: v_add_i32_e32 v12, vcc, 1, v14
740 ; CGP-NEXT: v_addc_u32_e32 v16, vcc, 0, v15, vcc
741 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
742 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v8, v11
743 ; CGP-NEXT: v_subb_u32_e64 v13, s[4:5], v9, v10, vcc
744 ; CGP-NEXT: v_sub_i32_e64 v9, s[4:5], v9, v10
745 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v11, v4
746 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, s[4:5]
747 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v13, v5
748 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, -1, s[4:5]
749 ; CGP-NEXT: v_subb_u32_e32 v9, vcc, v9, v5, vcc
750 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v13, v5
751 ; CGP-NEXT: v_cndmask_b32_e32 v10, v17, v10, vcc
752 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v11, v4
753 ; CGP-NEXT: v_subbrev_u32_e32 v9, vcc, 0, v9, vcc
754 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v11, v4
755 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
756 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v9, v5
757 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, -1, vcc
758 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v9, v5
759 ; CGP-NEXT: v_cndmask_b32_e32 v5, v13, v11, vcc
760 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v5
761 ; CGP-NEXT: v_cndmask_b32_e32 v5, v14, v12, vcc
762 ; CGP-NEXT: v_cndmask_b32_e32 v9, v15, v16, vcc
763 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v10
764 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
765 ; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v9, vcc
766 ; CGP-NEXT: BB2_2: ; %Flow2
767 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
768 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
769 ; CGP-NEXT: s_cbranch_execz BB2_4
770 ; CGP-NEXT: ; %bb.3:
771 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
772 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
773 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
774 ; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
775 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
776 ; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
777 ; CGP-NEXT: v_mul_hi_u32 v1, v0, v1
778 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v1
779 ; CGP-NEXT: v_mul_hi_u32 v0, v8, v0
780 ; CGP-NEXT: v_mul_lo_u32 v1, v0, v4
781 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v0
782 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v8, v1
783 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v4
784 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
785 ; CGP-NEXT: v_sub_i32_e64 v5, s[4:5], v1, v4
786 ; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v5, vcc
787 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v0
788 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v4
789 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
790 ; CGP-NEXT: v_mov_b32_e32 v1, 0
791 ; CGP-NEXT: BB2_4:
792 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
793 ; CGP-NEXT: v_or_b32_e32 v5, v3, v7
794 ; CGP-NEXT: v_mov_b32_e32 v4, 0
795 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[4:5]
796 ; CGP-NEXT: ; implicit-def: $vgpr4_vgpr5
797 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
798 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
799 ; CGP-NEXT: s_cbranch_execz BB2_6
800 ; CGP-NEXT: ; %bb.5:
801 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, v6
802 ; CGP-NEXT: v_cvt_f32_u32_e32 v5, v7
803 ; CGP-NEXT: v_sub_i32_e32 v8, vcc, 0, v6
804 ; CGP-NEXT: v_subb_u32_e32 v9, vcc, 0, v7, vcc
805 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
806 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
807 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
808 ; CGP-NEXT: v_mul_f32_e32 v5, 0x2f800000, v4
809 ; CGP-NEXT: v_trunc_f32_e32 v5, v5
810 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v5
811 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
812 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
813 ; CGP-NEXT: v_mul_lo_u32 v10, v8, v5
814 ; CGP-NEXT: v_mul_lo_u32 v11, v8, v4
815 ; CGP-NEXT: v_mul_lo_u32 v12, v9, v4
816 ; CGP-NEXT: v_mul_hi_u32 v13, v8, v4
817 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
818 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v11
819 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v11
820 ; CGP-NEXT: v_mul_hi_u32 v11, v5, v11
821 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
822 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v10
823 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v10
824 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
825 ; CGP-NEXT: v_mul_hi_u32 v10, v5, v10
826 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
827 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
828 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
829 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
830 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
831 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
832 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v16
833 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
834 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
835 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v15, v14
836 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
837 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
838 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
839 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
840 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
841 ; CGP-NEXT: v_addc_u32_e64 v11, s[4:5], v5, v10, vcc
842 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v10
843 ; CGP-NEXT: v_mul_lo_u32 v10, v8, v4
844 ; CGP-NEXT: v_mul_lo_u32 v9, v9, v4
845 ; CGP-NEXT: v_mul_hi_u32 v12, v8, v4
846 ; CGP-NEXT: v_mul_lo_u32 v8, v8, v11
847 ; CGP-NEXT: v_mul_lo_u32 v13, v11, v10
848 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v10
849 ; CGP-NEXT: v_mul_hi_u32 v10, v11, v10
850 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v9, v8
851 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v8, v12
852 ; CGP-NEXT: v_mul_lo_u32 v9, v4, v8
853 ; CGP-NEXT: v_mul_lo_u32 v12, v11, v8
854 ; CGP-NEXT: v_mul_hi_u32 v15, v4, v8
855 ; CGP-NEXT: v_mul_hi_u32 v8, v11, v8
856 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v13, v9
857 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
858 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v12, v10
859 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
860 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v9, v14
861 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
862 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v15
863 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
864 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v11, v9
865 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v12, v13
866 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v10, v9
867 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
868 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v11, v10
869 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v8, v10
870 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, v5, v8, vcc
871 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v9
872 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, 0, v5, vcc
873 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
874 ; CGP-NEXT: v_mul_hi_u32 v9, v2, v4
875 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
876 ; CGP-NEXT: v_mul_lo_u32 v10, v2, v5
877 ; CGP-NEXT: v_mul_lo_u32 v11, v3, v5
878 ; CGP-NEXT: v_mul_hi_u32 v12, v2, v5
879 ; CGP-NEXT: v_mul_hi_u32 v5, v3, v5
880 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
881 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
882 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v11, v4
883 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
884 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
885 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
886 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
887 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
888 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
889 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
890 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
891 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
892 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v9, v8
893 ; CGP-NEXT: v_mul_lo_u32 v9, v6, v4
894 ; CGP-NEXT: v_mul_lo_u32 v10, v7, v4
895 ; CGP-NEXT: v_mul_hi_u32 v11, v6, v4
896 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v8
897 ; CGP-NEXT: v_mul_lo_u32 v8, v6, v5
898 ; CGP-NEXT: v_add_i32_e32 v12, vcc, 1, v4
899 ; CGP-NEXT: v_addc_u32_e32 v13, vcc, 0, v5, vcc
900 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
901 ; CGP-NEXT: v_add_i32_e32 v10, vcc, 1, v12
902 ; CGP-NEXT: v_addc_u32_e32 v14, vcc, 0, v13, vcc
903 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
904 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v2, v9
905 ; CGP-NEXT: v_subb_u32_e64 v11, s[4:5], v3, v8, vcc
906 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v8
907 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v9, v6
908 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, -1, s[4:5]
909 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v11, v7
910 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, -1, s[4:5]
911 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v7, vcc
912 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v11, v7
913 ; CGP-NEXT: v_cndmask_b32_e32 v8, v15, v8, vcc
914 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v9, v6
915 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
916 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v9, v6
917 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, vcc
918 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v3, v7
919 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
920 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v7
921 ; CGP-NEXT: v_cndmask_b32_e32 v3, v11, v9, vcc
922 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v3
923 ; CGP-NEXT: v_cndmask_b32_e32 v3, v12, v10, vcc
924 ; CGP-NEXT: v_cndmask_b32_e32 v7, v13, v14, vcc
925 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v8
926 ; CGP-NEXT: v_cndmask_b32_e32 v4, v4, v3, vcc
927 ; CGP-NEXT: v_cndmask_b32_e32 v5, v5, v7, vcc
928 ; CGP-NEXT: BB2_6: ; %Flow
929 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
930 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
931 ; CGP-NEXT: s_cbranch_execz BB2_8
932 ; CGP-NEXT: ; %bb.7:
933 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v6
934 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v6
935 ; CGP-NEXT: v_rcp_iflag_f32_e32 v3, v3
936 ; CGP-NEXT: v_mul_f32_e32 v3, 0x4f7ffffe, v3
937 ; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
938 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
939 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
940 ; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v4
941 ; CGP-NEXT: v_mul_hi_u32 v3, v2, v3
942 ; CGP-NEXT: v_mul_lo_u32 v4, v3, v6
943 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v3
944 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v4
945 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v6
946 ; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
947 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v2, v6
948 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
949 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v3
950 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v6
951 ; CGP-NEXT: v_cndmask_b32_e32 v4, v3, v4, vcc
952 ; CGP-NEXT: v_mov_b32_e32 v5, 0
953 ; CGP-NEXT: BB2_8:
954 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
955 ; CGP-NEXT: v_mov_b32_e32 v2, v4
956 ; CGP-NEXT: v_mov_b32_e32 v3, v5
957 ; CGP-NEXT: s_setpc_b64 s[30:31]
1364 ; CGP-LABEL: v_udiv_v2i64_pow2k_denom:
1365 ; CGP: ; %bb.0:
1366 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1367 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, 0x1000
1368 ; CGP-NEXT: v_cvt_f32_ubyte0_e32 v5, 0
1369 ; CGP-NEXT: s_movk_i32 s8, 0xf000
1370 ; CGP-NEXT: s_movk_i32 s10, 0x1000
1371 ; CGP-NEXT: v_mov_b32_e32 v6, v4
1372 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
1373 ; CGP-NEXT: v_mac_f32_e32 v6, 0x4f800000, v5
1374 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
1375 ; CGP-NEXT: v_rcp_iflag_f32_e32 v5, v6
1376 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
1377 ; CGP-NEXT: v_mul_f32_e32 v5, 0x5f7ffffc, v5
1378 ; CGP-NEXT: v_mul_f32_e32 v6, 0x2f800000, v4
1379 ; CGP-NEXT: v_mul_f32_e32 v7, 0x2f800000, v5
1380 ; CGP-NEXT: v_trunc_f32_e32 v6, v6
1381 ; CGP-NEXT: v_trunc_f32_e32 v7, v7
1382 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v6
1383 ; CGP-NEXT: v_cvt_u32_f32_e32 v6, v6
1384 ; CGP-NEXT: v_mac_f32_e32 v5, 0xcf800000, v7
1385 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
1386 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
1387 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v6
1388 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
1389 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v7
1390 ; CGP-NEXT: v_mul_lo_u32 v10, s8, v4
1391 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
1392 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
1393 ; CGP-NEXT: v_mul_lo_u32 v13, s8, v5
1394 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
1395 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
1396 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
1397 ; CGP-NEXT: v_mul_lo_u32 v11, v6, v10
1398 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
1399 ; CGP-NEXT: v_mul_hi_u32 v10, v6, v10
1400 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v14, v9
1401 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v13
1402 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v13
1403 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v13
1404 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
1405 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
1406 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v8
1407 ; CGP-NEXT: v_mul_lo_u32 v15, v6, v8
1408 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
1409 ; CGP-NEXT: v_mul_hi_u32 v8, v6, v8
1410 ; CGP-NEXT: v_mul_lo_u32 v19, v5, v9
1411 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v19
1412 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
1413 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
1414 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v9
1415 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v9
1416 ; CGP-NEXT: v_mul_hi_u32 v9, v7, v9
1417 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
1418 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
1419 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v15, v10
1420 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
1421 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v13
1422 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
1423 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v16
1424 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
1425 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v18
1426 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
1427 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
1428 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v17
1429 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
1430 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
1431 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v15, v16
1432 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v19, v18
1433 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
1434 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
1435 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1436 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v15
1437 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
1438 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
1439 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v15
1440 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
1441 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
1442 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v10
1443 ; CGP-NEXT: v_addc_u32_e64 v10, s[4:5], v6, v8, vcc
1444 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v8
1445 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v4
1446 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
1447 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
1448 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v13
1449 ; CGP-NEXT: v_addc_u32_e64 v13, s[6:7], v7, v9, s[4:5]
1450 ; CGP-NEXT: v_add_i32_e64 v7, s[6:7], v7, v9
1451 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v5
1452 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
1453 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
1454 ; CGP-NEXT: v_mul_lo_u32 v16, s8, v10
1455 ; CGP-NEXT: v_mul_lo_u32 v17, v10, v8
1456 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
1457 ; CGP-NEXT: v_mul_hi_u32 v8, v10, v8
1458 ; CGP-NEXT: v_mul_lo_u32 v19, s8, v13
1459 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v16
1460 ; CGP-NEXT: v_mul_lo_u32 v16, v13, v9
1461 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v14, v19
1462 ; CGP-NEXT: v_mul_hi_u32 v19, v5, v9
1463 ; CGP-NEXT: v_mul_hi_u32 v9, v13, v9
1464 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
1465 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v14, v15
1466 ; CGP-NEXT: v_mul_lo_u32 v14, v4, v11
1467 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v12
1468 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v16, v15
1469 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[6:7]
1470 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v19
1471 ; CGP-NEXT: v_mul_lo_u32 v15, v10, v11
1472 ; CGP-NEXT: v_mul_hi_u32 v19, v4, v11
1473 ; CGP-NEXT: v_mul_hi_u32 v10, v10, v11
1474 ; CGP-NEXT: v_mul_lo_u32 v11, v13, v12
1475 ; CGP-NEXT: v_mul_hi_u32 v13, v13, v12
1476 ; CGP-NEXT: v_mul_hi_u32 v12, v5, v12
1477 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v17, v14
1478 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, s[8:9]
1479 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v15, v8
1480 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[8:9]
1481 ; CGP-NEXT: v_add_i32_e64 v9, s[8:9], v11, v9
1482 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[8:9]
1483 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v14, v18
1484 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[8:9]
1485 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v8, v19
1486 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[8:9]
1487 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, s[6:7]
1488 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v12
1489 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
1490 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v17, v14
1491 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v18
1492 ; CGP-NEXT: v_add_i32_e64 v16, s[6:7], v16, v19
1493 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
1494 ; CGP-NEXT: v_add_i32_e64 v8, s[6:7], v8, v14
1495 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
1496 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v16
1497 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[6:7]
1498 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v15, v12
1499 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v14
1500 ; CGP-NEXT: v_add_i32_e64 v10, s[6:7], v10, v12
1501 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v13, v11
1502 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, v6, v10, vcc
1503 ; CGP-NEXT: v_addc_u32_e64 v7, vcc, v7, v11, s[4:5]
1504 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
1505 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, 0, v6, vcc
1506 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
1507 ; CGP-NEXT: v_mul_hi_u32 v10, v2, v4
1508 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
1509 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
1510 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v7, vcc
1511 ; CGP-NEXT: v_mul_lo_u32 v9, v1, v5
1512 ; CGP-NEXT: v_mul_hi_u32 v11, v0, v5
1513 ; CGP-NEXT: v_mul_hi_u32 v5, v1, v5
1514 ; CGP-NEXT: v_mul_lo_u32 v12, v2, v6
1515 ; CGP-NEXT: v_mul_lo_u32 v13, v3, v6
1516 ; CGP-NEXT: v_mul_hi_u32 v14, v2, v6
1517 ; CGP-NEXT: v_mul_hi_u32 v6, v3, v6
1518 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v7
1519 ; CGP-NEXT: v_mul_lo_u32 v16, v1, v7
1520 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v7
1521 ; CGP-NEXT: v_mul_hi_u32 v7, v1, v7
1522 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
1523 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
1524 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v13, v4
1525 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
1526 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
1527 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
1528 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v16, v5
1529 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
1530 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
1531 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
1532 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v14
1533 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
1534 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
1535 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1536 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v17
1537 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1538 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
1539 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v13, v10
1540 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v15, v9
1541 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v16, v11
1542 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
1543 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
1544 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
1545 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1546 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
1547 ; CGP-NEXT: v_mul_lo_u32 v10, s10, v4
1548 ; CGP-NEXT: v_mul_lo_u32 v12, 0, v4
1549 ; CGP-NEXT: v_mul_hi_u32 v13, s10, v4
1550 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
1551 ; CGP-NEXT: v_mul_lo_u32 v11, s10, v5
1552 ; CGP-NEXT: v_mul_lo_u32 v14, 0, v5
1553 ; CGP-NEXT: v_mul_hi_u32 v15, s10, v5
1554 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v8
1555 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
1556 ; CGP-NEXT: v_mul_lo_u32 v8, s10, v6
1557 ; CGP-NEXT: v_add_i32_e32 v9, vcc, 1, v4
1558 ; CGP-NEXT: v_addc_u32_e32 v16, vcc, 0, v6, vcc
1559 ; CGP-NEXT: v_mul_lo_u32 v17, s10, v7
1560 ; CGP-NEXT: v_add_i32_e32 v18, vcc, 1, v5
1561 ; CGP-NEXT: v_addc_u32_e32 v19, vcc, 0, v7, vcc
1562 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
1563 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v17
1564 ; CGP-NEXT: v_add_i32_e32 v14, vcc, 1, v9
1565 ; CGP-NEXT: v_addc_u32_e32 v17, vcc, 0, v16, vcc
1566 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v13
1567 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
1568 ; CGP-NEXT: v_add_i32_e32 v13, vcc, 1, v18
1569 ; CGP-NEXT: v_addc_u32_e32 v15, vcc, 0, v19, vcc
1570 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v10
1571 ; CGP-NEXT: v_subb_u32_e64 v10, s[4:5], v3, v8, vcc
1572 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v8
1573 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s10, v2
1574 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, -1, s[4:5]
1575 ; CGP-NEXT: v_sub_i32_e64 v0, s[4:5], v0, v11
1576 ; CGP-NEXT: v_subb_u32_e64 v11, s[6:7], v1, v12, s[4:5]
1577 ; CGP-NEXT: v_sub_i32_e64 v1, s[6:7], v1, v12
1578 ; CGP-NEXT: v_cmp_le_u32_e64 s[6:7], 0, v10
1579 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, s[6:7]
1580 ; CGP-NEXT: v_cmp_eq_u32_e64 s[6:7], 0, v10
1581 ; CGP-NEXT: v_cmp_le_u32_e64 s[8:9], s10, v0
1582 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, s[8:9]
1583 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
1584 ; CGP-NEXT: v_cndmask_b32_e64 v8, v12, v8, s[6:7]
1585 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v11
1586 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
1587 ; CGP-NEXT: v_subbrev_u32_e64 v1, vcc, 0, v1, s[4:5]
1588 ; CGP-NEXT: v_subrev_i32_e32 v2, vcc, s10, v2
1589 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
1590 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v2
1591 ; CGP-NEXT: v_cndmask_b32_e64 v2, 0, -1, vcc
1592 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v11
1593 ; CGP-NEXT: v_cndmask_b32_e32 v10, v12, v10, vcc
1594 ; CGP-NEXT: v_subrev_i32_e32 v0, vcc, s10, v0
1595 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
1596 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v0
1597 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, -1, vcc
1598 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v3
1599 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
1600 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v1
1601 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
1602 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
1603 ; CGP-NEXT: v_cndmask_b32_e32 v2, v11, v2, vcc
1604 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
1605 ; CGP-NEXT: v_cndmask_b32_e32 v0, v12, v0, vcc
1606 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v2
1607 ; CGP-NEXT: v_cndmask_b32_e32 v1, v9, v14, vcc
1608 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v0
1609 ; CGP-NEXT: v_cndmask_b32_e64 v0, v18, v13, s[4:5]
1610 ; CGP-NEXT: v_cndmask_b32_e32 v3, v16, v17, vcc
1611 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v8
1612 ; CGP-NEXT: v_cndmask_b32_e32 v2, v4, v1, vcc
1613 ; CGP-NEXT: v_cndmask_b32_e64 v1, v19, v15, s[4:5]
1614 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v10
1615 ; CGP-NEXT: v_cndmask_b32_e64 v0, v5, v0, s[4:5]
1616 ; CGP-NEXT: v_cndmask_b32_e64 v1, v7, v1, s[4:5]
1617 ; CGP-NEXT: v_cndmask_b32_e32 v3, v6, v3, vcc
1618 ; CGP-NEXT: s_setpc_b64 s[30:31]
2025 ; CGP-LABEL: v_udiv_v2i64_oddk_denom:
2026 ; CGP: ; %bb.0:
2027 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2028 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, 0x12d8fb
2029 ; CGP-NEXT: v_cvt_f32_ubyte0_e32 v5, 0
2030 ; CGP-NEXT: s_mov_b32 s8, 0xffed2705
2031 ; CGP-NEXT: s_mov_b32 s10, 0x12d8fb
2032 ; CGP-NEXT: v_mov_b32_e32 v6, v4
2033 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
2034 ; CGP-NEXT: v_mac_f32_e32 v6, 0x4f800000, v5
2035 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
2036 ; CGP-NEXT: v_rcp_iflag_f32_e32 v5, v6
2037 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
2038 ; CGP-NEXT: v_mul_f32_e32 v5, 0x5f7ffffc, v5
2039 ; CGP-NEXT: v_mul_f32_e32 v6, 0x2f800000, v4
2040 ; CGP-NEXT: v_mul_f32_e32 v7, 0x2f800000, v5
2041 ; CGP-NEXT: v_trunc_f32_e32 v6, v6
2042 ; CGP-NEXT: v_trunc_f32_e32 v7, v7
2043 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v6
2044 ; CGP-NEXT: v_cvt_u32_f32_e32 v6, v6
2045 ; CGP-NEXT: v_mac_f32_e32 v5, 0xcf800000, v7
2046 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
2047 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
2048 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v6
2049 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
2050 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v7
2051 ; CGP-NEXT: v_mul_lo_u32 v10, s8, v4
2052 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
2053 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
2054 ; CGP-NEXT: v_mul_lo_u32 v13, s8, v5
2055 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
2056 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
2057 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
2058 ; CGP-NEXT: v_mul_lo_u32 v11, v6, v10
2059 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
2060 ; CGP-NEXT: v_mul_hi_u32 v10, v6, v10
2061 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v14, v9
2062 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v13
2063 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v13
2064 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v13
2065 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
2066 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
2067 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v8
2068 ; CGP-NEXT: v_mul_lo_u32 v15, v6, v8
2069 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
2070 ; CGP-NEXT: v_mul_hi_u32 v8, v6, v8
2071 ; CGP-NEXT: v_mul_lo_u32 v19, v5, v9
2072 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v19
2073 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
2074 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
2075 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v9
2076 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v9
2077 ; CGP-NEXT: v_mul_hi_u32 v9, v7, v9
2078 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
2079 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2080 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v15, v10
2081 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
2082 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v13
2083 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
2084 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v16
2085 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
2086 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v18
2087 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
2088 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
2089 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v17
2090 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
2091 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
2092 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v15, v16
2093 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v19, v18
2094 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
2095 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
2096 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2097 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v15
2098 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2099 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
2100 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v15
2101 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
2102 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
2103 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v10
2104 ; CGP-NEXT: v_addc_u32_e64 v10, s[4:5], v6, v8, vcc
2105 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v8
2106 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v4
2107 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
2108 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
2109 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v13
2110 ; CGP-NEXT: v_addc_u32_e64 v13, s[6:7], v7, v9, s[4:5]
2111 ; CGP-NEXT: v_add_i32_e64 v7, s[6:7], v7, v9
2112 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v5
2113 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
2114 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
2115 ; CGP-NEXT: v_mul_lo_u32 v16, s8, v10
2116 ; CGP-NEXT: v_mul_lo_u32 v17, v10, v8
2117 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
2118 ; CGP-NEXT: v_mul_hi_u32 v8, v10, v8
2119 ; CGP-NEXT: v_mul_lo_u32 v19, s8, v13
2120 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v16
2121 ; CGP-NEXT: v_mul_lo_u32 v16, v13, v9
2122 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v14, v19
2123 ; CGP-NEXT: v_mul_hi_u32 v19, v5, v9
2124 ; CGP-NEXT: v_mul_hi_u32 v9, v13, v9
2125 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
2126 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v14, v15
2127 ; CGP-NEXT: v_mul_lo_u32 v14, v4, v11
2128 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v12
2129 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v16, v15
2130 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[6:7]
2131 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v19
2132 ; CGP-NEXT: v_mul_lo_u32 v15, v10, v11
2133 ; CGP-NEXT: v_mul_hi_u32 v19, v4, v11
2134 ; CGP-NEXT: v_mul_hi_u32 v10, v10, v11
2135 ; CGP-NEXT: v_mul_lo_u32 v11, v13, v12
2136 ; CGP-NEXT: v_mul_hi_u32 v13, v13, v12
2137 ; CGP-NEXT: v_mul_hi_u32 v12, v5, v12
2138 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v17, v14
2139 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, s[8:9]
2140 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v15, v8
2141 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[8:9]
2142 ; CGP-NEXT: v_add_i32_e64 v9, s[8:9], v11, v9
2143 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[8:9]
2144 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v14, v18
2145 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[8:9]
2146 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v8, v19
2147 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[8:9]
2148 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, s[6:7]
2149 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v12
2150 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
2151 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v17, v14
2152 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v18
2153 ; CGP-NEXT: v_add_i32_e64 v16, s[6:7], v16, v19
2154 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
2155 ; CGP-NEXT: v_add_i32_e64 v8, s[6:7], v8, v14
2156 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
2157 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v16
2158 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[6:7]
2159 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v15, v12
2160 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v14
2161 ; CGP-NEXT: v_add_i32_e64 v10, s[6:7], v10, v12
2162 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v13, v11
2163 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, v6, v10, vcc
2164 ; CGP-NEXT: v_addc_u32_e64 v7, vcc, v7, v11, s[4:5]
2165 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
2166 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, 0, v6, vcc
2167 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
2168 ; CGP-NEXT: v_mul_hi_u32 v10, v2, v4
2169 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
2170 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
2171 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v7, vcc
2172 ; CGP-NEXT: v_mul_lo_u32 v9, v1, v5
2173 ; CGP-NEXT: v_mul_hi_u32 v11, v0, v5
2174 ; CGP-NEXT: v_mul_hi_u32 v5, v1, v5
2175 ; CGP-NEXT: v_mul_lo_u32 v12, v2, v6
2176 ; CGP-NEXT: v_mul_lo_u32 v13, v3, v6
2177 ; CGP-NEXT: v_mul_hi_u32 v14, v2, v6
2178 ; CGP-NEXT: v_mul_hi_u32 v6, v3, v6
2179 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v7
2180 ; CGP-NEXT: v_mul_lo_u32 v16, v1, v7
2181 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v7
2182 ; CGP-NEXT: v_mul_hi_u32 v7, v1, v7
2183 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
2184 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2185 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v13, v4
2186 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2187 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
2188 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2189 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v16, v5
2190 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
2191 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
2192 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
2193 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v14
2194 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2195 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
2196 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2197 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v17
2198 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2199 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
2200 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v13, v10
2201 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v15, v9
2202 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v16, v11
2203 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
2204 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
2205 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
2206 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2207 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
2208 ; CGP-NEXT: v_mul_lo_u32 v10, s10, v4
2209 ; CGP-NEXT: v_mul_lo_u32 v12, 0, v4
2210 ; CGP-NEXT: v_mul_hi_u32 v13, s10, v4
2211 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
2212 ; CGP-NEXT: v_mul_lo_u32 v11, s10, v5
2213 ; CGP-NEXT: v_mul_lo_u32 v14, 0, v5
2214 ; CGP-NEXT: v_mul_hi_u32 v15, s10, v5
2215 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v8
2216 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
2217 ; CGP-NEXT: v_mul_lo_u32 v8, s10, v6
2218 ; CGP-NEXT: v_add_i32_e32 v9, vcc, 1, v4
2219 ; CGP-NEXT: v_addc_u32_e32 v16, vcc, 0, v6, vcc
2220 ; CGP-NEXT: v_mul_lo_u32 v17, s10, v7
2221 ; CGP-NEXT: v_add_i32_e32 v18, vcc, 1, v5
2222 ; CGP-NEXT: v_addc_u32_e32 v19, vcc, 0, v7, vcc
2223 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
2224 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v17
2225 ; CGP-NEXT: v_add_i32_e32 v14, vcc, 1, v9
2226 ; CGP-NEXT: v_addc_u32_e32 v17, vcc, 0, v16, vcc
2227 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v13
2228 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
2229 ; CGP-NEXT: v_add_i32_e32 v13, vcc, 1, v18
2230 ; CGP-NEXT: v_addc_u32_e32 v15, vcc, 0, v19, vcc
2231 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v10
2232 ; CGP-NEXT: v_subb_u32_e64 v10, s[4:5], v3, v8, vcc
2233 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v8
2234 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s10, v2
2235 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, -1, s[4:5]
2236 ; CGP-NEXT: v_sub_i32_e64 v0, s[4:5], v0, v11
2237 ; CGP-NEXT: v_subb_u32_e64 v11, s[6:7], v1, v12, s[4:5]
2238 ; CGP-NEXT: v_sub_i32_e64 v1, s[6:7], v1, v12
2239 ; CGP-NEXT: v_cmp_le_u32_e64 s[6:7], 0, v10
2240 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, s[6:7]
2241 ; CGP-NEXT: v_cmp_eq_u32_e64 s[6:7], 0, v10
2242 ; CGP-NEXT: v_cmp_le_u32_e64 s[8:9], s10, v0
2243 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, s[8:9]
2244 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2245 ; CGP-NEXT: v_cndmask_b32_e64 v8, v12, v8, s[6:7]
2246 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v11
2247 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
2248 ; CGP-NEXT: v_subbrev_u32_e64 v1, vcc, 0, v1, s[4:5]
2249 ; CGP-NEXT: v_subrev_i32_e32 v2, vcc, s10, v2
2250 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2251 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v2
2252 ; CGP-NEXT: v_cndmask_b32_e64 v2, 0, -1, vcc
2253 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v11
2254 ; CGP-NEXT: v_cndmask_b32_e32 v10, v12, v10, vcc
2255 ; CGP-NEXT: v_subrev_i32_e32 v0, vcc, s10, v0
2256 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
2257 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v0
2258 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, -1, vcc
2259 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v3
2260 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
2261 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v1
2262 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
2263 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
2264 ; CGP-NEXT: v_cndmask_b32_e32 v2, v11, v2, vcc
2265 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
2266 ; CGP-NEXT: v_cndmask_b32_e32 v0, v12, v0, vcc
2267 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v2
2268 ; CGP-NEXT: v_cndmask_b32_e32 v1, v9, v14, vcc
2269 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v0
2270 ; CGP-NEXT: v_cndmask_b32_e64 v0, v18, v13, s[4:5]
2271 ; CGP-NEXT: v_cndmask_b32_e32 v3, v16, v17, vcc
2272 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v8
2273 ; CGP-NEXT: v_cndmask_b32_e32 v2, v4, v1, vcc
2274 ; CGP-NEXT: v_cndmask_b32_e64 v1, v19, v15, s[4:5]
2275 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v10
2276 ; CGP-NEXT: v_cndmask_b32_e64 v0, v5, v0, s[4:5]
2277 ; CGP-NEXT: v_cndmask_b32_e64 v1, v7, v1, s[4:5]
2278 ; CGP-NEXT: v_cndmask_b32_e32 v3, v6, v3, vcc
2279 ; CGP-NEXT: s_setpc_b64 s[30:31]
2725 ; CGP-LABEL: v_udiv_v2i64_pow2_shl_denom:
2726 ; CGP: ; %bb.0:
2727 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2728 ; CGP-NEXT: v_mov_b32_e32 v5, v0
2729 ; CGP-NEXT: v_mov_b32_e32 v7, v1
2730 ; CGP-NEXT: s_movk_i32 s4, 0x1000
2731 ; CGP-NEXT: s_mov_b32 s5, 0
2732 ; CGP-NEXT: v_lshl_b64 v[10:11], s[4:5], v4
2733 ; CGP-NEXT: v_lshl_b64 v[8:9], s[4:5], v6
2734 ; CGP-NEXT: v_or_b32_e32 v1, v7, v11
2735 ; CGP-NEXT: v_mov_b32_e32 v0, 0
2736 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
2737 ; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
2738 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
2739 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
2740 ; CGP-NEXT: s_cbranch_execz BB8_2
2741 ; CGP-NEXT: ; %bb.1:
2742 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v10
2743 ; CGP-NEXT: v_cvt_f32_u32_e32 v1, v11
2744 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v10
2745 ; CGP-NEXT: v_subb_u32_e32 v6, vcc, 0, v11, vcc
2746 ; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
2747 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
2748 ; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
2749 ; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
2750 ; CGP-NEXT: v_trunc_f32_e32 v1, v1
2751 ; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
2752 ; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
2753 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
2754 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v1
2755 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v0
2756 ; CGP-NEXT: v_mul_lo_u32 v14, v6, v0
2757 ; CGP-NEXT: v_mul_hi_u32 v15, v4, v0
2758 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v12
2759 ; CGP-NEXT: v_mul_lo_u32 v14, v1, v13
2760 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v13
2761 ; CGP-NEXT: v_mul_hi_u32 v13, v1, v13
2762 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
2763 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v12
2764 ; CGP-NEXT: v_mul_lo_u32 v17, v1, v12
2765 ; CGP-NEXT: v_mul_hi_u32 v18, v0, v12
2766 ; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
2767 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
2768 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2769 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v17, v13
2770 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
2771 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
2772 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
2773 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v18
2774 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
2775 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
2776 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v17, v16
2777 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
2778 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
2779 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
2780 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
2781 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v13
2782 ; CGP-NEXT: v_addc_u32_e64 v13, s[4:5], v1, v12, vcc
2783 ; CGP-NEXT: v_add_i32_e64 v1, s[4:5], v1, v12
2784 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v0
2785 ; CGP-NEXT: v_mul_lo_u32 v6, v6, v0
2786 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v0
2787 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v13
2788 ; CGP-NEXT: v_mul_lo_u32 v15, v13, v12
2789 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v12
2790 ; CGP-NEXT: v_mul_hi_u32 v12, v13, v12
2791 ; CGP-NEXT: v_add_i32_e64 v4, s[4:5], v6, v4
2792 ; CGP-NEXT: v_add_i32_e64 v4, s[4:5], v4, v14
2793 ; CGP-NEXT: v_mul_lo_u32 v6, v0, v4
2794 ; CGP-NEXT: v_mul_lo_u32 v14, v13, v4
2795 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v4
2796 ; CGP-NEXT: v_mul_hi_u32 v4, v13, v4
2797 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v15, v6
2798 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2799 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v14, v12
2800 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
2801 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v16
2802 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
2803 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v17
2804 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
2805 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v13, v6
2806 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v15
2807 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v12, v6
2808 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2809 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v13, v12
2810 ; CGP-NEXT: v_add_i32_e64 v4, s[4:5], v4, v12
2811 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v4, vcc
2812 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v6
2813 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
2814 ; CGP-NEXT: v_mul_lo_u32 v4, v7, v0
2815 ; CGP-NEXT: v_mul_hi_u32 v6, v5, v0
2816 ; CGP-NEXT: v_mul_hi_u32 v0, v7, v0
2817 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v1
2818 ; CGP-NEXT: v_mul_lo_u32 v13, v7, v1
2819 ; CGP-NEXT: v_mul_hi_u32 v14, v5, v1
2820 ; CGP-NEXT: v_mul_hi_u32 v1, v7, v1
2821 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
2822 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2823 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v13, v0
2824 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2825 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v6
2826 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, 1, vcc
2827 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v14
2828 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, vcc
2829 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v12, v4
2830 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v13, v6
2831 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v4
2832 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, 1, vcc
2833 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v6, v4
2834 ; CGP-NEXT: v_mul_lo_u32 v6, v10, v0
2835 ; CGP-NEXT: v_mul_lo_u32 v12, v11, v0
2836 ; CGP-NEXT: v_mul_hi_u32 v13, v10, v0
2837 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v4
2838 ; CGP-NEXT: v_mul_lo_u32 v4, v10, v1
2839 ; CGP-NEXT: v_add_i32_e32 v14, vcc, 1, v0
2840 ; CGP-NEXT: v_addc_u32_e32 v15, vcc, 0, v1, vcc
2841 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v12, v4
2842 ; CGP-NEXT: v_add_i32_e32 v12, vcc, 1, v14
2843 ; CGP-NEXT: v_addc_u32_e32 v16, vcc, 0, v15, vcc
2844 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v13
2845 ; CGP-NEXT: v_sub_i32_e32 v6, vcc, v5, v6
2846 ; CGP-NEXT: v_subb_u32_e64 v13, s[4:5], v7, v4, vcc
2847 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v7, v4
2848 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v6, v10
2849 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, -1, s[4:5]
2850 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v13, v11
2851 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, -1, s[4:5]
2852 ; CGP-NEXT: v_subb_u32_e32 v4, vcc, v4, v11, vcc
2853 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v13, v11
2854 ; CGP-NEXT: v_cndmask_b32_e32 v7, v17, v7, vcc
2855 ; CGP-NEXT: v_sub_i32_e32 v6, vcc, v6, v10
2856 ; CGP-NEXT: v_subbrev_u32_e32 v4, vcc, 0, v4, vcc
2857 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v6, v10
2858 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, -1, vcc
2859 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v4, v11
2860 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, -1, vcc
2861 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v4, v11
2862 ; CGP-NEXT: v_cndmask_b32_e32 v4, v13, v6, vcc
2863 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v4
2864 ; CGP-NEXT: v_cndmask_b32_e32 v4, v14, v12, vcc
2865 ; CGP-NEXT: v_cndmask_b32_e32 v6, v15, v16, vcc
2866 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v7
2867 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
2868 ; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v6, vcc
2869 ; CGP-NEXT: BB8_2: ; %Flow2
2870 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
2871 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
2872 ; CGP-NEXT: s_cbranch_execz BB8_4
2873 ; CGP-NEXT: ; %bb.3:
2874 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v10
2875 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v10
2876 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
2877 ; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
2878 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
2879 ; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
2880 ; CGP-NEXT: v_mul_hi_u32 v1, v0, v1
2881 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v1
2882 ; CGP-NEXT: v_mul_hi_u32 v0, v5, v0
2883 ; CGP-NEXT: v_mul_lo_u32 v1, v0, v10
2884 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v0
2885 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v5, v1
2886 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v10
2887 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
2888 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v1, v10
2889 ; CGP-NEXT: v_cndmask_b32_e32 v1, v1, v4, vcc
2890 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v0
2891 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v1, v10
2892 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
2893 ; CGP-NEXT: v_mov_b32_e32 v1, 0
2894 ; CGP-NEXT: BB8_4:
2895 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
2896 ; CGP-NEXT: v_or_b32_e32 v5, v3, v9
2897 ; CGP-NEXT: v_mov_b32_e32 v4, 0
2898 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[4:5]
2899 ; CGP-NEXT: ; implicit-def: $vgpr4_vgpr5
2900 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
2901 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
2902 ; CGP-NEXT: s_cbranch_execz BB8_6
2903 ; CGP-NEXT: ; %bb.5:
2904 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, v8
2905 ; CGP-NEXT: v_cvt_f32_u32_e32 v5, v9
2906 ; CGP-NEXT: v_sub_i32_e32 v6, vcc, 0, v8
2907 ; CGP-NEXT: v_subb_u32_e32 v7, vcc, 0, v9, vcc
2908 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
2909 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
2910 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
2911 ; CGP-NEXT: v_mul_f32_e32 v5, 0x2f800000, v4
2912 ; CGP-NEXT: v_trunc_f32_e32 v5, v5
2913 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v5
2914 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
2915 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
2916 ; CGP-NEXT: v_mul_lo_u32 v10, v6, v5
2917 ; CGP-NEXT: v_mul_lo_u32 v11, v6, v4
2918 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v4
2919 ; CGP-NEXT: v_mul_hi_u32 v13, v6, v4
2920 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
2921 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v11
2922 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v11
2923 ; CGP-NEXT: v_mul_hi_u32 v11, v5, v11
2924 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
2925 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v10
2926 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v10
2927 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
2928 ; CGP-NEXT: v_mul_hi_u32 v10, v5, v10
2929 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
2930 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2931 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
2932 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2933 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
2934 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2935 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v16
2936 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
2937 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
2938 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v15, v14
2939 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
2940 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2941 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
2942 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
2943 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
2944 ; CGP-NEXT: v_addc_u32_e64 v11, s[4:5], v5, v10, vcc
2945 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v10
2946 ; CGP-NEXT: v_mul_lo_u32 v10, v6, v4
2947 ; CGP-NEXT: v_mul_lo_u32 v7, v7, v4
2948 ; CGP-NEXT: v_mul_hi_u32 v12, v6, v4
2949 ; CGP-NEXT: v_mul_lo_u32 v6, v6, v11
2950 ; CGP-NEXT: v_mul_lo_u32 v13, v11, v10
2951 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v10
2952 ; CGP-NEXT: v_mul_hi_u32 v10, v11, v10
2953 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v7, v6
2954 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v12
2955 ; CGP-NEXT: v_mul_lo_u32 v7, v4, v6
2956 ; CGP-NEXT: v_mul_lo_u32 v12, v11, v6
2957 ; CGP-NEXT: v_mul_hi_u32 v15, v4, v6
2958 ; CGP-NEXT: v_mul_hi_u32 v6, v11, v6
2959 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v13, v7
2960 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
2961 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v12, v10
2962 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2963 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v7, v14
2964 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
2965 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v15
2966 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2967 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v11, v7
2968 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v12, v13
2969 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v10, v7
2970 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
2971 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v11, v10
2972 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v10
2973 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, v5, v6, vcc
2974 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v7
2975 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, 0, v5, vcc
2976 ; CGP-NEXT: v_mul_lo_u32 v6, v3, v4
2977 ; CGP-NEXT: v_mul_hi_u32 v7, v2, v4
2978 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
2979 ; CGP-NEXT: v_mul_lo_u32 v10, v2, v5
2980 ; CGP-NEXT: v_mul_lo_u32 v11, v3, v5
2981 ; CGP-NEXT: v_mul_hi_u32 v12, v2, v5
2982 ; CGP-NEXT: v_mul_hi_u32 v5, v3, v5
2983 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v10
2984 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2985 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v11, v4
2986 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2987 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v7
2988 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, vcc
2989 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
2990 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, 1, vcc
2991 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v10, v6
2992 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v11, v7
2993 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v6
2994 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, vcc
2995 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v7, v6
2996 ; CGP-NEXT: v_mul_lo_u32 v7, v8, v4
2997 ; CGP-NEXT: v_mul_lo_u32 v10, v9, v4
2998 ; CGP-NEXT: v_mul_hi_u32 v11, v8, v4
2999 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v6
3000 ; CGP-NEXT: v_mul_lo_u32 v6, v8, v5
3001 ; CGP-NEXT: v_add_i32_e32 v12, vcc, 1, v4
3002 ; CGP-NEXT: v_addc_u32_e32 v13, vcc, 0, v5, vcc
3003 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v10, v6
3004 ; CGP-NEXT: v_add_i32_e32 v10, vcc, 1, v12
3005 ; CGP-NEXT: v_addc_u32_e32 v14, vcc, 0, v13, vcc
3006 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v11
3007 ; CGP-NEXT: v_sub_i32_e32 v7, vcc, v2, v7
3008 ; CGP-NEXT: v_subb_u32_e64 v11, s[4:5], v3, v6, vcc
3009 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v6
3010 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v7, v8
3011 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, -1, s[4:5]
3012 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v11, v9
3013 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, -1, s[4:5]
3014 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v9, vcc
3015 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v11, v9
3016 ; CGP-NEXT: v_cndmask_b32_e32 v6, v15, v6, vcc
3017 ; CGP-NEXT: v_sub_i32_e32 v7, vcc, v7, v8
3018 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
3019 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v7, v8
3020 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, -1, vcc
3021 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v3, v9
3022 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
3023 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v3, v9
3024 ; CGP-NEXT: v_cndmask_b32_e32 v3, v11, v7, vcc
3025 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v3
3026 ; CGP-NEXT: v_cndmask_b32_e32 v3, v12, v10, vcc
3027 ; CGP-NEXT: v_cndmask_b32_e32 v7, v13, v14, vcc
3028 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v6
3029 ; CGP-NEXT: v_cndmask_b32_e32 v4, v4, v3, vcc
3030 ; CGP-NEXT: v_cndmask_b32_e32 v5, v5, v7, vcc
3031 ; CGP-NEXT: BB8_6: ; %Flow
3032 ; CGP-NEXT: s_or_saveexec_b64 s[6:7], s[6:7]
3033 ; CGP-NEXT: s_xor_b64 exec, exec, s[6:7]
3034 ; CGP-NEXT: s_cbranch_execz BB8_8
3035 ; CGP-NEXT: ; %bb.7:
3036 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v8
3037 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v8
3038 ; CGP-NEXT: v_rcp_iflag_f32_e32 v3, v3
3039 ; CGP-NEXT: v_mul_f32_e32 v3, 0x4f7ffffe, v3
3040 ; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
3041 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
3042 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
3043 ; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v4
3044 ; CGP-NEXT: v_mul_hi_u32 v3, v2, v3
3045 ; CGP-NEXT: v_mul_lo_u32 v4, v3, v8
3046 ; CGP-NEXT: v_add_i32_e32 v5, vcc, 1, v3
3047 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v4
3048 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v8
3049 ; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v5, vcc
3050 ; CGP-NEXT: v_sub_i32_e64 v4, s[4:5], v2, v8
3051 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v4, vcc
3052 ; CGP-NEXT: v_add_i32_e32 v4, vcc, 1, v3
3053 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v8
3054 ; CGP-NEXT: v_cndmask_b32_e32 v4, v3, v4, vcc
3055 ; CGP-NEXT: v_mov_b32_e32 v5, 0
3056 ; CGP-NEXT: BB8_8:
3057 ; CGP-NEXT: s_or_b64 exec, exec, s[6:7]
3058 ; CGP-NEXT: v_mov_b32_e32 v2, v4
3059 ; CGP-NEXT: v_mov_b32_e32 v3, v5
3060 ; CGP-NEXT: s_setpc_b64 s[30:31]
3095 ; CGP-LABEL: v_udiv_i64_24bit:
3096 ; CGP: ; %bb.0:
3097 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3098 ; CGP-NEXT: s_mov_b32 s4, 0xffffff
3099 ; CGP-NEXT: v_and_b32_e32 v0, s4, v0
3100 ; CGP-NEXT: v_and_b32_e32 v1, s4, v2
3101 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v0
3102 ; CGP-NEXT: v_cvt_f32_u32_e32 v1, v1
3103 ; CGP-NEXT: v_rcp_f32_e32 v2, v1
3104 ; CGP-NEXT: v_mul_f32_e32 v2, v0, v2
3105 ; CGP-NEXT: v_trunc_f32_e32 v2, v2
3106 ; CGP-NEXT: v_mad_f32 v0, -v2, v1, v0
3107 ; CGP-NEXT: v_cvt_u32_f32_e32 v2, v2
3108 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v0|, v1
3109 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
3110 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v2, v0
3111 ; CGP-NEXT: v_and_b32_e32 v0, 0xffffff, v0
3112 ; CGP-NEXT: v_mov_b32_e32 v1, 0
3113 ; CGP-NEXT: s_setpc_b64 s[30:31]
3384 ; CGP-LABEL: v_udiv_v2i64_24bit:
3385 ; CGP: ; %bb.0:
3386 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3387 ; CGP-NEXT: s_mov_b32 s6, 0xffffff
3388 ; CGP-NEXT: v_and_b32_e32 v0, s6, v0
3389 ; CGP-NEXT: v_and_b32_e32 v1, s6, v2
3390 ; CGP-NEXT: v_and_b32_e32 v2, s6, v4
3391 ; CGP-NEXT: v_and_b32_e32 v3, s6, v6
3392 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v0
3393 ; CGP-NEXT: v_cvt_f32_u32_e32 v2, v2
3394 ; CGP-NEXT: v_cvt_f32_u32_e32 v1, v1
3395 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v3
3396 ; CGP-NEXT: v_rcp_f32_e32 v4, v2
3397 ; CGP-NEXT: v_rcp_f32_e32 v5, v3
3398 ; CGP-NEXT: v_mul_f32_e32 v4, v0, v4
3399 ; CGP-NEXT: v_mul_f32_e32 v5, v1, v5
3400 ; CGP-NEXT: v_trunc_f32_e32 v4, v4
3401 ; CGP-NEXT: v_trunc_f32_e32 v5, v5
3402 ; CGP-NEXT: v_mad_f32 v0, -v4, v2, v0
3403 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
3404 ; CGP-NEXT: v_mad_f32 v1, -v5, v3, v1
3405 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
3406 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v0|, v2
3407 ; CGP-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[4:5]
3408 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v1|, v3
3409 ; CGP-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[4:5]
3410 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v4, v0
3411 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v5, v1
3412 ; CGP-NEXT: v_and_b32_e32 v0, s6, v0
3413 ; CGP-NEXT: v_and_b32_e32 v2, s6, v1
3414 ; CGP-NEXT: v_mov_b32_e32 v1, 0
3415 ; CGP-NEXT: v_mov_b32_e32 v3, 0
3416 ; CGP-NEXT: s_setpc_b64 s[30:31]