| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 1 | //===-- VOP3PInstructions.td - Vector Instruction Defintions --------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | //===----------------------------------------------------------------------===// |
| 11 | // VOP3P Classes |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | class VOP3PInst<string OpName, VOPProfile P, SDPatternOperator node = null_frag> : |
| 15 | VOP3P_Pseudo<OpName, P, |
| 16 | !if(P.HasModifiers, getVOP3PModPat<P, node>.ret, getVOP3Pat<P, node>.ret) |
| 17 | >; |
| 18 | |
| Dmitry Preobrazhensky | b2d24e2 | 2017-07-07 14:29:06 +0000 | [diff] [blame] | 19 | // Non-packed instructions that use the VOP3P encoding. |
| 20 | // VOP3 neg/abs and VOP3P opsel/opsel_hi modifiers are allowed. |
| Matt Arsenault | e135c4c | 2017-09-20 20:53:49 +0000 | [diff] [blame] | 21 | class VOP3_VOP3PInst<string OpName, VOPProfile P, bit UseTiedOutput = 0, |
| 22 | SDPatternOperator node = null_frag> : |
| Dmitry Preobrazhensky | b2d24e2 | 2017-07-07 14:29:06 +0000 | [diff] [blame] | 23 | VOP3P_Pseudo<OpName, P> { |
| Matt Arsenault | c8f8cda | 2017-08-30 22:18:40 +0000 | [diff] [blame] | 24 | // These operands are only sort of f16 operands. Depending on |
| 25 | // op_sel_hi, these may be interpreted as f32. The inline immediate |
| 26 | // values are really f16 converted to f32, so we treat these as f16 |
| 27 | // operands. |
| Dmitry Preobrazhensky | b2d24e2 | 2017-07-07 14:29:06 +0000 | [diff] [blame] | 28 | let InOperandList = |
| Matt Arsenault | e135c4c | 2017-09-20 20:53:49 +0000 | [diff] [blame] | 29 | !con( |
| 30 | !con( |
| 31 | (ins FP16InputMods:$src0_modifiers, VCSrc_f16:$src0, |
| 32 | FP16InputMods:$src1_modifiers, VCSrc_f16:$src1, |
| 33 | FP16InputMods:$src2_modifiers, VCSrc_f16:$src2, |
| 34 | clampmod:$clamp), |
| 35 | !if(UseTiedOutput, (ins VGPR_32:$vdst_in), (ins))), |
| 36 | (ins op_sel:$op_sel, op_sel_hi:$op_sel_hi)); |
| 37 | |
| 38 | let Constraints = !if(UseTiedOutput, "$vdst = $vdst_in", ""); |
| 39 | let DisableEncoding = !if(UseTiedOutput, "$vdst_in", ""); |
| Dmitry Preobrazhensky | b2d24e2 | 2017-07-07 14:29:06 +0000 | [diff] [blame] | 40 | let AsmOperands = |
| 41 | " $vdst, $src0_modifiers, $src1_modifiers, $src2_modifiers$op_sel$op_sel_hi$clamp"; |
| 42 | } |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 43 | |
| 44 | let isCommutable = 1 in { |
| Matt Arsenault | eb522e6 | 2017-02-27 22:15:25 +0000 | [diff] [blame] | 45 | def V_PK_FMA_F16 : VOP3PInst<"v_pk_fma_f16", VOP3_Profile<VOP_V2F16_V2F16_V2F16_V2F16>, fma>; |
| Dmitry Preobrazhensky | 095ec3da | 2017-07-18 09:24:10 +0000 | [diff] [blame] | 46 | def V_PK_MAD_I16 : VOP3PInst<"v_pk_mad_i16", VOP3_Profile<VOP_V2I16_V2I16_V2I16_V2I16>>; |
| 47 | def V_PK_MAD_U16 : VOP3PInst<"v_pk_mad_u16", VOP3_Profile<VOP_V2I16_V2I16_V2I16_V2I16>>; |
| 48 | |
| Matt Arsenault | eb522e6 | 2017-02-27 22:15:25 +0000 | [diff] [blame] | 49 | def V_PK_ADD_F16 : VOP3PInst<"v_pk_add_f16", VOP3_Profile<VOP_V2F16_V2F16_V2F16>, fadd>; |
| 50 | def V_PK_MUL_F16 : VOP3PInst<"v_pk_mul_f16", VOP3_Profile<VOP_V2F16_V2F16_V2F16>, fmul>; |
| 51 | def V_PK_MAX_F16 : VOP3PInst<"v_pk_max_f16", VOP3_Profile<VOP_V2F16_V2F16_V2F16>, fmaxnum>; |
| 52 | def V_PK_MIN_F16 : VOP3PInst<"v_pk_min_f16", VOP3_Profile<VOP_V2F16_V2F16_V2F16>, fminnum>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 53 | |
| Matt Arsenault | eb522e6 | 2017-02-27 22:15:25 +0000 | [diff] [blame] | 54 | def V_PK_ADD_U16 : VOP3PInst<"v_pk_add_u16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, add>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 55 | def V_PK_ADD_I16 : VOP3PInst<"v_pk_add_i16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>>; |
| Matt Arsenault | eb522e6 | 2017-02-27 22:15:25 +0000 | [diff] [blame] | 56 | def V_PK_MUL_LO_U16 : VOP3PInst<"v_pk_mul_lo_u16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, mul>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 57 | |
| Matt Arsenault | eb522e6 | 2017-02-27 22:15:25 +0000 | [diff] [blame] | 58 | def V_PK_MIN_I16 : VOP3PInst<"v_pk_min_i16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, smin>; |
| 59 | def V_PK_MIN_U16 : VOP3PInst<"v_pk_min_u16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, umin>; |
| 60 | def V_PK_MAX_I16 : VOP3PInst<"v_pk_max_i16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, smax>; |
| 61 | def V_PK_MAX_U16 : VOP3PInst<"v_pk_max_u16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, umax>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 62 | } |
| 63 | |
| Dmitry Preobrazhensky | 095ec3da | 2017-07-18 09:24:10 +0000 | [diff] [blame] | 64 | def V_PK_SUB_U16 : VOP3PInst<"v_pk_sub_u16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>>; |
| 65 | def V_PK_SUB_I16 : VOP3PInst<"v_pk_sub_i16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, sub>; |
| 66 | |
| Matt Arsenault | eb522e6 | 2017-02-27 22:15:25 +0000 | [diff] [blame] | 67 | def V_PK_LSHLREV_B16 : VOP3PInst<"v_pk_lshlrev_b16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, lshl_rev>; |
| 68 | def V_PK_ASHRREV_I16 : VOP3PInst<"v_pk_ashrrev_i16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, ashr_rev>; |
| 69 | def V_PK_LSHRREV_B16 : VOP3PInst<"v_pk_lshrrev_b16", VOP3_Profile<VOP_V2I16_V2I16_V2I16>, lshr_rev>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 70 | |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 71 | multiclass MadFmaMixPats<SDPatternOperator fma_like, |
| 72 | Instruction mix_inst, |
| 73 | Instruction mixlo_inst, |
| 74 | Instruction mixhi_inst> { |
| 75 | def : GCNPat < |
| 76 | (f16 (fpround (fma_like (f32 (VOP3PMadMixMods f16:$src0, i32:$src0_modifiers)), |
| 77 | (f32 (VOP3PMadMixMods f16:$src1, i32:$src1_modifiers)), |
| 78 | (f32 (VOP3PMadMixMods f16:$src2, i32:$src2_modifiers))))), |
| 79 | (mixlo_inst $src0_modifiers, $src0, |
| 80 | $src1_modifiers, $src1, |
| 81 | $src2_modifiers, $src2, |
| 82 | DSTCLAMP.NONE, |
| 83 | (i32 (IMPLICIT_DEF))) |
| 84 | >; |
| 85 | |
| 86 | // FIXME: Special case handling for maxhi (especially for clamp) |
| 87 | // because dealing with the write to high half of the register is |
| 88 | // difficult. |
| 89 | def : GCNPat < |
| 90 | (build_vector f16:$elt0, (fpround (fma_like (f32 (VOP3PMadMixMods f16:$src0, i32:$src0_modifiers)), |
| 91 | (f32 (VOP3PMadMixMods f16:$src1, i32:$src1_modifiers)), |
| 92 | (f32 (VOP3PMadMixMods f16:$src2, i32:$src2_modifiers))))), |
| 93 | (v2f16 (mixhi_inst $src0_modifiers, $src0, |
| 94 | $src1_modifiers, $src1, |
| 95 | $src2_modifiers, $src2, |
| 96 | DSTCLAMP.NONE, |
| 97 | $elt0)) |
| 98 | >; |
| 99 | |
| 100 | def : GCNPat < |
| 101 | (build_vector |
| 102 | f16:$elt0, |
| 103 | (AMDGPUclamp (fpround (fma_like (f32 (VOP3PMadMixMods f16:$src0, i32:$src0_modifiers)), |
| 104 | (f32 (VOP3PMadMixMods f16:$src1, i32:$src1_modifiers)), |
| 105 | (f32 (VOP3PMadMixMods f16:$src2, i32:$src2_modifiers)))))), |
| 106 | (v2f16 (mixhi_inst $src0_modifiers, $src0, |
| 107 | $src1_modifiers, $src1, |
| 108 | $src2_modifiers, $src2, |
| 109 | DSTCLAMP.ENABLE, |
| 110 | $elt0)) |
| 111 | >; |
| 112 | |
| 113 | def : GCNPat < |
| 114 | (AMDGPUclamp (build_vector |
| 115 | (fpround (fma_like (f32 (VOP3PMadMixMods f16:$lo_src0, i32:$lo_src0_modifiers)), |
| 116 | (f32 (VOP3PMadMixMods f16:$lo_src1, i32:$lo_src1_modifiers)), |
| 117 | (f32 (VOP3PMadMixMods f16:$lo_src2, i32:$lo_src2_modifiers)))), |
| 118 | (fpround (fma_like (f32 (VOP3PMadMixMods f16:$hi_src0, i32:$hi_src0_modifiers)), |
| 119 | (f32 (VOP3PMadMixMods f16:$hi_src1, i32:$hi_src1_modifiers)), |
| 120 | (f32 (VOP3PMadMixMods f16:$hi_src2, i32:$hi_src2_modifiers)))))), |
| 121 | (v2f16 (mixhi_inst $hi_src0_modifiers, $hi_src0, |
| 122 | $hi_src1_modifiers, $hi_src1, |
| 123 | $hi_src2_modifiers, $hi_src2, |
| 124 | DSTCLAMP.ENABLE, |
| 125 | (mixlo_inst $lo_src0_modifiers, $lo_src0, |
| 126 | $lo_src1_modifiers, $lo_src1, |
| 127 | $lo_src2_modifiers, $lo_src2, |
| 128 | DSTCLAMP.ENABLE, |
| 129 | (i32 (IMPLICIT_DEF))))) |
| 130 | >; |
| 131 | } |
| Matt Arsenault | 28f52e5 | 2017-10-25 07:00:51 +0000 | [diff] [blame] | 132 | |
| 133 | let SubtargetPredicate = HasMadMixInsts in { |
| Dmitry Preobrazhensky | b2d24e2 | 2017-07-07 14:29:06 +0000 | [diff] [blame] | 134 | // These are VOP3a-like opcodes which accept no omod. |
| 135 | // Size of src arguments (16/32) is controlled by op_sel. |
| 136 | // For 16-bit src arguments their location (hi/lo) are controlled by op_sel_hi. |
| Matt Arsenault | c8f8cda | 2017-08-30 22:18:40 +0000 | [diff] [blame] | 137 | let isCommutable = 1 in { |
| Matt Arsenault | 644883f | 2017-09-20 19:09:28 +0000 | [diff] [blame] | 138 | def V_MAD_MIX_F32 : VOP3_VOP3PInst<"v_mad_mix_f32", VOP3_Profile<VOP_F32_F16_F16_F16, VOP3_OPSEL>>; |
| Matt Arsenault | 7693512 | 2017-09-20 20:28:39 +0000 | [diff] [blame] | 139 | |
| 140 | // Clamp modifier is applied after conversion to f16. |
| Matt Arsenault | e135c4c | 2017-09-20 20:53:49 +0000 | [diff] [blame] | 141 | def V_MAD_MIXLO_F16 : VOP3_VOP3PInst<"v_mad_mixlo_f16", VOP3_Profile<VOP_F16_F16_F16_F16, VOP3_OPSEL>, 1>; |
| Matt Arsenault | 8cbb488 | 2017-09-20 21:01:24 +0000 | [diff] [blame] | 142 | |
| 143 | let ClampLo = 0, ClampHi = 1 in { |
| Matt Arsenault | e135c4c | 2017-09-20 20:53:49 +0000 | [diff] [blame] | 144 | def V_MAD_MIXHI_F16 : VOP3_VOP3PInst<"v_mad_mixhi_f16", VOP3_Profile<VOP_F16_F16_F16_F16, VOP3_OPSEL>, 1>; |
| Matt Arsenault | c8f8cda | 2017-08-30 22:18:40 +0000 | [diff] [blame] | 145 | } |
| Matt Arsenault | 8cbb488 | 2017-09-20 21:01:24 +0000 | [diff] [blame] | 146 | } |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 147 | |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 148 | defm : MadFmaMixPats<fmad, V_MAD_MIX_F32, V_MAD_MIXLO_F16, V_MAD_MIXHI_F16>; |
| 149 | } // End SubtargetPredicate = HasMadMixInsts |
| Matt Arsenault | 7693512 | 2017-09-20 20:28:39 +0000 | [diff] [blame] | 150 | |
| Matt Arsenault | 8cbb488 | 2017-09-20 21:01:24 +0000 | [diff] [blame] | 151 | |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 152 | // Essentially the same as the mad_mix versions |
| 153 | let SubtargetPredicate = HasFmaMixInsts in { |
| 154 | let isCommutable = 1 in { |
| 155 | def V_FMA_MIX_F32 : VOP3_VOP3PInst<"v_fma_mix_f32", VOP3_Profile<VOP_F32_F16_F16_F16, VOP3_OPSEL>>; |
| Matt Arsenault | 8cbb488 | 2017-09-20 21:01:24 +0000 | [diff] [blame] | 156 | |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 157 | // Clamp modifier is applied after conversion to f16. |
| 158 | def V_FMA_MIXLO_F16 : VOP3_VOP3PInst<"v_fma_mixlo_f16", VOP3_Profile<VOP_F16_F16_F16_F16, VOP3_OPSEL>, 1>; |
| Matt Arsenault | 8cbb488 | 2017-09-20 21:01:24 +0000 | [diff] [blame] | 159 | |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 160 | let ClampLo = 0, ClampHi = 1 in { |
| 161 | def V_FMA_MIXHI_F16 : VOP3_VOP3PInst<"v_fma_mixhi_f16", VOP3_Profile<VOP_F16_F16_F16_F16, VOP3_OPSEL>, 1>; |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | defm : MadFmaMixPats<fma, V_FMA_MIX_F32, V_FMA_MIXLO_F16, V_FMA_MIXHI_F16>; |
| 166 | } |
| 167 | |
| 168 | let SubtargetPredicate = HasDLInsts in { |
| 169 | |
| Konstantin Zhuravlyov | bb30ef7 | 2018-08-01 01:31:30 +0000 | [diff] [blame^] | 170 | def V_DOT2_F32_F16 : VOP3PInst<"v_dot2_f32_f16", VOP3_Profile<VOP_F32_V2F16_V2F16_F32>>; |
| 171 | def V_DOT2_I32_I16 : VOP3PInst<"v_dot2_i32_i16", VOP3_Profile<VOP_I32_V2I16_V2I16_I32>>; |
| 172 | def V_DOT2_U32_U16 : VOP3PInst<"v_dot2_u32_u16", VOP3_Profile<VOP_I32_V2I16_V2I16_I32>>; |
| 173 | def V_DOT4_I32_I8 : VOP3PInst<"v_dot4_i32_i8", VOP3_Profile<VOP_I32_I32_I32_I32, VOP3_PACKED>>; |
| 174 | def V_DOT4_U32_U8 : VOP3PInst<"v_dot4_u32_u8", VOP3_Profile<VOP_I32_I32_I32_I32, VOP3_PACKED>>; |
| 175 | def V_DOT8_I32_I4 : VOP3PInst<"v_dot8_i32_i4", VOP3_Profile<VOP_I32_I32_I32_I32, VOP3_PACKED>>; |
| 176 | def V_DOT8_U32_U4 : VOP3PInst<"v_dot8_u32_u4", VOP3_Profile<VOP_I32_I32_I32_I32, VOP3_PACKED>>; |
| 177 | |
| 178 | multiclass DotPats<SDPatternOperator dot_op, |
| 179 | VOP3PInst dot_inst> { |
| 180 | def : GCNPat < |
| 181 | (dot_op (dot_inst.Pfl.Src0VT (VOP3PMods0 dot_inst.Pfl.Src0VT:$src0, i32:$src0_modifiers)), |
| 182 | (dot_inst.Pfl.Src1VT (VOP3PMods dot_inst.Pfl.Src1VT:$src1, i32:$src1_modifiers)), |
| 183 | (dot_inst.Pfl.Src2VT (VOP3PMods dot_inst.Pfl.Src2VT:$src2, i32:$src2_modifiers)), i1:$clamp), |
| 184 | (dot_inst $src0_modifiers, $src0, $src1_modifiers, $src1, $src2_modifiers, $src2, (as_i1imm $clamp))>; |
| 185 | } |
| 186 | |
| 187 | defm : DotPats<AMDGPUfdot2, V_DOT2_F32_F16>; |
| 188 | defm : DotPats<int_amdgcn_sdot2, V_DOT2_I32_I16>; |
| 189 | defm : DotPats<int_amdgcn_udot2, V_DOT2_U32_U16>; |
| 190 | defm : DotPats<int_amdgcn_sdot4, V_DOT4_I32_I8>; |
| 191 | defm : DotPats<int_amdgcn_udot4, V_DOT4_U32_U8>; |
| 192 | defm : DotPats<int_amdgcn_sdot8, V_DOT8_I32_I4>; |
| 193 | defm : DotPats<int_amdgcn_udot8, V_DOT8_U32_U4>; |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 194 | |
| 195 | } // End SubtargetPredicate = HasDLInsts |
| Matt Arsenault | 7693512 | 2017-09-20 20:28:39 +0000 | [diff] [blame] | 196 | |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 197 | multiclass VOP3P_Real_vi<bits<10> op> { |
| Nicolai Haehnle | 4f850ea | 2018-03-26 13:56:53 +0000 | [diff] [blame] | 198 | def _vi : VOP3P_Real<!cast<VOP3_Pseudo>(NAME), SIEncodingFamily.VI>, |
| 199 | VOP3Pe <op, !cast<VOP3_Pseudo>(NAME).Pfl> { |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 200 | let AssemblerPredicates = [HasVOP3PInsts]; |
| 201 | let DecoderNamespace = "VI"; |
| 202 | } |
| 203 | } |
| 204 | |
| Dmitry Preobrazhensky | 095ec3da | 2017-07-18 09:24:10 +0000 | [diff] [blame] | 205 | defm V_PK_MAD_I16 : VOP3P_Real_vi <0x380>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 206 | defm V_PK_MUL_LO_U16 : VOP3P_Real_vi <0x381>; |
| 207 | defm V_PK_ADD_I16 : VOP3P_Real_vi <0x382>; |
| 208 | defm V_PK_SUB_I16 : VOP3P_Real_vi <0x383>; |
| 209 | defm V_PK_LSHLREV_B16 : VOP3P_Real_vi <0x384>; |
| 210 | defm V_PK_LSHRREV_B16 : VOP3P_Real_vi <0x385>; |
| 211 | defm V_PK_ASHRREV_I16 : VOP3P_Real_vi <0x386>; |
| 212 | defm V_PK_MAX_I16 : VOP3P_Real_vi <0x387>; |
| 213 | defm V_PK_MIN_I16 : VOP3P_Real_vi <0x388>; |
| Dmitry Preobrazhensky | 095ec3da | 2017-07-18 09:24:10 +0000 | [diff] [blame] | 214 | defm V_PK_MAD_U16 : VOP3P_Real_vi <0x389>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 215 | |
| 216 | defm V_PK_ADD_U16 : VOP3P_Real_vi <0x38a>; |
| Dmitry Preobrazhensky | 095ec3da | 2017-07-18 09:24:10 +0000 | [diff] [blame] | 217 | defm V_PK_SUB_U16 : VOP3P_Real_vi <0x38b>; |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 218 | defm V_PK_MAX_U16 : VOP3P_Real_vi <0x38c>; |
| 219 | defm V_PK_MIN_U16 : VOP3P_Real_vi <0x38d>; |
| 220 | defm V_PK_FMA_F16 : VOP3P_Real_vi <0x38e>; |
| 221 | defm V_PK_ADD_F16 : VOP3P_Real_vi <0x38f>; |
| 222 | defm V_PK_MUL_F16 : VOP3P_Real_vi <0x390>; |
| 223 | defm V_PK_MIN_F16 : VOP3P_Real_vi <0x391>; |
| 224 | defm V_PK_MAX_F16 : VOP3P_Real_vi <0x392>; |
| 225 | |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 226 | |
| 227 | let SubtargetPredicate = HasMadMixInsts in { |
| Matt Arsenault | 9be7b0d | 2017-02-27 18:49:11 +0000 | [diff] [blame] | 228 | defm V_MAD_MIX_F32 : VOP3P_Real_vi <0x3a0>; |
| 229 | defm V_MAD_MIXLO_F16 : VOP3P_Real_vi <0x3a1>; |
| 230 | defm V_MAD_MIXHI_F16 : VOP3P_Real_vi <0x3a2>; |
| Matt Arsenault | 0084adc | 2018-04-30 19:08:16 +0000 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | let SubtargetPredicate = HasFmaMixInsts in { |
| 234 | let DecoderNamespace = "GFX9_DL" in { |
| 235 | // The mad_mix instructions were renamed and their behaviors changed, |
| 236 | // but the opcode stayed the same so we need to put these in a |
| 237 | // different DecoderNamespace to avoid the ambiguity. |
| 238 | defm V_FMA_MIX_F32 : VOP3P_Real_vi <0x3a0>; |
| 239 | defm V_FMA_MIXLO_F16 : VOP3P_Real_vi <0x3a1>; |
| 240 | defm V_FMA_MIXHI_F16 : VOP3P_Real_vi <0x3a2>; |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | |
| 245 | let SubtargetPredicate = HasDLInsts in { |
| 246 | |
| 247 | defm V_DOT2_F32_F16 : VOP3P_Real_vi <0x3a3>; |
| 248 | defm V_DOT2_I32_I16 : VOP3P_Real_vi <0x3a6>; |
| 249 | defm V_DOT2_U32_U16 : VOP3P_Real_vi <0x3a7>; |
| 250 | defm V_DOT4_I32_I8 : VOP3P_Real_vi <0x3a8>; |
| 251 | defm V_DOT4_U32_U8 : VOP3P_Real_vi <0x3a9>; |
| 252 | defm V_DOT8_I32_I4 : VOP3P_Real_vi <0x3aa>; |
| 253 | defm V_DOT8_U32_U4 : VOP3P_Real_vi <0x3ab>; |
| 254 | |
| 255 | } // End SubtargetPredicate = HasDLInsts |