583 : ST(&_ST), MRI(&_MRI) {
585 addRulesForGOpcs({G_ADD, G_SUB},
Standard)
595 addRulesForGOpcs({G_UADDO, G_USUBO},
Standard)
599 addRulesForGOpcs({G_UADDE, G_USUBE, G_SADDE, G_SSUBE},
Standard)
603 addRulesForGOpcs({G_UADDSAT, G_SADDSAT, G_USUBSAT, G_SSUBSAT},
Standard)
611 bool HasVecMulU64 = ST->hasVMulU64Inst();
623 bool hasMulHi = ST->hasScalarMulHiInsts();
624 addRulesForGOpcs({G_UMULH, G_SMULH},
Standard)
629 addRulesForGOpcs({G_AMDGPU_MAD_U64_U32},
Standard)
633 bool HasScalarSMulU64 = ST->hasScalarSMulU64();
634 addRulesForGOpcs({G_AMDGPU_S_MUL_U64_U32, G_AMDGPU_S_MUL_I64_I32},
Standard)
638 addRulesForGOpcs({G_XOR, G_OR, G_AND},
StandardB)
658 addRulesForGOpcs({G_LSHR},
Standard)
668 addRulesForGOpcs({G_ASHR},
Standard)
678 addRulesForGOpcs({G_FSHR},
Standard)
682 addRulesForGOpcs({G_BSWAP},
Standard)
690 addRulesForGOpcs({G_AMDGPU_CVT_F32_UBYTE0, G_AMDGPU_CVT_F32_UBYTE1,
691 G_AMDGPU_CVT_F32_UBYTE2, G_AMDGPU_CVT_F32_UBYTE3,
699 addRulesForGOpcs({G_UBFX, G_SBFX},
Standard)
705 addRulesForGOpcs({G_SMIN, G_SMAX},
Standard)
715 addRulesForGOpcs({G_UMIN, G_UMAX},
Standard)
725 addRulesForGOpcs({G_IMPLICIT_DEF})
730 addRulesForGOpcs({G_CONSTANT},
Standard)
738 addRulesForGOpcs({G_FCONSTANT},
Standard)
743 addRulesForGOpcs({G_FREEZE})
750 addRulesForGOpcs({G_BITCAST})
754 addRulesForGOpcs({G_UNMERGE_VALUES})
759 addRulesForGOpcs({G_BUILD_VECTOR, G_MERGE_VALUES})
765 addRulesForGOpcs({G_CONCAT_VECTORS})
769 addRulesForGOpcs({G_PHI})
775 addRulesForGOpcs({G_EXTRACT_VECTOR_ELT})
786 addRulesForGOpcs({G_INSERT_VECTOR_ELT})
802 addRulesForGOpcs({G_AMDGPU_BVH_INTERSECT_RAY, G_AMDGPU_BVH_DUAL_INTERSECT_RAY,
803 G_AMDGPU_BVH8_INTERSECT_RAY})
810 addRulesForGOpcs({G_AMDGPU_INTRIN_IMAGE_LOAD, G_AMDGPU_INTRIN_IMAGE_LOAD_D16,
811 G_AMDGPU_INTRIN_IMAGE_LOAD_NORET,
812 G_AMDGPU_INTRIN_IMAGE_STORE,
813 G_AMDGPU_INTRIN_IMAGE_STORE_D16})
828 bool HasScalarCompareEq64 = ST->hasScalarCompareEq64();
830 addRulesForGOpcs({G_ICMP})
849 addRulesForGOpcs({G_BRCOND})
853 addRulesForGOpcs({G_BR}).
Any({{
_}, {{}, {
None}}});
863 addRulesForGOpcs({G_ANYEXT})
875 bool Has16bitCmp = ST->has16BitInsts();
882 addRulesForGOpcs({G_TRUNC})
898 addRulesForGOpcs({G_ZEXT})
913 addRulesForGOpcs({G_SEXT})
928 addRulesForGOpcs({G_SEXT_INREG})
934 addRulesForGOpcs({G_ASSERT_ZEXT, G_ASSERT_SEXT},
Standard)
940 addRulesForGOpcs({G_ASSERT_ALIGN},
Standard)
952 addRulesForGOpcs({G_ATOMICRMW_ADD, G_ATOMICRMW_SUB, G_ATOMICRMW_XCHG,
953 G_ATOMICRMW_AND, G_ATOMICRMW_OR, G_ATOMICRMW_XOR,
954 G_ATOMICRMW_MIN, G_ATOMICRMW_MAX, G_ATOMICRMW_UMIN,
955 G_ATOMICRMW_UMAX, G_ATOMICRMW_UINC_WRAP,
956 G_ATOMICRMW_UDEC_WRAP, G_ATOMICRMW_FMIN, G_ATOMICRMW_FMAX})
964 addRulesForGOpcs({G_ATOMICRMW_USUB_SAT, G_ATOMICRMW_USUB_COND})
969 bool HasAtomicFlatPkAdd16Insts = ST->hasAtomicFlatPkAdd16Insts();
970 bool HasAtomicBufferGlobalPkAddF16Insts =
971 ST->hasAtomicBufferGlobalPkAddF16NoRtnInsts() ||
972 ST->hasAtomicBufferGlobalPkAddF16Insts();
973 bool HasAtomicDsPkAdd16Insts = ST->hasAtomicDsPkAdd16Insts();
974 addRulesForGOpcs({G_ATOMICRMW_FADD})
982 HasAtomicFlatPkAdd16Insts)
984 HasAtomicBufferGlobalPkAddF16Insts)
986 HasAtomicDsPkAdd16Insts);
988 addRulesForGOpcs({G_ATOMIC_CMPXCHG})
994 addRulesForGOpcs({G_AMDGPU_ATOMIC_CMPXCHG})
1000 addRulesForGOpcs({G_AMDGPU_BUFFER_ATOMIC_CMPSWAP},
Standard)
1006 addRulesForGOpcs({G_AMDGPU_BUFFER_ATOMIC_ADD, G_AMDGPU_BUFFER_ATOMIC_AND,
1007 G_AMDGPU_BUFFER_ATOMIC_DEC, G_AMDGPU_BUFFER_ATOMIC_FMAX,
1008 G_AMDGPU_BUFFER_ATOMIC_FMIN, G_AMDGPU_BUFFER_ATOMIC_INC,
1009 G_AMDGPU_BUFFER_ATOMIC_OR, G_AMDGPU_BUFFER_ATOMIC_SMAX,
1010 G_AMDGPU_BUFFER_ATOMIC_SMIN, G_AMDGPU_BUFFER_ATOMIC_SUB,
1011 G_AMDGPU_BUFFER_ATOMIC_SWAP, G_AMDGPU_BUFFER_ATOMIC_UMAX,
1012 G_AMDGPU_BUFFER_ATOMIC_UMIN, G_AMDGPU_BUFFER_ATOMIC_XOR},
1017 bool hasSMRDx3 = ST->hasScalarDwordx3Loads();
1018 bool hasSMRDSmall = ST->hasScalarSubwordLoads();
1019 bool usesTrue16 = ST->useRealTrue16Insts();
1022 return (*
MI.memoperands_begin())->getAlign() >=
Align(16);
1026 return (*
MI.memoperands_begin())->getAlign() >=
Align(4);
1030 return (*
MI.memoperands_begin())->isAtomic();
1046 return (*
MI.memoperands_begin())->isVolatile();
1050 return (*
MI.memoperands_begin())->isInvariant();
1065 return MemSize == 16 || MemSize == 8;
1073 auto isUL = !isAtomicMMO && isUniMMO && (isConst || !isVolatileMMO) &&
1074 (isConst || isInvMMO || isNoClobberMMO);
1078 addRulesForGOpcs({G_LOAD})
1185 addRulesForGOpcs({G_ZEXTLOAD, G_SEXTLOAD})
1210 addRulesForGOpcs({G_STORE})
1246 addRulesForGOpcs({G_AMDGPU_BUFFER_LOAD, G_AMDGPU_BUFFER_LOAD_FORMAT,
1247 G_AMDGPU_TBUFFER_LOAD_FORMAT},
1258 addRulesForGOpcs({G_AMDGPU_BUFFER_LOAD_USHORT, G_AMDGPU_BUFFER_LOAD_UBYTE,
1259 G_AMDGPU_BUFFER_LOAD_SSHORT, G_AMDGPU_BUFFER_LOAD_SBYTE},
1265 {G_AMDGPU_BUFFER_LOAD_UBYTE_TFE, G_AMDGPU_BUFFER_LOAD_USHORT_TFE},
1270 addRulesForGOpcs({G_AMDGPU_BUFFER_LOAD_TFE, G_AMDGPU_BUFFER_LOAD_FORMAT_TFE},
1283 {G_AMDGPU_BUFFER_LOAD_FORMAT_D16, G_AMDGPU_TBUFFER_LOAD_FORMAT_D16},
1292 addRulesForGOpcs({G_AMDGPU_S_BUFFER_LOAD})
1342 addRulesForGOpcs({G_AMDGPU_S_BUFFER_LOAD_SBYTE, G_AMDGPU_S_BUFFER_LOAD_UBYTE,
1343 G_AMDGPU_S_BUFFER_LOAD_SSHORT,
1344 G_AMDGPU_S_BUFFER_LOAD_USHORT})
1353 addRulesForGOpcs({G_AMDGPU_BUFFER_STORE, G_AMDGPU_BUFFER_STORE_BYTE,
1354 G_AMDGPU_BUFFER_STORE_SHORT, G_AMDGPU_BUFFER_STORE_FORMAT,
1355 G_AMDGPU_BUFFER_STORE_FORMAT_D16,
1356 G_AMDGPU_TBUFFER_STORE_FORMAT,
1357 G_AMDGPU_TBUFFER_STORE_FORMAT_D16})
1369 addRulesForGOpcs({G_AMDGPU_BUFFER_ATOMIC_FADD})
1378 addRulesForGOpcs({G_PTR_ADD})
1384 addRulesForGOpcs({G_INTTOPTR})
1392 addRulesForGOpcs({G_PTRTOINT})
1402 addRulesForGOpcs({G_PTRMASK})
1408 addRulesForGOpcs({G_DYN_STACKALLOC})
1412 addRulesForGOpcs({G_ABS},
Standard)
1420 addRulesForGOpcs({G_BITREVERSE},
Standard)
1426 addRulesForGOpcs({G_AMDGPU_FFBH_U32, G_AMDGPU_FFBL_B32, G_CTLZ_ZERO_POISON,
1427 G_CTTZ_ZERO_POISON})
1433 addRulesForGOpcs({G_CTPOP})
1439 addRulesForGOpcs({G_FENCE}).
Any({{{}}, {{}, {}}});
1441 addRulesForGOpcs({G_READSTEADYCOUNTER, G_READCYCLECOUNTER},
Standard)
1446 addRulesForGOpcs({G_GLOBAL_VALUE})
1453 addRulesForGOpcs({G_AMDGPU_WAVE_ADDRESS}).
Any({{
UniP5}, {{
SgprP5}, {}}});
1457 addRulesForGOpcs({G_SI_CALL})
1463 bool hasSALUFloat = ST->hasSALUFloatInsts();
1465 addRulesForGOpcs({G_FADD, G_FMUL, G_STRICT_FADD, G_STRICT_FMUL},
Standard)
1481 addRulesForGOpcs({G_FSUB, G_STRICT_FSUB},
Standard)
1489 addRulesForGOpcs({G_FMAD},
Standard)
1495 addRulesForGOpcs({G_FLDEXP, G_STRICT_FLDEXP},
Standard)
1503 addRulesForGOpcs({G_FMA, G_STRICT_FMA},
Standard)
1521 addRulesForGOpcs({G_AMDGPU_FMED3},
Standard)
1530 addRulesForGOpcs({G_AMDGPU_SMED3},
Standard)
1538 addRulesForGOpcs({G_FNEG, G_FABS},
Standard)
1553 addRulesForGOpcs({G_FCANONICALIZE},
Standard)
1565 bool hasPST = ST->hasPseudoScalarTrans();
1566 addRulesForGOpcs({G_FSQRT},
Standard)
1571 addRulesForGOpcs({G_FPTOUI, G_FPTOSI, G_FPTOUI_SAT, G_FPTOSI_SAT})
1583 addRulesForGOpcs({G_UITOFP, G_SITOFP})
1595 addRulesForGOpcs({G_AMDGPU_S_BUFFER_PREFETCH})
1600 return MI.getOperand(3).getImm() != 0;
1603 bool HasSMemPF = ST->hasSafeSmemPrefetch();
1604 bool HasVMemPF = ST->hasVmemPrefInsts();
1605 addRulesForGOpcs({G_PREFETCH})
1611 !HasSMemPF && !HasVMemPF)
1623 addRulesForGOpcs({G_FPEXT})
1630 addRulesForGOpcs({G_AMDGPU_CVT_PK_I16_I32},
Standard)
1634 addRulesForGOpcs({G_AMDGPU_FMIN_LEGACY, G_AMDGPU_FMAX_LEGACY},
Standard)
1638 bool hasSALUMinimumMaximumInsts = ST->hasSALUMinimumMaximumInsts();
1640 addRulesForGOpcs({G_FMINIMUM, G_FMAXIMUM},
Standard)
1652 addRulesForGOpcs({G_FMINNUM_IEEE, G_FMAXNUM_IEEE, G_FMINNUM, G_FMAXNUM,
1653 G_FMINIMUMNUM, G_FMAXIMUMNUM},
1666 addRulesForGOpcs({G_FPTRUNC})
1675 addRulesForGOpcs({G_IS_FPCLASS})
1683 addRulesForGOpcs({G_FCMP},
Standard)
1697 addRulesForGOpcs({G_INTRINSIC_ROUNDEVEN, G_FEXP2, G_FLOG2},
Standard)
1705 addRulesForGOpcs({G_INTRINSIC_TRUNC, G_FFLOOR, G_FCEIL},
Standard)
1715 addRulesForGOpcs({G_AMDGPU_GLOBAL_LOAD_MONITOR, G_AMDGPU_FLAT_LOAD_MONITOR},
1724 addRulesForGOpcs({G_AMDGPU_WHOLE_WAVE_FUNC_SETUP})
1727 addRulesForGOpcs({G_AMDGPU_WHOLE_WAVE_FUNC_RETURN}).
Any({{}, {{}, {
Vcc}}});
1731 addRulesForIOpcs({returnaddress}).
Any({{
UniP0}, {{
SgprP0}, {}}});
1735 addRulesForIOpcs({amdgcn_icmp})
1744 addRulesForIOpcs({amdgcn_fcmp})
1757 addRulesForIOpcs({amdgcn_s_setreg})
1760 addRulesForIOpcs({amdgcn_s_sendmsg, amdgcn_s_sendmsghalt})
1763 addRulesForIOpcs({amdgcn_s_sendmsg_rtn})
1767 addRulesForIOpcs({amdgcn_s_memrealtime, amdgcn_s_memtime},
Standard)
1770 addRulesForIOpcs({amdgcn_groupstaticsize, amdgcn_pops_exiting_wave_id,
1771 amdgcn_reloc_constant, amdgcn_s_get_waveid_in_workgroup},
1776 addRulesForIOpcs({amdgcn_asyncmark,
1781 amdgcn_s_barrier_leave,
1782 amdgcn_s_barrier_signal,
1783 amdgcn_s_barrier_wait,
1784 amdgcn_s_monitor_sleep,
1788 amdgcn_s_setprio_inc_wg,
1790 amdgcn_s_ttracedata_imm,
1791 amdgcn_s_wait_asynccnt,
1792 amdgcn_s_wait_bvhcnt,
1793 amdgcn_s_wait_dscnt,
1794 amdgcn_s_wait_event,
1795 amdgcn_s_wait_event_export_ready,
1796 amdgcn_s_wait_expcnt,
1797 amdgcn_s_wait_kmcnt,
1798 amdgcn_s_wait_loadcnt,
1799 amdgcn_s_wait_samplecnt,
1800 amdgcn_s_wait_storecnt,
1801 amdgcn_s_wait_tensorcnt,
1803 amdgcn_sched_barrier,
1804 amdgcn_sched_group_barrier,
1806 amdgcn_wait_asyncmark,
1807 amdgcn_wave_barrier})
1808 .
Any({{}, {{}, {}}});
1810 addRulesForIOpcs({amdgcn_init_exec_from_input})
1815 addRulesForIOpcs({amdgcn_s_sleep_var})
1818 addRulesForIOpcs({amdgcn_s_barrier_join, amdgcn_s_wakeup_barrier})
1821 addRulesForIOpcs({amdgcn_s_barrier_signal_var, amdgcn_s_barrier_init})
1824 addRulesForIOpcs({amdgcn_s_barrier_signal_isfirst})
1828 {amdgcn_s_get_named_barrier_state, amdgcn_s_get_barrier_state},
Standard)
1831 addRulesForIOpcs({amdgcn_flat_prefetch}).
Any({{}, {{}, {
IntrId,
VgprP0}}});
1833 addRulesForIOpcs({amdgcn_global_prefetch}).
Any({{}, {{}, {
IntrId,
VgprP1}}});
1835 addRulesForIOpcs({amdgcn_s_prefetch_data, amdgcn_s_prefetch_inst})
1838 addRulesForIOpcs({amdgcn_class})
1847 addRulesForIOpcs({amdgcn_end_cf})
1851 addRulesForIOpcs({amdgcn_if_break},
Standard)
1855 addRulesForIOpcs({amdgcn_exp})
1859 addRulesForIOpcs({amdgcn_exp_compr})
1862 addRulesForIOpcs({amdgcn_exp_row})
1868 addRulesForIOpcs({amdgcn_lds_direct_load},
StandardB)
1871 addRulesForIOpcs({amdgcn_lds_param_load},
Standard)
1874 addRulesForIOpcs({amdgcn_mbcnt_lo, amdgcn_mbcnt_hi},
Standard)
1877 addRulesForIOpcs({amdgcn_readfirstlane})
1883 addRulesForIOpcs({amdgcn_readlane},
StandardB)
1886 addRulesForIOpcs({amdgcn_s_quadmask, amdgcn_s_wqm},
StandardB)
1890 addRulesForIOpcs({amdgcn_writelane},
StandardB)
1895 addRulesForIOpcs({amdgcn_add_max_i32, amdgcn_add_max_u32, amdgcn_add_min_i32,
1896 amdgcn_add_min_u32},
1901 addRulesForIOpcs({amdgcn_pk_add_max_i16, amdgcn_pk_add_max_u16,
1902 amdgcn_pk_add_min_i16, amdgcn_pk_add_min_u16},
1907 addRulesForIOpcs({amdgcn_permlane16, amdgcn_permlanex16},
Standard)
1912 addRulesForIOpcs({amdgcn_permlane_bcast, amdgcn_permlane_up,
1913 amdgcn_permlane_down, amdgcn_permlane_xor},
1919 addRulesForIOpcs({amdgcn_permlane_idx_gen},
Standard)
1922 addRulesForIOpcs({amdgcn_perm},
Standard)
1927 {amdgcn_wave_reduce_add, amdgcn_wave_reduce_and, amdgcn_wave_reduce_fadd,
1928 amdgcn_wave_reduce_fmax, amdgcn_wave_reduce_fmin,
1929 amdgcn_wave_reduce_fsub, amdgcn_wave_reduce_max, amdgcn_wave_reduce_min,
1930 amdgcn_wave_reduce_or, amdgcn_wave_reduce_sub, amdgcn_wave_reduce_umax,
1931 amdgcn_wave_reduce_umin, amdgcn_wave_reduce_xor},
1938 addRulesForIOpcs({amdgcn_wave_shuffle},
Standard)
1942 addRulesForIOpcs({amdgcn_bitop3, amdgcn_fmad_ftz},
Standard)
1948 addRulesForIOpcs({amdgcn_udot4, amdgcn_sdot4, amdgcn_udot8, amdgcn_sdot8,
1949 amdgcn_dot4_f32_bf8_bf8, amdgcn_dot4_f32_bf8_fp8,
1950 amdgcn_dot4_f32_fp8_fp8, amdgcn_dot4_f32_fp8_bf8},
1955 addRulesForIOpcs({amdgcn_rsq, amdgcn_rsq_clamp},
Standard)
1965 addRulesForIOpcs({amdgcn_mul_u24, amdgcn_mul_i24},
Standard)
1971 addRulesForIOpcs({amdgcn_ds_bpermute, amdgcn_ds_bpermute_fi_b32,
1972 amdgcn_ds_permute, amdgcn_fmul_legacy, amdgcn_mulhi_i24,
1978 addRulesForIOpcs({amdgcn_cvt_sr_bf8_f32, amdgcn_cvt_sr_fp8_f32,
1979 amdgcn_cvt_sr_fp8_f32_e5m3, amdgcn_cvt_pk_bf8_f32,
1980 amdgcn_cvt_pk_fp8_f32, amdgcn_cvt_pk_fp8_f32_e5m3},
1985 addRulesForIOpcs({amdgcn_cvt_off_f32_i4, amdgcn_cvt_f32_bf8,
1986 amdgcn_cvt_f32_fp8, amdgcn_cvt_f32_fp8_e5m3},
1991 addRulesForIOpcs({amdgcn_cvt_pk_f32_bf8, amdgcn_cvt_pk_f32_fp8})
1995 addRulesForIOpcs({amdgcn_cvt_f16_bf8, amdgcn_cvt_f16_fp8},
Standard)
1999 addRulesForIOpcs({amdgcn_cvt_pk_f16_bf8, amdgcn_cvt_pk_f16_fp8},
Standard)
2003 addRulesForIOpcs({amdgcn_cvt_pk_bf8_f16, amdgcn_cvt_pk_fp8_f16},
Standard)
2007 addRulesForIOpcs({amdgcn_cvt_sr_bf8_f16, amdgcn_cvt_sr_fp8_f16},
Standard)
2011 addRulesForIOpcs({amdgcn_cvt_sr_pk_f16_f32},
Standard)
2015 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_fp8_f16})
2019 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_fp8_f32})
2023 addRulesForIOpcs({amdgcn_cubesc, amdgcn_cubetc, amdgcn_cubema, amdgcn_cubeid,
2029 addRulesForIOpcs({amdgcn_frexp_mant, amdgcn_fract},
Standard)
2037 addRulesForIOpcs({amdgcn_prng_b32})
2041 addRulesForIOpcs({amdgcn_sffbh},
Standard)
2045 addRulesForIOpcs({amdgcn_ubfe, amdgcn_sbfe},
Standard)
2051 addRulesForIOpcs({amdgcn_cvt_pk_i16, amdgcn_cvt_pk_u16, amdgcn_cvt_pknorm_i16,
2052 amdgcn_cvt_pknorm_u16, amdgcn_cvt_pkrtz},
2057 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk32_bf6_f16,
2058 amdgcn_cvt_scalef32_sr_pk32_fp6_f16,
2059 amdgcn_cvt_scalef32_sr_pk32_bf6_bf16,
2060 amdgcn_cvt_scalef32_sr_pk32_fp6_bf16},
2064 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk32_bf6_f32,
2065 amdgcn_cvt_scalef32_sr_pk32_fp6_f32},
2069 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk_fp4_f16},
Standard)
2073 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk_fp4_f32},
Standard)
2078 {amdgcn_cvt_scalef32_2xpk16_fp6_f32, amdgcn_cvt_scalef32_2xpk16_bf6_f32})
2084 addRulesForIOpcs({amdgcn_cvt_scalef32_f16_fp8, amdgcn_cvt_scalef32_f16_bf8},
2089 addRulesForIOpcs({amdgcn_cvt_scalef32_f32_fp8, amdgcn_cvt_scalef32_f32_bf8},
2095 {amdgcn_cvt_scalef32_pk16_bf6_f16, amdgcn_cvt_scalef32_pk16_fp6_f16},
2101 {amdgcn_cvt_scalef32_pk16_bf6_f32, amdgcn_cvt_scalef32_pk16_fp6_f32},
2107 {amdgcn_cvt_scalef32_pk8_bf8_f16, amdgcn_cvt_scalef32_pk8_fp8_f16},
2113 {amdgcn_cvt_scalef32_pk8_bf8_f32, amdgcn_cvt_scalef32_pk8_fp8_f32},
2118 addRulesForIOpcs({amdgcn_cvt_scalef32_pk8_fp4_f16},
Standard)
2122 addRulesForIOpcs({amdgcn_cvt_scalef32_pk8_fp4_f32},
Standard)
2126 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk16_bf6_f16,
2127 amdgcn_cvt_scalef32_sr_pk16_fp6_f16},
2133 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk16_bf6_f32,
2134 amdgcn_cvt_scalef32_sr_pk16_fp6_f32},
2141 {amdgcn_cvt_scalef32_sr_pk8_bf8_f16, amdgcn_cvt_scalef32_sr_pk8_fp8_f16},
2148 {amdgcn_cvt_scalef32_sr_pk8_bf8_f32, amdgcn_cvt_scalef32_sr_pk8_fp8_f32},
2154 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk8_fp4_f16},
Standard)
2158 addRulesForIOpcs({amdgcn_cvt_scalef32_sr_pk8_fp4_f32},
Standard)
2163 {amdgcn_cvt_scale_pk16_f16_bf6, amdgcn_cvt_scale_pk16_f16_fp6},
Standard)
2168 {amdgcn_cvt_scale_pk16_f32_bf6, amdgcn_cvt_scale_pk16_f32_fp6},
Standard)
2172 addRulesForIOpcs({amdgcn_cvt_scale_pk8_f16_bf8, amdgcn_cvt_scale_pk8_f16_fp8},
2177 addRulesForIOpcs({amdgcn_cvt_scale_pk8_f16_fp4},
Standard)
2181 addRulesForIOpcs({amdgcn_cvt_scale_pk8_f32_bf8, amdgcn_cvt_scale_pk8_f32_fp8},
2186 addRulesForIOpcs({amdgcn_cvt_scale_pk8_f32_fp4},
Standard)
2191 {amdgcn_cvt_scalef32_pk32_bf6_f16, amdgcn_cvt_scalef32_pk32_fp6_f16},
2197 {amdgcn_cvt_scalef32_pk_fp8_f32, amdgcn_cvt_scalef32_pk_bf8_f32},
2205 {amdgcn_cvt_scalef32_pk_f32_fp8, amdgcn_cvt_scalef32_pk_f32_bf8},
2211 {amdgcn_cvt_scalef32_pk_fp8_f16, amdgcn_cvt_scalef32_pk_bf8_f16},
2217 addRulesForIOpcs({amdgcn_cvt_scalef32_pk_f32_fp4},
Standard)
2221 addRulesForIOpcs({amdgcn_cvt_scalef32_pk_fp4_f32},
Standard)
2226 addRulesForIOpcs({amdgcn_cvt_scalef32_pk_f16_fp4,
2227 amdgcn_cvt_scalef32_pk_f16_fp8,
2228 amdgcn_cvt_scalef32_pk_f16_bf8},
2234 {amdgcn_cvt_scalef32_pk32_f32_fp6, amdgcn_cvt_scalef32_pk32_f32_bf6},
2240 {amdgcn_cvt_scalef32_pk32_f16_fp6, amdgcn_cvt_scalef32_pk32_f16_bf6},
2245 addRulesForIOpcs({amdgcn_cvt_scalef32_pk_fp4_f16},
Standard)
2249 addRulesForIOpcs({amdgcn_global_load_tr_b64})
2255 addRulesForIOpcs({amdgcn_global_load_tr_b128})
2261 addRulesForIOpcs({amdgcn_global_load_tr4_b64})
2265 addRulesForIOpcs({amdgcn_global_load_tr6_b96})
2269 addRulesForIOpcs({amdgcn_ds_load_tr4_b64, amdgcn_ds_load_tr8_b64})
2272 addRulesForIOpcs({amdgcn_ds_load_tr6_b96})
2275 addRulesForIOpcs({amdgcn_ds_load_tr16_b128})
2278 addRulesForIOpcs({amdgcn_global_atomic_ordered_add_b64})
2282 {amdgcn_global_atomic_fmin_num, amdgcn_global_atomic_fmax_num},
Standard)
2285 addRulesForIOpcs({amdgcn_flat_atomic_fmin_num, amdgcn_flat_atomic_fmax_num},
2289 addRulesForIOpcs({amdgcn_raw_buffer_load_lds})
2292 addRulesForIOpcs({amdgcn_raw_buffer_load_async_lds})
2295 addRulesForIOpcs({amdgcn_struct_buffer_load_async_lds})
2300 addRulesForIOpcs({amdgcn_struct_buffer_load_lds})
2304 addRulesForIOpcs({amdgcn_raw_ptr_buffer_load_lds})
2307 addRulesForIOpcs({amdgcn_raw_ptr_buffer_load_async_lds})
2310 addRulesForIOpcs({amdgcn_struct_ptr_buffer_load_async_lds})
2314 addRulesForIOpcs({amdgcn_struct_ptr_buffer_load_lds})
2317 addRulesForIOpcs({amdgcn_global_load_lds, amdgcn_load_to_lds})
2320 addRulesForIOpcs({amdgcn_global_load_async_to_lds_b8,
2321 amdgcn_global_load_async_to_lds_b32,
2322 amdgcn_global_load_async_to_lds_b64,
2323 amdgcn_global_load_async_to_lds_b128,
2324 amdgcn_global_store_async_from_lds_b8,
2325 amdgcn_global_store_async_from_lds_b32,
2326 amdgcn_global_store_async_from_lds_b64,
2327 amdgcn_global_store_async_from_lds_b128})
2330 addRulesForIOpcs({amdgcn_global_load_async_lds})
2333 addRulesForIOpcs({amdgcn_tensor_load_to_lds, amdgcn_tensor_store_from_lds})
2340 addRulesForIOpcs({amdgcn_cluster_load_b32})
2346 addRulesForIOpcs({amdgcn_cluster_load_b64})
2352 addRulesForIOpcs({amdgcn_cluster_load_b128})
2359 addRulesForIOpcs({amdgcn_cluster_load_async_to_lds_b8,
2360 amdgcn_cluster_load_async_to_lds_b32,
2361 amdgcn_cluster_load_async_to_lds_b64,
2362 amdgcn_cluster_load_async_to_lds_b128})
2365 addRulesForIOpcs({amdgcn_perm_pk16_b4_u4},
StandardB)
2369 addRulesForIOpcs({amdgcn_perm_pk16_b6_u4},
StandardB)
2373 addRulesForIOpcs({amdgcn_perm_pk16_b8_u4},
StandardB)
2377 addRulesForIOpcs({amdgcn_wwm, amdgcn_strict_wwm, amdgcn_wqm, amdgcn_softwqm,
2395 addRulesForIOpcs({amdgcn_kill, amdgcn_wqm_demote})
2398 addRulesForIOpcs({amdgcn_set_inactive},
StandardB)
2401 addRulesForIOpcs({amdgcn_set_inactive_chain_arg},
Standard)
2404 addRulesForIOpcs({amdgcn_cvt_sr_bf16_f32, amdgcn_cvt_sr_f16_f32},
Standard)
2407 addRulesForIOpcs({amdgcn_ballot},
Standard)
2411 addRulesForIOpcs({amdgcn_inverse_ballot})
2415 addRulesForIOpcs({amdgcn_live_mask, amdgcn_ps_live})
2418 addRulesForIOpcs({amdgcn_mov_dpp, amdgcn_mov_dpp8},
StandardB)
2422 addRulesForIOpcs({amdgcn_update_dpp},
StandardB)
2426 addRulesForIOpcs({amdgcn_sin, amdgcn_cos},
Standard)
2432 addRulesForIOpcs({amdgcn_trig_preop},
Standard)
2436 addRulesForIOpcs({amdgcn_exp2},
Standard)
2444 addRulesForIOpcs({amdgcn_rcp, amdgcn_sqrt},
Standard)
2454 addRulesForIOpcs({amdgcn_log},
Standard)
2462 addRulesForIOpcs({amdgcn_ds_atomic_async_barrier_arrive_b64})
2465 addRulesForIOpcs({amdgcn_ds_atomic_barrier_arrive_rtn_b64},
Standard)
2468 addRulesForIOpcs({amdgcn_ds_add_gs_reg_rtn, amdgcn_ds_sub_gs_reg_rtn},
2473 addRulesForIOpcs({amdgcn_ds_append, amdgcn_ds_consume},
Standard)
2478 {amdgcn_ds_bvh_stack_rtn, amdgcn_ds_bvh_stack_push4_pop1_rtn},
Standard)
2481 addRulesForIOpcs({amdgcn_ds_bvh_stack_push8_pop1_rtn},
Standard)
2484 addRulesForIOpcs({amdgcn_ds_bvh_stack_push8_pop2_rtn},
Standard)
2487 addRulesForIOpcs({amdgcn_ds_gws_sema_p, amdgcn_ds_gws_sema_v,
2488 amdgcn_ds_gws_sema_release_all})
2492 {amdgcn_ds_gws_barrier, amdgcn_ds_gws_init, amdgcn_ds_gws_sema_br})
2495 addRulesForIOpcs({amdgcn_ds_ordered_add, amdgcn_ds_ordered_swap},
Standard)
2498 addRulesForIOpcs({amdgcn_ds_swizzle},
Standard)
2502 addRulesForIOpcs({amdgcn_permlane16_var, amdgcn_permlanex16_var},
Standard)
2505 addRulesForIOpcs({amdgcn_permlane16_swap, amdgcn_permlane32_swap},
Standard)
2508 addRulesForIOpcs({amdgcn_permlane64},
StandardB)
2511 addRulesForIOpcs({amdgcn_ds_read_tr4_b64, amdgcn_ds_read_tr8_b64})
2514 addRulesForIOpcs({amdgcn_ds_read_tr6_b96})
2517 addRulesForIOpcs({amdgcn_ds_read_tr16_b64})
2520 addRulesForIOpcs({amdgcn_interp_p1},
Standard)
2523 addRulesForIOpcs({amdgcn_interp_p1_f16},
Standard)
2526 addRulesForIOpcs({amdgcn_interp_p2},
Standard)
2529 addRulesForIOpcs({amdgcn_interp_p2_f16},
Standard)
2533 addRulesForIOpcs({amdgcn_interp_mov},
Standard)
2536 addRulesForIOpcs({amdgcn_interp_inreg_p10, amdgcn_interp_inreg_p2,
2537 amdgcn_interp_inreg_p10_f16, amdgcn_interp_p10_rtz_f16},
2542 addRulesForIOpcs({amdgcn_interp_inreg_p2_f16, amdgcn_interp_p2_rtz_f16},
2547 addRulesForIOpcs({amdgcn_frexp_exp})
2555 addRulesForIOpcs({amdgcn_div_fmas},
Standard)
2561 addRulesForIOpcs({amdgcn_div_fixup},
Standard)
2569 addRulesForIOpcs({amdgcn_div_scale},
Standard)
2575 addRulesForIOpcs({amdgcn_fdot2, amdgcn_sdot2, amdgcn_udot2},
Standard)
2579 addRulesForIOpcs({amdgcn_fdot2_f16_f16},
Standard)
2583 addRulesForIOpcs({amdgcn_sudot4, amdgcn_sudot8},
Standard)
2587 addRulesForIOpcs({amdgcn_s_alloc_vgpr})
2590 addRulesForIOpcs({amdgcn_sat_pk4_i4_i8, amdgcn_sat_pk4_u4_u8},
Standard)
2594 bool HasGFX90AInsts = ST->hasGFX90AInsts();
2597 addRulesForIOpcs({amdgcn_mfma_f32_32x32x1f32, amdgcn_mfma_f32_16x16x1f32,
2598 amdgcn_mfma_f32_4x4x1f32, amdgcn_mfma_f32_32x32x2f32,
2599 amdgcn_mfma_f32_16x16x4f32, amdgcn_mfma_f32_32x32x4f16,
2600 amdgcn_mfma_f32_16x16x4f16, amdgcn_mfma_f32_4x4x4f16,
2601 amdgcn_mfma_f32_32x32x8f16, amdgcn_mfma_f32_16x16x16f16,
2602 amdgcn_mfma_i32_32x32x4i8, amdgcn_mfma_i32_16x16x4i8,
2603 amdgcn_mfma_i32_4x4x4i8, amdgcn_mfma_i32_32x32x8i8,
2604 amdgcn_mfma_i32_16x16x16i8, amdgcn_mfma_f32_32x32x2bf16,
2605 amdgcn_mfma_f32_16x16x2bf16, amdgcn_mfma_f32_4x4x2bf16,
2606 amdgcn_mfma_f32_32x32x4bf16, amdgcn_mfma_f32_16x16x8bf16})
2617 {amdgcn_mfma_f32_32x32x4bf16_1k, amdgcn_mfma_f32_16x16x4bf16_1k,
2618 amdgcn_mfma_f32_4x4x4bf16_1k, amdgcn_mfma_f32_32x32x8bf16_1k,
2619 amdgcn_mfma_f32_16x16x16bf16_1k, amdgcn_mfma_f64_16x16x4f64,
2620 amdgcn_mfma_f64_4x4x4f64, amdgcn_mfma_i32_16x16x32_i8,
2621 amdgcn_mfma_i32_32x32x16_i8, amdgcn_mfma_f32_16x16x8_xf32,
2622 amdgcn_mfma_f32_32x32x4_xf32, amdgcn_mfma_f32_16x16x32_bf8_bf8,
2623 amdgcn_mfma_f32_16x16x32_bf8_fp8, amdgcn_mfma_f32_16x16x32_fp8_bf8,
2624 amdgcn_mfma_f32_16x16x32_fp8_fp8, amdgcn_mfma_f32_32x32x16_bf8_bf8,
2625 amdgcn_mfma_f32_32x32x16_bf8_fp8, amdgcn_mfma_f32_32x32x16_fp8_bf8,
2626 amdgcn_mfma_f32_32x32x16_fp8_fp8})
2633 amdgcn_smfmac_f32_16x16x32_f16, amdgcn_smfmac_f32_32x32x16_f16,
2634 amdgcn_smfmac_f32_16x16x32_bf16, amdgcn_smfmac_f32_32x32x16_bf16,
2635 amdgcn_smfmac_i32_16x16x64_i8, amdgcn_smfmac_i32_32x32x32_i8,
2636 amdgcn_smfmac_f32_16x16x64_bf8_bf8, amdgcn_smfmac_f32_16x16x64_bf8_fp8,
2637 amdgcn_smfmac_f32_16x16x64_fp8_bf8, amdgcn_smfmac_f32_16x16x64_fp8_fp8,
2638 amdgcn_smfmac_f32_32x32x32_bf8_bf8, amdgcn_smfmac_f32_32x32x32_bf8_fp8,
2639 amdgcn_smfmac_f32_32x32x32_fp8_bf8, amdgcn_smfmac_f32_32x32x32_fp8_fp8,
2641 amdgcn_smfmac_f32_16x16x64_f16, amdgcn_smfmac_f32_32x32x32_f16,
2642 amdgcn_smfmac_i32_16x16x128_i8, amdgcn_smfmac_i32_32x32x64_i8,
2643 amdgcn_smfmac_f32_16x16x128_bf8_bf8, amdgcn_smfmac_f32_16x16x128_bf8_fp8,
2644 amdgcn_smfmac_f32_16x16x128_fp8_bf8, amdgcn_smfmac_f32_16x16x128_fp8_fp8,
2645 amdgcn_smfmac_f32_32x32x64_bf8_bf8, amdgcn_smfmac_f32_32x32x64_bf8_fp8,
2646 amdgcn_smfmac_f32_32x32x64_fp8_bf8, amdgcn_smfmac_f32_32x32x64_fp8_fp8})
2654 amdgcn_wmma_f32_16x16x16_f16, amdgcn_wmma_f32_16x16x16_bf16,
2655 amdgcn_wmma_f16_16x16x16_f16, amdgcn_wmma_bf16_16x16x16_bf16,
2656 amdgcn_wmma_f16_16x16x16_f16_tied, amdgcn_wmma_bf16_16x16x16_bf16_tied,
2657 amdgcn_wmma_i32_16x16x16_iu8, amdgcn_wmma_i32_16x16x16_iu4,
2659 amdgcn_wmma_f32_16x16x16_fp8_fp8, amdgcn_wmma_f32_16x16x16_fp8_bf8,
2660 amdgcn_wmma_f32_16x16x16_bf8_fp8, amdgcn_wmma_f32_16x16x16_bf8_bf8,
2661 amdgcn_wmma_i32_16x16x32_iu4,
2663 amdgcn_wmma_f32_16x16x4_f32, amdgcn_wmma_f32_16x16x32_bf16,
2664 amdgcn_wmma_f32_16x16x32_f16, amdgcn_wmma_f16_16x16x32_f16,
2665 amdgcn_wmma_bf16_16x16x32_bf16, amdgcn_wmma_bf16f32_16x16x32_bf16,
2666 amdgcn_wmma_f32_16x16x64_fp8_fp8, amdgcn_wmma_f32_16x16x64_fp8_bf8,
2667 amdgcn_wmma_f32_16x16x64_bf8_fp8, amdgcn_wmma_f32_16x16x64_bf8_bf8,
2668 amdgcn_wmma_f16_16x16x64_fp8_fp8, amdgcn_wmma_f16_16x16x64_fp8_bf8,
2669 amdgcn_wmma_f16_16x16x64_bf8_fp8, amdgcn_wmma_f16_16x16x64_bf8_bf8,
2670 amdgcn_wmma_f16_16x16x128_fp8_fp8, amdgcn_wmma_f16_16x16x128_fp8_bf8,
2671 amdgcn_wmma_f16_16x16x128_bf8_fp8, amdgcn_wmma_f16_16x16x128_bf8_bf8,
2672 amdgcn_wmma_f32_16x16x128_fp8_fp8, amdgcn_wmma_f32_16x16x128_fp8_bf8,
2673 amdgcn_wmma_f32_16x16x128_bf8_fp8, amdgcn_wmma_f32_16x16x128_bf8_bf8,
2674 amdgcn_wmma_i32_16x16x64_iu8, amdgcn_wmma_f32_16x16x128_f8f6f4,
2675 amdgcn_wmma_scale_f32_16x16x128_f8f6f4,
2676 amdgcn_wmma_scale16_f32_16x16x128_f8f6f4, amdgcn_wmma_f32_32x16x128_f4,
2677 amdgcn_wmma_scale_f32_32x16x128_f4, amdgcn_wmma_scale16_f32_32x16x128_f4,
2679 amdgcn_swmmac_f32_16x16x32_f16, amdgcn_swmmac_f32_16x16x32_bf16,
2680 amdgcn_swmmac_f16_16x16x32_f16, amdgcn_swmmac_bf16_16x16x32_bf16,
2681 amdgcn_swmmac_i32_16x16x32_iu8, amdgcn_swmmac_i32_16x16x32_iu4,
2682 amdgcn_swmmac_i32_16x16x64_iu4, amdgcn_swmmac_f32_16x16x32_fp8_fp8,
2683 amdgcn_swmmac_f32_16x16x32_fp8_bf8, amdgcn_swmmac_f32_16x16x32_bf8_fp8,
2684 amdgcn_swmmac_f32_16x16x32_bf8_bf8,
2686 amdgcn_swmmac_f32_16x16x64_f16, amdgcn_swmmac_f32_16x16x64_bf16,
2687 amdgcn_swmmac_f16_16x16x64_f16, amdgcn_swmmac_bf16_16x16x64_bf16,
2688 amdgcn_swmmac_bf16f32_16x16x64_bf16, amdgcn_swmmac_f32_16x16x128_fp8_fp8,
2689 amdgcn_swmmac_f32_16x16x128_fp8_bf8, amdgcn_swmmac_f32_16x16x128_bf8_fp8,
2690 amdgcn_swmmac_f32_16x16x128_bf8_bf8, amdgcn_swmmac_f16_16x16x128_fp8_fp8,
2691 amdgcn_swmmac_f16_16x16x128_fp8_bf8, amdgcn_swmmac_f16_16x16x128_bf8_fp8,
2692 amdgcn_swmmac_f16_16x16x128_bf8_bf8, amdgcn_swmmac_i32_16x16x128_iu8})