Lines Matching refs:CGP
3 …l-fp-math-f32=preserve-sign -mattr=+mad-mac-f32-insts < %s | FileCheck -check-prefixes=CHECK,CGP %s
618 ; CGP-LABEL: v_urem_v2i64:
619 ; CGP: ; %bb.0:
620 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
621 ; CGP-NEXT: v_mov_b32_e32 v8, v0
622 ; CGP-NEXT: v_mov_b32_e32 v9, v1
623 ; CGP-NEXT: v_or_b32_e32 v1, v9, v5
624 ; CGP-NEXT: v_mov_b32_e32 v0, 0
625 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
626 ; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
627 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
628 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
629 ; CGP-NEXT: s_cbranch_execz BB2_2
630 ; CGP-NEXT: ; %bb.1:
631 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
632 ; CGP-NEXT: v_cvt_f32_u32_e32 v1, v5
633 ; CGP-NEXT: v_sub_i32_e32 v10, vcc, 0, v4
634 ; CGP-NEXT: v_subb_u32_e32 v11, vcc, 0, v5, vcc
635 ; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
636 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
637 ; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
638 ; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
639 ; CGP-NEXT: v_trunc_f32_e32 v1, v1
640 ; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
641 ; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
642 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
643 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v1
644 ; CGP-NEXT: v_mul_lo_u32 v13, v10, v0
645 ; CGP-NEXT: v_mul_lo_u32 v14, v11, v0
646 ; CGP-NEXT: v_mul_hi_u32 v15, v10, v0
647 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v12
648 ; CGP-NEXT: v_mul_lo_u32 v14, v1, v13
649 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v13
650 ; CGP-NEXT: v_mul_hi_u32 v13, v1, v13
651 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
652 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v12
653 ; CGP-NEXT: v_mul_lo_u32 v17, v1, v12
654 ; CGP-NEXT: v_mul_hi_u32 v18, v0, v12
655 ; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
656 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
657 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
658 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v17, v13
659 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
660 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
661 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
662 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v18
663 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
664 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
665 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v17, v16
666 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
667 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
668 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
669 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
670 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v13
671 ; CGP-NEXT: v_addc_u32_e64 v13, s[4:5], v1, v12, vcc
672 ; CGP-NEXT: v_add_i32_e64 v1, s[4:5], v1, v12
673 ; CGP-NEXT: v_mul_lo_u32 v12, v10, v0
674 ; CGP-NEXT: v_mul_lo_u32 v11, v11, v0
675 ; CGP-NEXT: v_mul_hi_u32 v14, v10, v0
676 ; CGP-NEXT: v_mul_lo_u32 v10, v10, v13
677 ; CGP-NEXT: v_mul_lo_u32 v15, v13, v12
678 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v12
679 ; CGP-NEXT: v_mul_hi_u32 v12, v13, v12
680 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v11, v10
681 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v14
682 ; CGP-NEXT: v_mul_lo_u32 v11, v0, v10
683 ; CGP-NEXT: v_mul_lo_u32 v14, v13, v10
684 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v10
685 ; CGP-NEXT: v_mul_hi_u32 v10, v13, v10
686 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v15, v11
687 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
688 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v14, v12
689 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
690 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v16
691 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
692 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v17
693 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
694 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v13, v11
695 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v15
696 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v12, v11
697 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
698 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v13, v12
699 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v12
700 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v10, vcc
701 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v11
702 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
703 ; CGP-NEXT: v_mul_lo_u32 v10, v9, v0
704 ; CGP-NEXT: v_mul_hi_u32 v11, v8, v0
705 ; CGP-NEXT: v_mul_hi_u32 v0, v9, v0
706 ; CGP-NEXT: v_mul_lo_u32 v12, v8, v1
707 ; CGP-NEXT: v_mul_lo_u32 v13, v9, v1
708 ; CGP-NEXT: v_mul_hi_u32 v14, v8, v1
709 ; CGP-NEXT: v_mul_hi_u32 v1, v9, v1
710 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
711 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
712 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v13, v0
713 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
714 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
715 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
716 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v14
717 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
718 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
719 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v13, v11
720 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v10
721 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
722 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v11, v10
723 ; CGP-NEXT: v_mul_lo_u32 v11, v4, v0
724 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v0
725 ; CGP-NEXT: v_mul_hi_u32 v0, v4, v0
726 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v10
727 ; CGP-NEXT: v_mul_lo_u32 v1, v4, v1
728 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v12, v1
729 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v1, v0
730 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v8, v11
731 ; CGP-NEXT: v_subb_u32_e64 v10, s[4:5], v9, v0, vcc
732 ; CGP-NEXT: v_sub_i32_e64 v0, s[4:5], v9, v0
733 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v1, v4
734 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, s[4:5]
735 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v10, v5
736 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, s[4:5]
737 ; CGP-NEXT: v_subb_u32_e32 v0, vcc, v0, v5, vcc
738 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v10, v5
739 ; CGP-NEXT: v_cndmask_b32_e32 v9, v11, v9, vcc
740 ; CGP-NEXT: v_sub_i32_e32 v11, vcc, v1, v4
741 ; CGP-NEXT: v_subbrev_u32_e64 v12, s[4:5], 0, v0, vcc
742 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v11, v4
743 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, -1, s[4:5]
744 ; CGP-NEXT: v_subb_u32_e32 v0, vcc, v0, v5, vcc
745 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v12, v5
746 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, -1, vcc
747 ; CGP-NEXT: v_sub_i32_e32 v15, vcc, v11, v4
748 ; CGP-NEXT: v_subbrev_u32_e32 v0, vcc, 0, v0, vcc
749 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v12, v5
750 ; CGP-NEXT: v_cndmask_b32_e32 v5, v14, v13, vcc
751 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v5
752 ; CGP-NEXT: v_cndmask_b32_e32 v5, v11, v15, vcc
753 ; CGP-NEXT: v_cndmask_b32_e32 v11, v12, v0, vcc
754 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v9
755 ; CGP-NEXT: v_cndmask_b32_e32 v0, v1, v5, vcc
756 ; CGP-NEXT: v_cndmask_b32_e32 v1, v10, v11, vcc
757 ; CGP-NEXT: BB2_2: ; %Flow2
758 ; CGP-NEXT: s_or_saveexec_b64 s[4:5], s[6:7]
759 ; CGP-NEXT: s_xor_b64 exec, exec, s[4:5]
760 ; CGP-NEXT: s_cbranch_execz BB2_4
761 ; CGP-NEXT: ; %bb.3:
762 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v4
763 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v4
764 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
765 ; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
766 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
767 ; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
768 ; CGP-NEXT: v_mul_hi_u32 v1, v0, v1
769 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v1
770 ; CGP-NEXT: v_mul_hi_u32 v0, v8, v0
771 ; CGP-NEXT: v_mul_lo_u32 v0, v0, v4
772 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v8, v0
773 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v0, v4
774 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v0, v4
775 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
776 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v0, v4
777 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v0, v4
778 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
779 ; CGP-NEXT: v_mov_b32_e32 v1, 0
780 ; CGP-NEXT: BB2_4:
781 ; CGP-NEXT: s_or_b64 exec, exec, s[4:5]
782 ; CGP-NEXT: v_or_b32_e32 v5, v3, v7
783 ; CGP-NEXT: v_mov_b32_e32 v4, 0
784 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[4:5]
785 ; CGP-NEXT: ; implicit-def: $vgpr4_vgpr5
786 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
787 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
788 ; CGP-NEXT: s_cbranch_execz BB2_6
789 ; CGP-NEXT: ; %bb.5:
790 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, v6
791 ; CGP-NEXT: v_cvt_f32_u32_e32 v5, v7
792 ; CGP-NEXT: v_sub_i32_e32 v8, vcc, 0, v6
793 ; CGP-NEXT: v_subb_u32_e32 v9, vcc, 0, v7, vcc
794 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
795 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
796 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
797 ; CGP-NEXT: v_mul_f32_e32 v5, 0x2f800000, v4
798 ; CGP-NEXT: v_trunc_f32_e32 v5, v5
799 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v5
800 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
801 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
802 ; CGP-NEXT: v_mul_lo_u32 v10, v8, v5
803 ; CGP-NEXT: v_mul_lo_u32 v11, v8, v4
804 ; CGP-NEXT: v_mul_lo_u32 v12, v9, v4
805 ; CGP-NEXT: v_mul_hi_u32 v13, v8, v4
806 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
807 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v11
808 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v11
809 ; CGP-NEXT: v_mul_hi_u32 v11, v5, v11
810 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
811 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v10
812 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v10
813 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
814 ; CGP-NEXT: v_mul_hi_u32 v10, v5, v10
815 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
816 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
817 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
818 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
819 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
820 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
821 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v16
822 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
823 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
824 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v15, v14
825 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
826 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
827 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
828 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
829 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
830 ; CGP-NEXT: v_addc_u32_e64 v11, s[4:5], v5, v10, vcc
831 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v10
832 ; CGP-NEXT: v_mul_lo_u32 v10, v8, v4
833 ; CGP-NEXT: v_mul_lo_u32 v9, v9, v4
834 ; CGP-NEXT: v_mul_hi_u32 v12, v8, v4
835 ; CGP-NEXT: v_mul_lo_u32 v8, v8, v11
836 ; CGP-NEXT: v_mul_lo_u32 v13, v11, v10
837 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v10
838 ; CGP-NEXT: v_mul_hi_u32 v10, v11, v10
839 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v9, v8
840 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v8, v12
841 ; CGP-NEXT: v_mul_lo_u32 v9, v4, v8
842 ; CGP-NEXT: v_mul_lo_u32 v12, v11, v8
843 ; CGP-NEXT: v_mul_hi_u32 v15, v4, v8
844 ; CGP-NEXT: v_mul_hi_u32 v8, v11, v8
845 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v13, v9
846 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
847 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v12, v10
848 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
849 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v9, v14
850 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, s[4:5]
851 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v15
852 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
853 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v11, v9
854 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v12, v13
855 ; CGP-NEXT: v_add_i32_e64 v9, s[4:5], v10, v9
856 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
857 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v11, v10
858 ; CGP-NEXT: v_add_i32_e64 v8, s[4:5], v8, v10
859 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, v5, v8, vcc
860 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v9
861 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, 0, v5, vcc
862 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
863 ; CGP-NEXT: v_mul_hi_u32 v9, v2, v4
864 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
865 ; CGP-NEXT: v_mul_lo_u32 v10, v2, v5
866 ; CGP-NEXT: v_mul_lo_u32 v11, v3, v5
867 ; CGP-NEXT: v_mul_hi_u32 v12, v2, v5
868 ; CGP-NEXT: v_mul_hi_u32 v5, v3, v5
869 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
870 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
871 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v11, v4
872 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
873 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v9
874 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
875 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
876 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
877 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
878 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
879 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
880 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
881 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v9, v8
882 ; CGP-NEXT: v_mul_lo_u32 v9, v6, v4
883 ; CGP-NEXT: v_mul_lo_u32 v10, v7, v4
884 ; CGP-NEXT: v_mul_hi_u32 v4, v6, v4
885 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v8
886 ; CGP-NEXT: v_mul_lo_u32 v5, v6, v5
887 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v10, v5
888 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v5, v4
889 ; CGP-NEXT: v_sub_i32_e32 v5, vcc, v2, v9
890 ; CGP-NEXT: v_subb_u32_e64 v8, s[4:5], v3, v4, vcc
891 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v4
892 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v5, v6
893 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, -1, s[4:5]
894 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v8, v7
895 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, s[4:5]
896 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v7, vcc
897 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v8, v7
898 ; CGP-NEXT: v_cndmask_b32_e32 v4, v9, v4, vcc
899 ; CGP-NEXT: v_sub_i32_e32 v9, vcc, v5, v6
900 ; CGP-NEXT: v_subbrev_u32_e64 v10, s[4:5], 0, v3, vcc
901 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v9, v6
902 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, s[4:5]
903 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v7, vcc
904 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v10, v7
905 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
906 ; CGP-NEXT: v_sub_i32_e32 v13, vcc, v9, v6
907 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
908 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v10, v7
909 ; CGP-NEXT: v_cndmask_b32_e32 v7, v12, v11, vcc
910 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v7
911 ; CGP-NEXT: v_cndmask_b32_e32 v7, v9, v13, vcc
912 ; CGP-NEXT: v_cndmask_b32_e32 v3, v10, v3, vcc
913 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v4
914 ; CGP-NEXT: v_cndmask_b32_e32 v4, v5, v7, vcc
915 ; CGP-NEXT: v_cndmask_b32_e32 v5, v8, v3, vcc
916 ; CGP-NEXT: BB2_6: ; %Flow
917 ; CGP-NEXT: s_or_saveexec_b64 s[4:5], s[6:7]
918 ; CGP-NEXT: s_xor_b64 exec, exec, s[4:5]
919 ; CGP-NEXT: s_cbranch_execz BB2_8
920 ; CGP-NEXT: ; %bb.7:
921 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v6
922 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v6
923 ; CGP-NEXT: v_rcp_iflag_f32_e32 v3, v3
924 ; CGP-NEXT: v_mul_f32_e32 v3, 0x4f7ffffe, v3
925 ; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
926 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
927 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
928 ; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v4
929 ; CGP-NEXT: v_mul_hi_u32 v3, v2, v3
930 ; CGP-NEXT: v_mul_lo_u32 v3, v3, v6
931 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v3
932 ; CGP-NEXT: v_sub_i32_e32 v3, vcc, v2, v6
933 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v6
934 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v3, vcc
935 ; CGP-NEXT: v_sub_i32_e32 v3, vcc, v2, v6
936 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v6
937 ; CGP-NEXT: v_cndmask_b32_e32 v4, v2, v3, vcc
938 ; CGP-NEXT: v_mov_b32_e32 v5, 0
939 ; CGP-NEXT: BB2_8:
940 ; CGP-NEXT: s_or_b64 exec, exec, s[4:5]
941 ; CGP-NEXT: v_mov_b32_e32 v2, v4
942 ; CGP-NEXT: v_mov_b32_e32 v3, v5
943 ; CGP-NEXT: s_setpc_b64 s[30:31]
1344 ; CGP-LABEL: v_urem_v2i64_pow2k_denom:
1345 ; CGP: ; %bb.0:
1346 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1347 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, 0x1000
1348 ; CGP-NEXT: v_cvt_f32_ubyte0_e32 v5, 0
1349 ; CGP-NEXT: s_movk_i32 s8, 0xf000
1350 ; CGP-NEXT: s_movk_i32 s10, 0x1000
1351 ; CGP-NEXT: v_mov_b32_e32 v6, v4
1352 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
1353 ; CGP-NEXT: v_mac_f32_e32 v6, 0x4f800000, v5
1354 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
1355 ; CGP-NEXT: v_rcp_iflag_f32_e32 v5, v6
1356 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
1357 ; CGP-NEXT: v_mul_f32_e32 v5, 0x5f7ffffc, v5
1358 ; CGP-NEXT: v_mul_f32_e32 v6, 0x2f800000, v4
1359 ; CGP-NEXT: v_mul_f32_e32 v7, 0x2f800000, v5
1360 ; CGP-NEXT: v_trunc_f32_e32 v6, v6
1361 ; CGP-NEXT: v_trunc_f32_e32 v7, v7
1362 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v6
1363 ; CGP-NEXT: v_cvt_u32_f32_e32 v6, v6
1364 ; CGP-NEXT: v_mac_f32_e32 v5, 0xcf800000, v7
1365 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
1366 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
1367 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v6
1368 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
1369 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v7
1370 ; CGP-NEXT: v_mul_lo_u32 v10, s8, v4
1371 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
1372 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
1373 ; CGP-NEXT: v_mul_lo_u32 v13, s8, v5
1374 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
1375 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
1376 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
1377 ; CGP-NEXT: v_mul_lo_u32 v11, v6, v10
1378 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
1379 ; CGP-NEXT: v_mul_hi_u32 v10, v6, v10
1380 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v14, v9
1381 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v13
1382 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v13
1383 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v13
1384 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
1385 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
1386 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v8
1387 ; CGP-NEXT: v_mul_lo_u32 v15, v6, v8
1388 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
1389 ; CGP-NEXT: v_mul_hi_u32 v8, v6, v8
1390 ; CGP-NEXT: v_mul_lo_u32 v19, v5, v9
1391 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v19
1392 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
1393 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
1394 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v9
1395 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v9
1396 ; CGP-NEXT: v_mul_hi_u32 v9, v7, v9
1397 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
1398 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
1399 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v15, v10
1400 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
1401 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v13
1402 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
1403 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v16
1404 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
1405 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v18
1406 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
1407 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
1408 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v17
1409 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
1410 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
1411 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v15, v16
1412 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v19, v18
1413 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
1414 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
1415 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1416 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v15
1417 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
1418 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
1419 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v15
1420 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
1421 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
1422 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v10
1423 ; CGP-NEXT: v_addc_u32_e64 v10, s[4:5], v6, v8, vcc
1424 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v8
1425 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v4
1426 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
1427 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
1428 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v13
1429 ; CGP-NEXT: v_addc_u32_e64 v13, s[6:7], v7, v9, s[4:5]
1430 ; CGP-NEXT: v_add_i32_e64 v7, s[6:7], v7, v9
1431 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v5
1432 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
1433 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
1434 ; CGP-NEXT: v_mul_lo_u32 v16, s8, v10
1435 ; CGP-NEXT: v_mul_lo_u32 v17, v10, v8
1436 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
1437 ; CGP-NEXT: v_mul_hi_u32 v8, v10, v8
1438 ; CGP-NEXT: v_mul_lo_u32 v19, s8, v13
1439 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v16
1440 ; CGP-NEXT: v_mul_lo_u32 v16, v13, v9
1441 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v14, v19
1442 ; CGP-NEXT: v_mul_hi_u32 v19, v5, v9
1443 ; CGP-NEXT: v_mul_hi_u32 v9, v13, v9
1444 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
1445 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v14, v15
1446 ; CGP-NEXT: v_mul_lo_u32 v14, v4, v11
1447 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v12
1448 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v16, v15
1449 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[6:7]
1450 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v19
1451 ; CGP-NEXT: v_mul_lo_u32 v15, v10, v11
1452 ; CGP-NEXT: v_mul_hi_u32 v19, v4, v11
1453 ; CGP-NEXT: v_mul_hi_u32 v10, v10, v11
1454 ; CGP-NEXT: v_mul_lo_u32 v11, v13, v12
1455 ; CGP-NEXT: v_mul_hi_u32 v13, v13, v12
1456 ; CGP-NEXT: v_mul_hi_u32 v12, v5, v12
1457 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v17, v14
1458 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, s[8:9]
1459 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v15, v8
1460 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[8:9]
1461 ; CGP-NEXT: v_add_i32_e64 v9, s[8:9], v11, v9
1462 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[8:9]
1463 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v14, v18
1464 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[8:9]
1465 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v8, v19
1466 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[8:9]
1467 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, s[6:7]
1468 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v12
1469 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
1470 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v17, v14
1471 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v18
1472 ; CGP-NEXT: v_add_i32_e64 v16, s[6:7], v16, v19
1473 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
1474 ; CGP-NEXT: v_add_i32_e64 v8, s[6:7], v8, v14
1475 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
1476 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v16
1477 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[6:7]
1478 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v15, v12
1479 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v14
1480 ; CGP-NEXT: v_add_i32_e64 v10, s[6:7], v10, v12
1481 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v13, v11
1482 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, v6, v10, vcc
1483 ; CGP-NEXT: v_addc_u32_e64 v7, vcc, v7, v11, s[4:5]
1484 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
1485 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, 0, v6, vcc
1486 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
1487 ; CGP-NEXT: v_mul_hi_u32 v10, v2, v4
1488 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
1489 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
1490 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v7, vcc
1491 ; CGP-NEXT: v_mul_lo_u32 v9, v1, v5
1492 ; CGP-NEXT: v_mul_hi_u32 v11, v0, v5
1493 ; CGP-NEXT: v_mul_hi_u32 v5, v1, v5
1494 ; CGP-NEXT: v_mul_lo_u32 v12, v2, v6
1495 ; CGP-NEXT: v_mul_lo_u32 v13, v3, v6
1496 ; CGP-NEXT: v_mul_hi_u32 v14, v2, v6
1497 ; CGP-NEXT: v_mul_hi_u32 v6, v3, v6
1498 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v7
1499 ; CGP-NEXT: v_mul_lo_u32 v16, v1, v7
1500 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v7
1501 ; CGP-NEXT: v_mul_hi_u32 v7, v1, v7
1502 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
1503 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
1504 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v13, v4
1505 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
1506 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
1507 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
1508 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v16, v5
1509 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
1510 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
1511 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
1512 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v14
1513 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
1514 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
1515 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1516 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v17
1517 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
1518 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
1519 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v13, v10
1520 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v15, v9
1521 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v16, v11
1522 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
1523 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
1524 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
1525 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
1526 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
1527 ; CGP-NEXT: v_mul_lo_u32 v10, s10, v4
1528 ; CGP-NEXT: v_mul_lo_u32 v12, 0, v4
1529 ; CGP-NEXT: v_mul_hi_u32 v4, s10, v4
1530 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
1531 ; CGP-NEXT: v_mul_lo_u32 v11, s10, v5
1532 ; CGP-NEXT: v_mul_lo_u32 v13, 0, v5
1533 ; CGP-NEXT: v_mul_hi_u32 v5, s10, v5
1534 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v8
1535 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
1536 ; CGP-NEXT: v_mul_lo_u32 v6, s10, v6
1537 ; CGP-NEXT: v_mul_lo_u32 v7, s10, v7
1538 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v12, v6
1539 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v13, v7
1540 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v6, v4
1541 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v7, v5
1542 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v10
1543 ; CGP-NEXT: v_subb_u32_e64 v6, s[4:5], v3, v4, vcc
1544 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v4
1545 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s10, v2
1546 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, -1, s[4:5]
1547 ; CGP-NEXT: v_sub_i32_e64 v0, s[4:5], v0, v11
1548 ; CGP-NEXT: v_subb_u32_e64 v7, s[6:7], v1, v5, s[4:5]
1549 ; CGP-NEXT: v_sub_i32_e64 v1, s[6:7], v1, v5
1550 ; CGP-NEXT: v_cmp_le_u32_e64 s[6:7], s10, v0
1551 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, -1, s[6:7]
1552 ; CGP-NEXT: v_cmp_le_u32_e64 s[6:7], 0, v6
1553 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, -1, s[6:7]
1554 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
1555 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v7
1556 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, vcc
1557 ; CGP-NEXT: v_subbrev_u32_e64 v1, vcc, 0, v1, s[4:5]
1558 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v6
1559 ; CGP-NEXT: v_cndmask_b32_e32 v4, v8, v4, vcc
1560 ; CGP-NEXT: v_subrev_i32_e32 v8, vcc, s10, v2
1561 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
1562 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v8
1563 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, vcc
1564 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v7
1565 ; CGP-NEXT: v_cndmask_b32_e32 v5, v9, v5, vcc
1566 ; CGP-NEXT: v_subrev_i32_e32 v9, vcc, s10, v0
1567 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
1568 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v9
1569 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
1570 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v3
1571 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
1572 ; CGP-NEXT: v_subrev_i32_e32 v13, vcc, s10, v8
1573 ; CGP-NEXT: v_subbrev_u32_e32 v14, vcc, 0, v3, vcc
1574 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v1
1575 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, -1, vcc
1576 ; CGP-NEXT: v_subrev_i32_e32 v16, vcc, s10, v9
1577 ; CGP-NEXT: v_subbrev_u32_e32 v17, vcc, 0, v1, vcc
1578 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
1579 ; CGP-NEXT: v_cndmask_b32_e32 v10, v12, v10, vcc
1580 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
1581 ; CGP-NEXT: v_cndmask_b32_e32 v11, v15, v11, vcc
1582 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v10
1583 ; CGP-NEXT: v_cndmask_b32_e32 v8, v8, v13, vcc
1584 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v11
1585 ; CGP-NEXT: v_cndmask_b32_e64 v9, v9, v16, s[4:5]
1586 ; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v14, vcc
1587 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v4
1588 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v8, vcc
1589 ; CGP-NEXT: v_cndmask_b32_e64 v1, v1, v17, s[4:5]
1590 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v5
1591 ; CGP-NEXT: v_cndmask_b32_e64 v0, v0, v9, s[4:5]
1592 ; CGP-NEXT: v_cndmask_b32_e64 v1, v7, v1, s[4:5]
1593 ; CGP-NEXT: v_cndmask_b32_e32 v3, v6, v3, vcc
1594 ; CGP-NEXT: s_setpc_b64 s[30:31]
1995 ; CGP-LABEL: v_urem_v2i64_oddk_denom:
1996 ; CGP: ; %bb.0:
1997 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
1998 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, 0x12d8fb
1999 ; CGP-NEXT: v_cvt_f32_ubyte0_e32 v5, 0
2000 ; CGP-NEXT: s_mov_b32 s8, 0xffed2705
2001 ; CGP-NEXT: s_mov_b32 s10, 0x12d8fb
2002 ; CGP-NEXT: v_mov_b32_e32 v6, v4
2003 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
2004 ; CGP-NEXT: v_mac_f32_e32 v6, 0x4f800000, v5
2005 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
2006 ; CGP-NEXT: v_rcp_iflag_f32_e32 v5, v6
2007 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
2008 ; CGP-NEXT: v_mul_f32_e32 v5, 0x5f7ffffc, v5
2009 ; CGP-NEXT: v_mul_f32_e32 v6, 0x2f800000, v4
2010 ; CGP-NEXT: v_mul_f32_e32 v7, 0x2f800000, v5
2011 ; CGP-NEXT: v_trunc_f32_e32 v6, v6
2012 ; CGP-NEXT: v_trunc_f32_e32 v7, v7
2013 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v6
2014 ; CGP-NEXT: v_cvt_u32_f32_e32 v6, v6
2015 ; CGP-NEXT: v_mac_f32_e32 v5, 0xcf800000, v7
2016 ; CGP-NEXT: v_cvt_u32_f32_e32 v7, v7
2017 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
2018 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v6
2019 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
2020 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v7
2021 ; CGP-NEXT: v_mul_lo_u32 v10, s8, v4
2022 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
2023 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
2024 ; CGP-NEXT: v_mul_lo_u32 v13, s8, v5
2025 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
2026 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
2027 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v11, v8
2028 ; CGP-NEXT: v_mul_lo_u32 v11, v6, v10
2029 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
2030 ; CGP-NEXT: v_mul_hi_u32 v10, v6, v10
2031 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v14, v9
2032 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v13
2033 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v13
2034 ; CGP-NEXT: v_mul_hi_u32 v13, v7, v13
2035 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
2036 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
2037 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v8
2038 ; CGP-NEXT: v_mul_lo_u32 v15, v6, v8
2039 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
2040 ; CGP-NEXT: v_mul_hi_u32 v8, v6, v8
2041 ; CGP-NEXT: v_mul_lo_u32 v19, v5, v9
2042 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v19
2043 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, vcc
2044 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
2045 ; CGP-NEXT: v_mul_lo_u32 v14, v7, v9
2046 ; CGP-NEXT: v_mul_hi_u32 v17, v5, v9
2047 ; CGP-NEXT: v_mul_hi_u32 v9, v7, v9
2048 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v12
2049 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2050 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v15, v10
2051 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
2052 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v13
2053 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
2054 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v11, v16
2055 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
2056 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v18
2057 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[4:5]
2058 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, vcc
2059 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v17
2060 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
2061 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
2062 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v15, v16
2063 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v19, v18
2064 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v17
2065 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v11
2066 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2067 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v15
2068 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2069 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v12, v11
2070 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v15
2071 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v11
2072 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v12
2073 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v10
2074 ; CGP-NEXT: v_addc_u32_e64 v10, s[4:5], v6, v8, vcc
2075 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v8
2076 ; CGP-NEXT: v_mul_lo_u32 v8, s8, v4
2077 ; CGP-NEXT: v_mul_lo_u32 v11, -1, v4
2078 ; CGP-NEXT: v_mul_hi_u32 v12, s8, v4
2079 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v13
2080 ; CGP-NEXT: v_addc_u32_e64 v13, s[6:7], v7, v9, s[4:5]
2081 ; CGP-NEXT: v_add_i32_e64 v7, s[6:7], v7, v9
2082 ; CGP-NEXT: v_mul_lo_u32 v9, s8, v5
2083 ; CGP-NEXT: v_mul_lo_u32 v14, -1, v5
2084 ; CGP-NEXT: v_mul_hi_u32 v15, s8, v5
2085 ; CGP-NEXT: v_mul_lo_u32 v16, s8, v10
2086 ; CGP-NEXT: v_mul_lo_u32 v17, v10, v8
2087 ; CGP-NEXT: v_mul_hi_u32 v18, v4, v8
2088 ; CGP-NEXT: v_mul_hi_u32 v8, v10, v8
2089 ; CGP-NEXT: v_mul_lo_u32 v19, s8, v13
2090 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v16
2091 ; CGP-NEXT: v_mul_lo_u32 v16, v13, v9
2092 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v14, v19
2093 ; CGP-NEXT: v_mul_hi_u32 v19, v5, v9
2094 ; CGP-NEXT: v_mul_hi_u32 v9, v13, v9
2095 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
2096 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v14, v15
2097 ; CGP-NEXT: v_mul_lo_u32 v14, v4, v11
2098 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v12
2099 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v16, v15
2100 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, s[6:7]
2101 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v19
2102 ; CGP-NEXT: v_mul_lo_u32 v15, v10, v11
2103 ; CGP-NEXT: v_mul_hi_u32 v19, v4, v11
2104 ; CGP-NEXT: v_mul_hi_u32 v10, v10, v11
2105 ; CGP-NEXT: v_mul_lo_u32 v11, v13, v12
2106 ; CGP-NEXT: v_mul_hi_u32 v13, v13, v12
2107 ; CGP-NEXT: v_mul_hi_u32 v12, v5, v12
2108 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v17, v14
2109 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, s[8:9]
2110 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v15, v8
2111 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[8:9]
2112 ; CGP-NEXT: v_add_i32_e64 v9, s[8:9], v11, v9
2113 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[8:9]
2114 ; CGP-NEXT: v_add_i32_e64 v14, s[8:9], v14, v18
2115 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[8:9]
2116 ; CGP-NEXT: v_add_i32_e64 v8, s[8:9], v8, v19
2117 ; CGP-NEXT: v_cndmask_b32_e64 v18, 0, 1, s[8:9]
2118 ; CGP-NEXT: v_cndmask_b32_e64 v19, 0, 1, s[6:7]
2119 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v12
2120 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
2121 ; CGP-NEXT: v_add_i32_e64 v14, s[6:7], v17, v14
2122 ; CGP-NEXT: v_add_i32_e64 v15, s[6:7], v15, v18
2123 ; CGP-NEXT: v_add_i32_e64 v16, s[6:7], v16, v19
2124 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v12
2125 ; CGP-NEXT: v_add_i32_e64 v8, s[6:7], v8, v14
2126 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[6:7]
2127 ; CGP-NEXT: v_add_i32_e64 v9, s[6:7], v9, v16
2128 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[6:7]
2129 ; CGP-NEXT: v_add_i32_e64 v12, s[6:7], v15, v12
2130 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v11, v14
2131 ; CGP-NEXT: v_add_i32_e64 v10, s[6:7], v10, v12
2132 ; CGP-NEXT: v_add_i32_e64 v11, s[6:7], v13, v11
2133 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, v6, v10, vcc
2134 ; CGP-NEXT: v_addc_u32_e64 v7, vcc, v7, v11, s[4:5]
2135 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
2136 ; CGP-NEXT: v_addc_u32_e32 v6, vcc, 0, v6, vcc
2137 ; CGP-NEXT: v_mul_lo_u32 v8, v3, v4
2138 ; CGP-NEXT: v_mul_hi_u32 v10, v2, v4
2139 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
2140 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
2141 ; CGP-NEXT: v_addc_u32_e32 v7, vcc, 0, v7, vcc
2142 ; CGP-NEXT: v_mul_lo_u32 v9, v1, v5
2143 ; CGP-NEXT: v_mul_hi_u32 v11, v0, v5
2144 ; CGP-NEXT: v_mul_hi_u32 v5, v1, v5
2145 ; CGP-NEXT: v_mul_lo_u32 v12, v2, v6
2146 ; CGP-NEXT: v_mul_lo_u32 v13, v3, v6
2147 ; CGP-NEXT: v_mul_hi_u32 v14, v2, v6
2148 ; CGP-NEXT: v_mul_hi_u32 v6, v3, v6
2149 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v7
2150 ; CGP-NEXT: v_mul_lo_u32 v16, v1, v7
2151 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v7
2152 ; CGP-NEXT: v_mul_hi_u32 v7, v1, v7
2153 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v12
2154 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2155 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v13, v4
2156 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2157 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v15
2158 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2159 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v16, v5
2160 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
2161 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v8, v10
2162 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
2163 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v14
2164 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2165 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v9, v11
2166 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2167 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v17
2168 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2169 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v12, v8
2170 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v13, v10
2171 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v15, v9
2172 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v16, v11
2173 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v8
2174 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, 1, vcc
2175 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v9
2176 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, 1, vcc
2177 ; CGP-NEXT: v_add_i32_e32 v8, vcc, v10, v8
2178 ; CGP-NEXT: v_mul_lo_u32 v10, s10, v4
2179 ; CGP-NEXT: v_mul_lo_u32 v12, 0, v4
2180 ; CGP-NEXT: v_mul_hi_u32 v4, s10, v4
2181 ; CGP-NEXT: v_add_i32_e32 v9, vcc, v11, v9
2182 ; CGP-NEXT: v_mul_lo_u32 v11, s10, v5
2183 ; CGP-NEXT: v_mul_lo_u32 v13, 0, v5
2184 ; CGP-NEXT: v_mul_hi_u32 v5, s10, v5
2185 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v8
2186 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v7, v9
2187 ; CGP-NEXT: v_mul_lo_u32 v6, s10, v6
2188 ; CGP-NEXT: v_mul_lo_u32 v7, s10, v7
2189 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v12, v6
2190 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v13, v7
2191 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v6, v4
2192 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v7, v5
2193 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v10
2194 ; CGP-NEXT: v_subb_u32_e64 v6, s[4:5], v3, v4, vcc
2195 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v4
2196 ; CGP-NEXT: v_cmp_le_u32_e64 s[4:5], s10, v2
2197 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, -1, s[4:5]
2198 ; CGP-NEXT: v_sub_i32_e64 v0, s[4:5], v0, v11
2199 ; CGP-NEXT: v_subb_u32_e64 v7, s[6:7], v1, v5, s[4:5]
2200 ; CGP-NEXT: v_sub_i32_e64 v1, s[6:7], v1, v5
2201 ; CGP-NEXT: v_cmp_le_u32_e64 s[6:7], s10, v0
2202 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, -1, s[6:7]
2203 ; CGP-NEXT: v_cmp_le_u32_e64 s[6:7], 0, v6
2204 ; CGP-NEXT: v_cndmask_b32_e64 v8, 0, -1, s[6:7]
2205 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2206 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v7
2207 ; CGP-NEXT: v_cndmask_b32_e64 v9, 0, -1, vcc
2208 ; CGP-NEXT: v_subbrev_u32_e64 v1, vcc, 0, v1, s[4:5]
2209 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v6
2210 ; CGP-NEXT: v_cndmask_b32_e32 v4, v8, v4, vcc
2211 ; CGP-NEXT: v_subrev_i32_e32 v8, vcc, s10, v2
2212 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2213 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v8
2214 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, -1, vcc
2215 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v7
2216 ; CGP-NEXT: v_cndmask_b32_e32 v5, v9, v5, vcc
2217 ; CGP-NEXT: v_subrev_i32_e32 v9, vcc, s10, v0
2218 ; CGP-NEXT: v_subbrev_u32_e32 v1, vcc, 0, v1, vcc
2219 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, s10, v9
2220 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, vcc
2221 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v3
2222 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
2223 ; CGP-NEXT: v_subrev_i32_e32 v13, vcc, s10, v8
2224 ; CGP-NEXT: v_subbrev_u32_e32 v14, vcc, 0, v3, vcc
2225 ; CGP-NEXT: v_cmp_le_u32_e32 vcc, 0, v1
2226 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, -1, vcc
2227 ; CGP-NEXT: v_subrev_i32_e32 v16, vcc, s10, v9
2228 ; CGP-NEXT: v_subbrev_u32_e32 v17, vcc, 0, v1, vcc
2229 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v3
2230 ; CGP-NEXT: v_cndmask_b32_e32 v10, v12, v10, vcc
2231 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, 0, v1
2232 ; CGP-NEXT: v_cndmask_b32_e32 v11, v15, v11, vcc
2233 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v10
2234 ; CGP-NEXT: v_cndmask_b32_e32 v8, v8, v13, vcc
2235 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v11
2236 ; CGP-NEXT: v_cndmask_b32_e64 v9, v9, v16, s[4:5]
2237 ; CGP-NEXT: v_cndmask_b32_e32 v3, v3, v14, vcc
2238 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v4
2239 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v8, vcc
2240 ; CGP-NEXT: v_cndmask_b32_e64 v1, v1, v17, s[4:5]
2241 ; CGP-NEXT: v_cmp_ne_u32_e64 s[4:5], 0, v5
2242 ; CGP-NEXT: v_cndmask_b32_e64 v0, v0, v9, s[4:5]
2243 ; CGP-NEXT: v_cndmask_b32_e64 v1, v7, v1, s[4:5]
2244 ; CGP-NEXT: v_cndmask_b32_e32 v3, v6, v3, vcc
2245 ; CGP-NEXT: s_setpc_b64 s[30:31]
2686 ; CGP-LABEL: v_urem_v2i64_pow2_shl_denom:
2687 ; CGP: ; %bb.0:
2688 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
2689 ; CGP-NEXT: v_mov_b32_e32 v5, v0
2690 ; CGP-NEXT: v_mov_b32_e32 v7, v1
2691 ; CGP-NEXT: s_movk_i32 s4, 0x1000
2692 ; CGP-NEXT: s_mov_b32 s5, 0
2693 ; CGP-NEXT: v_lshl_b64 v[10:11], s[4:5], v4
2694 ; CGP-NEXT: v_lshl_b64 v[8:9], s[4:5], v6
2695 ; CGP-NEXT: v_or_b32_e32 v1, v7, v11
2696 ; CGP-NEXT: v_mov_b32_e32 v0, 0
2697 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[0:1]
2698 ; CGP-NEXT: ; implicit-def: $vgpr0_vgpr1
2699 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
2700 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
2701 ; CGP-NEXT: s_cbranch_execz BB8_2
2702 ; CGP-NEXT: ; %bb.1:
2703 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v10
2704 ; CGP-NEXT: v_cvt_f32_u32_e32 v1, v11
2705 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v10
2706 ; CGP-NEXT: v_subb_u32_e32 v6, vcc, 0, v11, vcc
2707 ; CGP-NEXT: v_mac_f32_e32 v0, 0x4f800000, v1
2708 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
2709 ; CGP-NEXT: v_mul_f32_e32 v0, 0x5f7ffffc, v0
2710 ; CGP-NEXT: v_mul_f32_e32 v1, 0x2f800000, v0
2711 ; CGP-NEXT: v_trunc_f32_e32 v1, v1
2712 ; CGP-NEXT: v_mac_f32_e32 v0, 0xcf800000, v1
2713 ; CGP-NEXT: v_cvt_u32_f32_e32 v1, v1
2714 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
2715 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v1
2716 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v0
2717 ; CGP-NEXT: v_mul_lo_u32 v14, v6, v0
2718 ; CGP-NEXT: v_mul_hi_u32 v15, v4, v0
2719 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v14, v12
2720 ; CGP-NEXT: v_mul_lo_u32 v14, v1, v13
2721 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v13
2722 ; CGP-NEXT: v_mul_hi_u32 v13, v1, v13
2723 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v15
2724 ; CGP-NEXT: v_mul_lo_u32 v15, v0, v12
2725 ; CGP-NEXT: v_mul_lo_u32 v17, v1, v12
2726 ; CGP-NEXT: v_mul_hi_u32 v18, v0, v12
2727 ; CGP-NEXT: v_mul_hi_u32 v12, v1, v12
2728 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v15
2729 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2730 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v17, v13
2731 ; CGP-NEXT: v_cndmask_b32_e64 v17, 0, 1, vcc
2732 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v14, v16
2733 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
2734 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v18
2735 ; CGP-NEXT: v_cndmask_b32_e64 v16, 0, 1, vcc
2736 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
2737 ; CGP-NEXT: v_add_i32_e32 v15, vcc, v17, v16
2738 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v13, v14
2739 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
2740 ; CGP-NEXT: v_add_i32_e32 v14, vcc, v15, v14
2741 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
2742 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v13
2743 ; CGP-NEXT: v_addc_u32_e64 v13, s[4:5], v1, v12, vcc
2744 ; CGP-NEXT: v_add_i32_e64 v1, s[4:5], v1, v12
2745 ; CGP-NEXT: v_mul_lo_u32 v12, v4, v0
2746 ; CGP-NEXT: v_mul_lo_u32 v6, v6, v0
2747 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v0
2748 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v13
2749 ; CGP-NEXT: v_mul_lo_u32 v15, v13, v12
2750 ; CGP-NEXT: v_mul_hi_u32 v16, v0, v12
2751 ; CGP-NEXT: v_mul_hi_u32 v12, v13, v12
2752 ; CGP-NEXT: v_add_i32_e64 v4, s[4:5], v6, v4
2753 ; CGP-NEXT: v_add_i32_e64 v4, s[4:5], v4, v14
2754 ; CGP-NEXT: v_mul_lo_u32 v6, v0, v4
2755 ; CGP-NEXT: v_mul_lo_u32 v14, v13, v4
2756 ; CGP-NEXT: v_mul_hi_u32 v17, v0, v4
2757 ; CGP-NEXT: v_mul_hi_u32 v4, v13, v4
2758 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v15, v6
2759 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2760 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v14, v12
2761 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, s[4:5]
2762 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v16
2763 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, s[4:5]
2764 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v12, v17
2765 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, s[4:5]
2766 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v13, v6
2767 ; CGP-NEXT: v_add_i32_e64 v13, s[4:5], v14, v15
2768 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v12, v6
2769 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2770 ; CGP-NEXT: v_add_i32_e64 v12, s[4:5], v13, v12
2771 ; CGP-NEXT: v_add_i32_e64 v4, s[4:5], v4, v12
2772 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, v1, v4, vcc
2773 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v6
2774 ; CGP-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc
2775 ; CGP-NEXT: v_mul_lo_u32 v4, v7, v0
2776 ; CGP-NEXT: v_mul_hi_u32 v6, v5, v0
2777 ; CGP-NEXT: v_mul_hi_u32 v0, v7, v0
2778 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v1
2779 ; CGP-NEXT: v_mul_lo_u32 v13, v7, v1
2780 ; CGP-NEXT: v_mul_hi_u32 v14, v5, v1
2781 ; CGP-NEXT: v_mul_hi_u32 v1, v7, v1
2782 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
2783 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2784 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v13, v0
2785 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2786 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v6
2787 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, 1, vcc
2788 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v14
2789 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, vcc
2790 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v12, v4
2791 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v13, v6
2792 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v4
2793 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, 1, vcc
2794 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v6, v4
2795 ; CGP-NEXT: v_mul_lo_u32 v6, v10, v0
2796 ; CGP-NEXT: v_mul_lo_u32 v12, v11, v0
2797 ; CGP-NEXT: v_mul_hi_u32 v0, v10, v0
2798 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v1, v4
2799 ; CGP-NEXT: v_mul_lo_u32 v1, v10, v1
2800 ; CGP-NEXT: v_add_i32_e32 v1, vcc, v12, v1
2801 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v1, v0
2802 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v5, v6
2803 ; CGP-NEXT: v_subb_u32_e64 v4, s[4:5], v7, v0, vcc
2804 ; CGP-NEXT: v_sub_i32_e64 v0, s[4:5], v7, v0
2805 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v1, v10
2806 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, -1, s[4:5]
2807 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v4, v11
2808 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, -1, s[4:5]
2809 ; CGP-NEXT: v_subb_u32_e32 v0, vcc, v0, v11, vcc
2810 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v4, v11
2811 ; CGP-NEXT: v_cndmask_b32_e32 v6, v7, v6, vcc
2812 ; CGP-NEXT: v_sub_i32_e32 v7, vcc, v1, v10
2813 ; CGP-NEXT: v_subbrev_u32_e64 v12, s[4:5], 0, v0, vcc
2814 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v7, v10
2815 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, -1, s[4:5]
2816 ; CGP-NEXT: v_subb_u32_e32 v0, vcc, v0, v11, vcc
2817 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v12, v11
2818 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, -1, vcc
2819 ; CGP-NEXT: v_sub_i32_e32 v15, vcc, v7, v10
2820 ; CGP-NEXT: v_subbrev_u32_e32 v0, vcc, 0, v0, vcc
2821 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v12, v11
2822 ; CGP-NEXT: v_cndmask_b32_e32 v11, v14, v13, vcc
2823 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v11
2824 ; CGP-NEXT: v_cndmask_b32_e32 v7, v7, v15, vcc
2825 ; CGP-NEXT: v_cndmask_b32_e32 v11, v12, v0, vcc
2826 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v6
2827 ; CGP-NEXT: v_cndmask_b32_e32 v0, v1, v7, vcc
2828 ; CGP-NEXT: v_cndmask_b32_e32 v1, v4, v11, vcc
2829 ; CGP-NEXT: BB8_2: ; %Flow2
2830 ; CGP-NEXT: s_or_saveexec_b64 s[4:5], s[6:7]
2831 ; CGP-NEXT: s_xor_b64 exec, exec, s[4:5]
2832 ; CGP-NEXT: s_cbranch_execz BB8_4
2833 ; CGP-NEXT: ; %bb.3:
2834 ; CGP-NEXT: v_cvt_f32_u32_e32 v0, v10
2835 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, 0, v10
2836 ; CGP-NEXT: v_rcp_iflag_f32_e32 v0, v0
2837 ; CGP-NEXT: v_mul_f32_e32 v0, 0x4f7ffffe, v0
2838 ; CGP-NEXT: v_cvt_u32_f32_e32 v0, v0
2839 ; CGP-NEXT: v_mul_lo_u32 v1, v1, v0
2840 ; CGP-NEXT: v_mul_hi_u32 v1, v0, v1
2841 ; CGP-NEXT: v_add_i32_e32 v0, vcc, v0, v1
2842 ; CGP-NEXT: v_mul_hi_u32 v0, v5, v0
2843 ; CGP-NEXT: v_mul_lo_u32 v0, v0, v10
2844 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v5, v0
2845 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v0, v10
2846 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v0, v10
2847 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
2848 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v0, v10
2849 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v0, v10
2850 ; CGP-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
2851 ; CGP-NEXT: v_mov_b32_e32 v1, 0
2852 ; CGP-NEXT: BB8_4:
2853 ; CGP-NEXT: s_or_b64 exec, exec, s[4:5]
2854 ; CGP-NEXT: v_or_b32_e32 v5, v3, v9
2855 ; CGP-NEXT: v_mov_b32_e32 v4, 0
2856 ; CGP-NEXT: v_cmp_ne_u64_e32 vcc, 0, v[4:5]
2857 ; CGP-NEXT: ; implicit-def: $vgpr4_vgpr5
2858 ; CGP-NEXT: s_and_saveexec_b64 s[4:5], vcc
2859 ; CGP-NEXT: s_xor_b64 s[6:7], exec, s[4:5]
2860 ; CGP-NEXT: s_cbranch_execz BB8_6
2861 ; CGP-NEXT: ; %bb.5:
2862 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, v8
2863 ; CGP-NEXT: v_cvt_f32_u32_e32 v5, v9
2864 ; CGP-NEXT: v_sub_i32_e32 v6, vcc, 0, v8
2865 ; CGP-NEXT: v_subb_u32_e32 v7, vcc, 0, v9, vcc
2866 ; CGP-NEXT: v_mac_f32_e32 v4, 0x4f800000, v5
2867 ; CGP-NEXT: v_rcp_iflag_f32_e32 v4, v4
2868 ; CGP-NEXT: v_mul_f32_e32 v4, 0x5f7ffffc, v4
2869 ; CGP-NEXT: v_mul_f32_e32 v5, 0x2f800000, v4
2870 ; CGP-NEXT: v_trunc_f32_e32 v5, v5
2871 ; CGP-NEXT: v_mac_f32_e32 v4, 0xcf800000, v5
2872 ; CGP-NEXT: v_cvt_u32_f32_e32 v5, v5
2873 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
2874 ; CGP-NEXT: v_mul_lo_u32 v10, v6, v5
2875 ; CGP-NEXT: v_mul_lo_u32 v11, v6, v4
2876 ; CGP-NEXT: v_mul_lo_u32 v12, v7, v4
2877 ; CGP-NEXT: v_mul_hi_u32 v13, v6, v4
2878 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v12, v10
2879 ; CGP-NEXT: v_mul_lo_u32 v12, v5, v11
2880 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v11
2881 ; CGP-NEXT: v_mul_hi_u32 v11, v5, v11
2882 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v13
2883 ; CGP-NEXT: v_mul_lo_u32 v13, v4, v10
2884 ; CGP-NEXT: v_mul_lo_u32 v15, v5, v10
2885 ; CGP-NEXT: v_mul_hi_u32 v16, v4, v10
2886 ; CGP-NEXT: v_mul_hi_u32 v10, v5, v10
2887 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v13
2888 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, vcc
2889 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v15, v11
2890 ; CGP-NEXT: v_cndmask_b32_e64 v15, 0, 1, vcc
2891 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v12, v14
2892 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2893 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v16
2894 ; CGP-NEXT: v_cndmask_b32_e64 v14, 0, 1, vcc
2895 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
2896 ; CGP-NEXT: v_add_i32_e32 v13, vcc, v15, v14
2897 ; CGP-NEXT: v_add_i32_e32 v11, vcc, v11, v12
2898 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, vcc
2899 ; CGP-NEXT: v_add_i32_e32 v12, vcc, v13, v12
2900 ; CGP-NEXT: v_add_i32_e32 v10, vcc, v10, v12
2901 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v11
2902 ; CGP-NEXT: v_addc_u32_e64 v11, s[4:5], v5, v10, vcc
2903 ; CGP-NEXT: v_add_i32_e64 v5, s[4:5], v5, v10
2904 ; CGP-NEXT: v_mul_lo_u32 v10, v6, v4
2905 ; CGP-NEXT: v_mul_lo_u32 v7, v7, v4
2906 ; CGP-NEXT: v_mul_hi_u32 v12, v6, v4
2907 ; CGP-NEXT: v_mul_lo_u32 v6, v6, v11
2908 ; CGP-NEXT: v_mul_lo_u32 v13, v11, v10
2909 ; CGP-NEXT: v_mul_hi_u32 v14, v4, v10
2910 ; CGP-NEXT: v_mul_hi_u32 v10, v11, v10
2911 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v7, v6
2912 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v12
2913 ; CGP-NEXT: v_mul_lo_u32 v7, v4, v6
2914 ; CGP-NEXT: v_mul_lo_u32 v12, v11, v6
2915 ; CGP-NEXT: v_mul_hi_u32 v15, v4, v6
2916 ; CGP-NEXT: v_mul_hi_u32 v6, v11, v6
2917 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v13, v7
2918 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, s[4:5]
2919 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v12, v10
2920 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, 1, s[4:5]
2921 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v7, v14
2922 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, 1, s[4:5]
2923 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v10, v15
2924 ; CGP-NEXT: v_cndmask_b32_e64 v13, 0, 1, s[4:5]
2925 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v11, v7
2926 ; CGP-NEXT: v_add_i32_e64 v11, s[4:5], v12, v13
2927 ; CGP-NEXT: v_add_i32_e64 v7, s[4:5], v10, v7
2928 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, s[4:5]
2929 ; CGP-NEXT: v_add_i32_e64 v10, s[4:5], v11, v10
2930 ; CGP-NEXT: v_add_i32_e64 v6, s[4:5], v6, v10
2931 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, v5, v6, vcc
2932 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v7
2933 ; CGP-NEXT: v_addc_u32_e32 v5, vcc, 0, v5, vcc
2934 ; CGP-NEXT: v_mul_lo_u32 v6, v3, v4
2935 ; CGP-NEXT: v_mul_hi_u32 v7, v2, v4
2936 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
2937 ; CGP-NEXT: v_mul_lo_u32 v10, v2, v5
2938 ; CGP-NEXT: v_mul_lo_u32 v11, v3, v5
2939 ; CGP-NEXT: v_mul_hi_u32 v12, v2, v5
2940 ; CGP-NEXT: v_mul_hi_u32 v5, v3, v5
2941 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v10
2942 ; CGP-NEXT: v_cndmask_b32_e64 v10, 0, 1, vcc
2943 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v11, v4
2944 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, 1, vcc
2945 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v6, v7
2946 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, vcc
2947 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v12
2948 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, 1, vcc
2949 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v10, v6
2950 ; CGP-NEXT: v_add_i32_e32 v7, vcc, v11, v7
2951 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v4, v6
2952 ; CGP-NEXT: v_cndmask_b32_e64 v6, 0, 1, vcc
2953 ; CGP-NEXT: v_add_i32_e32 v6, vcc, v7, v6
2954 ; CGP-NEXT: v_mul_lo_u32 v7, v8, v4
2955 ; CGP-NEXT: v_mul_lo_u32 v10, v9, v4
2956 ; CGP-NEXT: v_mul_hi_u32 v4, v8, v4
2957 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v5, v6
2958 ; CGP-NEXT: v_mul_lo_u32 v5, v8, v5
2959 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v10, v5
2960 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v5, v4
2961 ; CGP-NEXT: v_sub_i32_e32 v5, vcc, v2, v7
2962 ; CGP-NEXT: v_subb_u32_e64 v6, s[4:5], v3, v4, vcc
2963 ; CGP-NEXT: v_sub_i32_e64 v3, s[4:5], v3, v4
2964 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v5, v8
2965 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, -1, s[4:5]
2966 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v6, v9
2967 ; CGP-NEXT: v_cndmask_b32_e64 v7, 0, -1, s[4:5]
2968 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v9, vcc
2969 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v6, v9
2970 ; CGP-NEXT: v_cndmask_b32_e32 v4, v7, v4, vcc
2971 ; CGP-NEXT: v_sub_i32_e32 v7, vcc, v5, v8
2972 ; CGP-NEXT: v_subbrev_u32_e64 v10, s[4:5], 0, v3, vcc
2973 ; CGP-NEXT: v_cmp_ge_u32_e64 s[4:5], v7, v8
2974 ; CGP-NEXT: v_cndmask_b32_e64 v11, 0, -1, s[4:5]
2975 ; CGP-NEXT: v_subb_u32_e32 v3, vcc, v3, v9, vcc
2976 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v10, v9
2977 ; CGP-NEXT: v_cndmask_b32_e64 v12, 0, -1, vcc
2978 ; CGP-NEXT: v_sub_i32_e32 v13, vcc, v7, v8
2979 ; CGP-NEXT: v_subbrev_u32_e32 v3, vcc, 0, v3, vcc
2980 ; CGP-NEXT: v_cmp_eq_u32_e32 vcc, v10, v9
2981 ; CGP-NEXT: v_cndmask_b32_e32 v9, v12, v11, vcc
2982 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v9
2983 ; CGP-NEXT: v_cndmask_b32_e32 v7, v7, v13, vcc
2984 ; CGP-NEXT: v_cndmask_b32_e32 v3, v10, v3, vcc
2985 ; CGP-NEXT: v_cmp_ne_u32_e32 vcc, 0, v4
2986 ; CGP-NEXT: v_cndmask_b32_e32 v4, v5, v7, vcc
2987 ; CGP-NEXT: v_cndmask_b32_e32 v5, v6, v3, vcc
2988 ; CGP-NEXT: BB8_6: ; %Flow
2989 ; CGP-NEXT: s_or_saveexec_b64 s[4:5], s[6:7]
2990 ; CGP-NEXT: s_xor_b64 exec, exec, s[4:5]
2991 ; CGP-NEXT: s_cbranch_execz BB8_8
2992 ; CGP-NEXT: ; %bb.7:
2993 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v8
2994 ; CGP-NEXT: v_sub_i32_e32 v4, vcc, 0, v8
2995 ; CGP-NEXT: v_rcp_iflag_f32_e32 v3, v3
2996 ; CGP-NEXT: v_mul_f32_e32 v3, 0x4f7ffffe, v3
2997 ; CGP-NEXT: v_cvt_u32_f32_e32 v3, v3
2998 ; CGP-NEXT: v_mul_lo_u32 v4, v4, v3
2999 ; CGP-NEXT: v_mul_hi_u32 v4, v3, v4
3000 ; CGP-NEXT: v_add_i32_e32 v3, vcc, v3, v4
3001 ; CGP-NEXT: v_mul_hi_u32 v3, v2, v3
3002 ; CGP-NEXT: v_mul_lo_u32 v3, v3, v8
3003 ; CGP-NEXT: v_sub_i32_e32 v2, vcc, v2, v3
3004 ; CGP-NEXT: v_sub_i32_e32 v3, vcc, v2, v8
3005 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v8
3006 ; CGP-NEXT: v_cndmask_b32_e32 v2, v2, v3, vcc
3007 ; CGP-NEXT: v_sub_i32_e32 v3, vcc, v2, v8
3008 ; CGP-NEXT: v_cmp_ge_u32_e32 vcc, v2, v8
3009 ; CGP-NEXT: v_cndmask_b32_e32 v4, v2, v3, vcc
3010 ; CGP-NEXT: v_mov_b32_e32 v5, 0
3011 ; CGP-NEXT: BB8_8:
3012 ; CGP-NEXT: s_or_b64 exec, exec, s[4:5]
3013 ; CGP-NEXT: v_mov_b32_e32 v2, v4
3014 ; CGP-NEXT: v_mov_b32_e32 v3, v5
3015 ; CGP-NEXT: s_setpc_b64 s[30:31]
3048 ; CGP-LABEL: v_urem_i64_24bit:
3049 ; CGP: ; %bb.0:
3050 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3051 ; CGP-NEXT: s_mov_b32 s4, 0xffffff
3052 ; CGP-NEXT: v_and_b32_e32 v0, s4, v0
3053 ; CGP-NEXT: v_and_b32_e32 v1, s4, v2
3054 ; CGP-NEXT: v_cvt_f32_u32_e32 v2, v0
3055 ; CGP-NEXT: v_cvt_f32_u32_e32 v3, v1
3056 ; CGP-NEXT: v_rcp_f32_e32 v4, v3
3057 ; CGP-NEXT: v_mul_f32_e32 v4, v2, v4
3058 ; CGP-NEXT: v_trunc_f32_e32 v4, v4
3059 ; CGP-NEXT: v_mad_f32 v2, -v4, v3, v2
3060 ; CGP-NEXT: v_cvt_u32_f32_e32 v4, v4
3061 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v2|, v3
3062 ; CGP-NEXT: v_cndmask_b32_e64 v2, 0, 1, s[4:5]
3063 ; CGP-NEXT: v_add_i32_e32 v2, vcc, v4, v2
3064 ; CGP-NEXT: v_mul_lo_u32 v1, v2, v1
3065 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v1
3066 ; CGP-NEXT: v_and_b32_e32 v0, 0xffffff, v0
3067 ; CGP-NEXT: v_mov_b32_e32 v1, 0
3068 ; CGP-NEXT: s_setpc_b64 s[30:31]
3335 ; CGP-LABEL: v_urem_v2i64_24bit:
3336 ; CGP: ; %bb.0:
3337 ; CGP-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
3338 ; CGP-NEXT: s_mov_b32 s6, 0xffffff
3339 ; CGP-NEXT: v_and_b32_e32 v0, s6, v0
3340 ; CGP-NEXT: v_and_b32_e32 v1, s6, v2
3341 ; CGP-NEXT: v_and_b32_e32 v2, s6, v4
3342 ; CGP-NEXT: v_and_b32_e32 v3, s6, v6
3343 ; CGP-NEXT: v_cvt_f32_u32_e32 v4, v0
3344 ; CGP-NEXT: v_cvt_f32_u32_e32 v5, v2
3345 ; CGP-NEXT: v_cvt_f32_u32_e32 v6, v1
3346 ; CGP-NEXT: v_cvt_f32_u32_e32 v7, v3
3347 ; CGP-NEXT: v_rcp_f32_e32 v8, v5
3348 ; CGP-NEXT: v_rcp_f32_e32 v9, v7
3349 ; CGP-NEXT: v_mul_f32_e32 v8, v4, v8
3350 ; CGP-NEXT: v_mul_f32_e32 v9, v6, v9
3351 ; CGP-NEXT: v_trunc_f32_e32 v8, v8
3352 ; CGP-NEXT: v_trunc_f32_e32 v9, v9
3353 ; CGP-NEXT: v_mad_f32 v4, -v8, v5, v4
3354 ; CGP-NEXT: v_cvt_u32_f32_e32 v8, v8
3355 ; CGP-NEXT: v_mad_f32 v6, -v9, v7, v6
3356 ; CGP-NEXT: v_cvt_u32_f32_e32 v9, v9
3357 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v4|, v5
3358 ; CGP-NEXT: v_cndmask_b32_e64 v4, 0, 1, s[4:5]
3359 ; CGP-NEXT: v_cmp_ge_f32_e64 s[4:5], |v6|, v7
3360 ; CGP-NEXT: v_cndmask_b32_e64 v5, 0, 1, s[4:5]
3361 ; CGP-NEXT: v_add_i32_e32 v4, vcc, v8, v4
3362 ; CGP-NEXT: v_add_i32_e32 v5, vcc, v9, v5
3363 ; CGP-NEXT: v_mul_lo_u32 v2, v4, v2
3364 ; CGP-NEXT: v_mul_lo_u32 v3, v5, v3
3365 ; CGP-NEXT: v_sub_i32_e32 v0, vcc, v0, v2
3366 ; CGP-NEXT: v_sub_i32_e32 v1, vcc, v1, v3
3367 ; CGP-NEXT: v_and_b32_e32 v0, s6, v0
3368 ; CGP-NEXT: v_and_b32_e32 v2, s6, v1
3369 ; CGP-NEXT: v_mov_b32_e32 v1, 0
3370 ; CGP-NEXT: v_mov_b32_e32 v3, 0
3371 ; CGP-NEXT: s_setpc_b64 s[30:31]