1//===-- VOPCInstructions.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// Encodings 12//===----------------------------------------------------------------------===// 13 14class VOPCe <bits<8> op> : Enc32 { 15 bits<9> src0; 16 bits<8> src1; 17 18 let Inst{8-0} = src0; 19 let Inst{16-9} = src1; 20 let Inst{24-17} = op; 21 let Inst{31-25} = 0x3e; 22} 23 24class VOPC_SDWAe <bits<8> op, VOPProfile P> : VOP_SDWAe <P> { 25 bits<8> src1; 26 27 let Inst{8-0} = 0xf9; // sdwa 28 let Inst{16-9} = !if(P.HasSrc1, src1{7-0}, 0); 29 let Inst{24-17} = op; 30 let Inst{31-25} = 0x3e; // encoding 31 32 // VOPC disallows dst_sel and dst_unused as they have no effect on destination 33 let Inst{42-40} = 0; 34 let Inst{44-43} = 0; 35} 36 37class VOPC_SDWA9e <bits<8> op, VOPProfile P> : VOP_SDWA9Be <P> { 38 bits<9> src1; 39 40 let Inst{8-0} = 0xf9; // sdwa 41 let Inst{16-9} = !if(P.HasSrc1, src1{7-0}, 0); 42 let Inst{24-17} = op; 43 let Inst{31-25} = 0x3e; // encoding 44 let Inst{63} = !if(P.HasSrc1, src1{8}, 0); // src1_sgpr 45} 46 47 48//===----------------------------------------------------------------------===// 49// VOPC classes 50//===----------------------------------------------------------------------===// 51 52// VOPC instructions are a special case because for the 32-bit 53// encoding, we want to display the implicit vcc write as if it were 54// an explicit $dst. 55class VOPC_Profile<list<SchedReadWrite> sched, ValueType vt0, ValueType vt1 = vt0> : 56 VOPProfile <[i1, vt0, vt1, untyped]> { 57 let Asm32 = "vcc, $src0, $src1"; 58 // The destination for 32-bit encoding is implicit. 59 let HasDst32 = 0; 60 let Outs64 = (outs VOPDstS64:$sdst); 61 list<SchedReadWrite> Schedule = sched; 62} 63 64class VOPC_Pseudo <string opName, VOPC_Profile P, list<dag> pattern=[]> : 65 InstSI<(outs), P.Ins32, "", pattern>, 66 VOP <opName>, 67 SIMCInstr<opName#"_e32", SIEncodingFamily.NONE> { 68 69 let isPseudo = 1; 70 let isCodeGenOnly = 1; 71 let UseNamedOperandTable = 1; 72 73 string Mnemonic = opName; 74 string AsmOperands = P.Asm32; 75 76 let Size = 4; 77 let mayLoad = 0; 78 let mayStore = 0; 79 let hasSideEffects = 0; 80 81 let VALU = 1; 82 let VOPC = 1; 83 let Uses = [EXEC]; 84 let Defs = [VCC]; 85 86 let SubtargetPredicate = isGCN; 87 88 VOPProfile Pfl = P; 89} 90 91class VOPC_Real <VOPC_Pseudo ps, int EncodingFamily> : 92 InstSI <ps.OutOperandList, ps.InOperandList, ps.PseudoInstr # " " # ps.AsmOperands, []>, 93 SIMCInstr <ps.PseudoInstr, EncodingFamily> { 94 95 let isPseudo = 0; 96 let isCodeGenOnly = 0; 97 98 let Constraints = ps.Constraints; 99 let DisableEncoding = ps.DisableEncoding; 100 101 // copy relevant pseudo op flags 102 let SubtargetPredicate = ps.SubtargetPredicate; 103 let AsmMatchConverter = ps.AsmMatchConverter; 104 let Constraints = ps.Constraints; 105 let DisableEncoding = ps.DisableEncoding; 106 let TSFlags = ps.TSFlags; 107 let UseNamedOperandTable = ps.UseNamedOperandTable; 108 let Uses = ps.Uses; 109 let Defs = ps.Defs; 110} 111 112class VOPC_SDWA_Pseudo <string OpName, VOPProfile P, list<dag> pattern=[]> : 113 VOP_SDWA_Pseudo <OpName, P, pattern> { 114 let AsmMatchConverter = "cvtSdwaVOPC"; 115} 116 117// This class is used only with VOPC instructions. Use $sdst for out operand 118class VOPCInstAlias <VOP3_Pseudo ps, Instruction inst, VOPProfile p = ps.Pfl> : 119 InstAlias <ps.OpName#" "#p.Asm32, (inst)>, PredicateControl { 120 121 field bit isCompare; 122 field bit isCommutable; 123 124 let ResultInst = 125 !if (p.HasDst32, 126 !if (!eq(p.NumSrcArgs, 0), 127 // 1 dst, 0 src 128 (inst p.DstRC:$sdst), 129 !if (!eq(p.NumSrcArgs, 1), 130 // 1 dst, 1 src 131 (inst p.DstRC:$sdst, p.Src0RC32:$src0), 132 !if (!eq(p.NumSrcArgs, 2), 133 // 1 dst, 2 src 134 (inst p.DstRC:$sdst, p.Src0RC32:$src0, p.Src1RC32:$src1), 135 // else - unreachable 136 (inst)))), 137 // else 138 !if (!eq(p.NumSrcArgs, 2), 139 // 0 dst, 2 src 140 (inst p.Src0RC32:$src0, p.Src1RC32:$src1), 141 !if (!eq(p.NumSrcArgs, 1), 142 // 0 dst, 1 src 143 (inst p.Src0RC32:$src1), 144 // else 145 // 0 dst, 0 src 146 (inst)))); 147 148 let AsmVariantName = AMDGPUAsmVariants.Default; 149 let SubtargetPredicate = AssemblerPredicate; 150} 151 152class getVOPCPat64 <PatLeaf cond, VOPProfile P> : LetDummies { 153 list<dag> ret = !if(P.HasModifiers, 154 [(set i1:$sdst, 155 (setcc (P.Src0VT 156 !if(P.HasOMod, 157 (VOP3Mods0 P.Src0VT:$src0, i32:$src0_modifiers, i1:$clamp, i32:$omod), 158 (VOP3Mods0 P.Src0VT:$src0, i32:$src0_modifiers, i1:$clamp))), 159 (P.Src1VT (VOP3Mods P.Src1VT:$src1, i32:$src1_modifiers)), 160 cond))], 161 [(set i1:$sdst, (setcc P.Src0VT:$src0, P.Src1VT:$src1, cond))]); 162} 163 164 165multiclass VOPC_Pseudos <string opName, 166 VOPC_Profile P, 167 PatLeaf cond = COND_NULL, 168 string revOp = opName, 169 bit DefExec = 0> { 170 171 def _e32 : VOPC_Pseudo <opName, P>, 172 Commutable_REV<revOp#"_e32", !eq(revOp, opName)> { 173 let Defs = !if(DefExec, [VCC, EXEC], [VCC]); 174 let SchedRW = P.Schedule; 175 let isConvergent = DefExec; 176 let isCompare = 1; 177 let isCommutable = 1; 178 } 179 180 def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret>, 181 Commutable_REV<revOp#"_e64", !eq(revOp, opName)> { 182 let Defs = !if(DefExec, [EXEC], []); 183 let SchedRW = P.Schedule; 184 let isCompare = 1; 185 let isCommutable = 1; 186 } 187 188 def _sdwa : VOPC_SDWA_Pseudo <opName, P> { 189 let Defs = !if(DefExec, [VCC, EXEC], [VCC]); 190 let SchedRW = P.Schedule; 191 let isConvergent = DefExec; 192 let isCompare = 1; 193 } 194} 195 196def VOPC_I1_F16_F16 : VOPC_Profile<[Write32Bit], f16>; 197def VOPC_I1_F32_F32 : VOPC_Profile<[Write32Bit], f32>; 198def VOPC_I1_F64_F64 : VOPC_Profile<[WriteDoubleAdd], f64>; 199def VOPC_I1_I16_I16 : VOPC_Profile<[Write32Bit], i16>; 200def VOPC_I1_I32_I32 : VOPC_Profile<[Write32Bit], i32>; 201def VOPC_I1_I64_I64 : VOPC_Profile<[Write64Bit], i64>; 202 203multiclass VOPC_F16 <string opName, PatLeaf cond = COND_NULL, string revOp = opName> : 204 VOPC_Pseudos <opName, VOPC_I1_F16_F16, cond, revOp, 0>; 205 206multiclass VOPC_F32 <string opName, PatLeaf cond = COND_NULL, string revOp = opName> : 207 VOPC_Pseudos <opName, VOPC_I1_F32_F32, cond, revOp, 0>; 208 209multiclass VOPC_F64 <string opName, PatLeaf cond = COND_NULL, string revOp = opName> : 210 VOPC_Pseudos <opName, VOPC_I1_F64_F64, cond, revOp, 0>; 211 212multiclass VOPC_I16 <string opName, PatLeaf cond = COND_NULL, string revOp = opName> : 213 VOPC_Pseudos <opName, VOPC_I1_I16_I16, cond, revOp, 0>; 214 215multiclass VOPC_I32 <string opName, PatLeaf cond = COND_NULL, string revOp = opName> : 216 VOPC_Pseudos <opName, VOPC_I1_I32_I32, cond, revOp, 0>; 217 218multiclass VOPC_I64 <string opName, PatLeaf cond = COND_NULL, string revOp = opName> : 219 VOPC_Pseudos <opName, VOPC_I1_I64_I64, cond, revOp, 0>; 220 221multiclass VOPCX_F16 <string opName, string revOp = opName> : 222 VOPC_Pseudos <opName, VOPC_I1_F16_F16, COND_NULL, revOp, 1>; 223 224multiclass VOPCX_F32 <string opName, string revOp = opName> : 225 VOPC_Pseudos <opName, VOPC_I1_F32_F32, COND_NULL, revOp, 1>; 226 227multiclass VOPCX_F64 <string opName, string revOp = opName> : 228 VOPC_Pseudos <opName, VOPC_I1_F64_F64, COND_NULL, revOp, 1>; 229 230multiclass VOPCX_I16 <string opName, string revOp = opName> : 231 VOPC_Pseudos <opName, VOPC_I1_I16_I16, COND_NULL, revOp, 1>; 232 233multiclass VOPCX_I32 <string opName, string revOp = opName> : 234 VOPC_Pseudos <opName, VOPC_I1_I32_I32, COND_NULL, revOp, 1>; 235 236multiclass VOPCX_I64 <string opName, string revOp = opName> : 237 VOPC_Pseudos <opName, VOPC_I1_I64_I64, COND_NULL, revOp, 1>; 238 239 240//===----------------------------------------------------------------------===// 241// Compare instructions 242//===----------------------------------------------------------------------===// 243 244defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">; 245defm V_CMP_LT_F32 : VOPC_F32 <"v_cmp_lt_f32", COND_OLT, "v_cmp_gt_f32">; 246defm V_CMP_EQ_F32 : VOPC_F32 <"v_cmp_eq_f32", COND_OEQ>; 247defm V_CMP_LE_F32 : VOPC_F32 <"v_cmp_le_f32", COND_OLE, "v_cmp_ge_f32">; 248defm V_CMP_GT_F32 : VOPC_F32 <"v_cmp_gt_f32", COND_OGT>; 249defm V_CMP_LG_F32 : VOPC_F32 <"v_cmp_lg_f32", COND_ONE>; 250defm V_CMP_GE_F32 : VOPC_F32 <"v_cmp_ge_f32", COND_OGE>; 251defm V_CMP_O_F32 : VOPC_F32 <"v_cmp_o_f32", COND_O>; 252defm V_CMP_U_F32 : VOPC_F32 <"v_cmp_u_f32", COND_UO>; 253defm V_CMP_NGE_F32 : VOPC_F32 <"v_cmp_nge_f32", COND_ULT, "v_cmp_nle_f32">; 254defm V_CMP_NLG_F32 : VOPC_F32 <"v_cmp_nlg_f32", COND_UEQ>; 255defm V_CMP_NGT_F32 : VOPC_F32 <"v_cmp_ngt_f32", COND_ULE, "v_cmp_nlt_f32">; 256defm V_CMP_NLE_F32 : VOPC_F32 <"v_cmp_nle_f32", COND_UGT>; 257defm V_CMP_NEQ_F32 : VOPC_F32 <"v_cmp_neq_f32", COND_UNE>; 258defm V_CMP_NLT_F32 : VOPC_F32 <"v_cmp_nlt_f32", COND_UGE>; 259defm V_CMP_TRU_F32 : VOPC_F32 <"v_cmp_tru_f32">; 260 261defm V_CMPX_F_F32 : VOPCX_F32 <"v_cmpx_f_f32">; 262defm V_CMPX_LT_F32 : VOPCX_F32 <"v_cmpx_lt_f32", "v_cmpx_gt_f32">; 263defm V_CMPX_EQ_F32 : VOPCX_F32 <"v_cmpx_eq_f32">; 264defm V_CMPX_LE_F32 : VOPCX_F32 <"v_cmpx_le_f32", "v_cmpx_ge_f32">; 265defm V_CMPX_GT_F32 : VOPCX_F32 <"v_cmpx_gt_f32">; 266defm V_CMPX_LG_F32 : VOPCX_F32 <"v_cmpx_lg_f32">; 267defm V_CMPX_GE_F32 : VOPCX_F32 <"v_cmpx_ge_f32">; 268defm V_CMPX_O_F32 : VOPCX_F32 <"v_cmpx_o_f32">; 269defm V_CMPX_U_F32 : VOPCX_F32 <"v_cmpx_u_f32">; 270defm V_CMPX_NGE_F32 : VOPCX_F32 <"v_cmpx_nge_f32", "v_cmpx_nle_f32">; 271defm V_CMPX_NLG_F32 : VOPCX_F32 <"v_cmpx_nlg_f32">; 272defm V_CMPX_NGT_F32 : VOPCX_F32 <"v_cmpx_ngt_f32", "v_cmpx_nlt_f32">; 273defm V_CMPX_NLE_F32 : VOPCX_F32 <"v_cmpx_nle_f32">; 274defm V_CMPX_NEQ_F32 : VOPCX_F32 <"v_cmpx_neq_f32">; 275defm V_CMPX_NLT_F32 : VOPCX_F32 <"v_cmpx_nlt_f32">; 276defm V_CMPX_TRU_F32 : VOPCX_F32 <"v_cmpx_tru_f32">; 277 278defm V_CMP_F_F64 : VOPC_F64 <"v_cmp_f_f64">; 279defm V_CMP_LT_F64 : VOPC_F64 <"v_cmp_lt_f64", COND_OLT, "v_cmp_gt_f64">; 280defm V_CMP_EQ_F64 : VOPC_F64 <"v_cmp_eq_f64", COND_OEQ>; 281defm V_CMP_LE_F64 : VOPC_F64 <"v_cmp_le_f64", COND_OLE, "v_cmp_ge_f64">; 282defm V_CMP_GT_F64 : VOPC_F64 <"v_cmp_gt_f64", COND_OGT>; 283defm V_CMP_LG_F64 : VOPC_F64 <"v_cmp_lg_f64", COND_ONE>; 284defm V_CMP_GE_F64 : VOPC_F64 <"v_cmp_ge_f64", COND_OGE>; 285defm V_CMP_O_F64 : VOPC_F64 <"v_cmp_o_f64", COND_O>; 286defm V_CMP_U_F64 : VOPC_F64 <"v_cmp_u_f64", COND_UO>; 287defm V_CMP_NGE_F64 : VOPC_F64 <"v_cmp_nge_f64", COND_ULT, "v_cmp_nle_f64">; 288defm V_CMP_NLG_F64 : VOPC_F64 <"v_cmp_nlg_f64", COND_UEQ>; 289defm V_CMP_NGT_F64 : VOPC_F64 <"v_cmp_ngt_f64", COND_ULE, "v_cmp_nlt_f64">; 290defm V_CMP_NLE_F64 : VOPC_F64 <"v_cmp_nle_f64", COND_UGT>; 291defm V_CMP_NEQ_F64 : VOPC_F64 <"v_cmp_neq_f64", COND_UNE>; 292defm V_CMP_NLT_F64 : VOPC_F64 <"v_cmp_nlt_f64", COND_UGE>; 293defm V_CMP_TRU_F64 : VOPC_F64 <"v_cmp_tru_f64">; 294 295defm V_CMPX_F_F64 : VOPCX_F64 <"v_cmpx_f_f64">; 296defm V_CMPX_LT_F64 : VOPCX_F64 <"v_cmpx_lt_f64", "v_cmpx_gt_f64">; 297defm V_CMPX_EQ_F64 : VOPCX_F64 <"v_cmpx_eq_f64">; 298defm V_CMPX_LE_F64 : VOPCX_F64 <"v_cmpx_le_f64", "v_cmpx_ge_f64">; 299defm V_CMPX_GT_F64 : VOPCX_F64 <"v_cmpx_gt_f64">; 300defm V_CMPX_LG_F64 : VOPCX_F64 <"v_cmpx_lg_f64">; 301defm V_CMPX_GE_F64 : VOPCX_F64 <"v_cmpx_ge_f64">; 302defm V_CMPX_O_F64 : VOPCX_F64 <"v_cmpx_o_f64">; 303defm V_CMPX_U_F64 : VOPCX_F64 <"v_cmpx_u_f64">; 304defm V_CMPX_NGE_F64 : VOPCX_F64 <"v_cmpx_nge_f64", "v_cmpx_nle_f64">; 305defm V_CMPX_NLG_F64 : VOPCX_F64 <"v_cmpx_nlg_f64">; 306defm V_CMPX_NGT_F64 : VOPCX_F64 <"v_cmpx_ngt_f64", "v_cmpx_nlt_f64">; 307defm V_CMPX_NLE_F64 : VOPCX_F64 <"v_cmpx_nle_f64">; 308defm V_CMPX_NEQ_F64 : VOPCX_F64 <"v_cmpx_neq_f64">; 309defm V_CMPX_NLT_F64 : VOPCX_F64 <"v_cmpx_nlt_f64">; 310defm V_CMPX_TRU_F64 : VOPCX_F64 <"v_cmpx_tru_f64">; 311 312let SubtargetPredicate = isSICI in { 313 314defm V_CMPS_F_F32 : VOPC_F32 <"v_cmps_f_f32">; 315defm V_CMPS_LT_F32 : VOPC_F32 <"v_cmps_lt_f32", COND_NULL, "v_cmps_gt_f32">; 316defm V_CMPS_EQ_F32 : VOPC_F32 <"v_cmps_eq_f32">; 317defm V_CMPS_LE_F32 : VOPC_F32 <"v_cmps_le_f32", COND_NULL, "v_cmps_ge_f32">; 318defm V_CMPS_GT_F32 : VOPC_F32 <"v_cmps_gt_f32">; 319defm V_CMPS_LG_F32 : VOPC_F32 <"v_cmps_lg_f32">; 320defm V_CMPS_GE_F32 : VOPC_F32 <"v_cmps_ge_f32">; 321defm V_CMPS_O_F32 : VOPC_F32 <"v_cmps_o_f32">; 322defm V_CMPS_U_F32 : VOPC_F32 <"v_cmps_u_f32">; 323defm V_CMPS_NGE_F32 : VOPC_F32 <"v_cmps_nge_f32", COND_NULL, "v_cmps_nle_f32">; 324defm V_CMPS_NLG_F32 : VOPC_F32 <"v_cmps_nlg_f32">; 325defm V_CMPS_NGT_F32 : VOPC_F32 <"v_cmps_ngt_f32", COND_NULL, "v_cmps_nlt_f32">; 326defm V_CMPS_NLE_F32 : VOPC_F32 <"v_cmps_nle_f32">; 327defm V_CMPS_NEQ_F32 : VOPC_F32 <"v_cmps_neq_f32">; 328defm V_CMPS_NLT_F32 : VOPC_F32 <"v_cmps_nlt_f32">; 329defm V_CMPS_TRU_F32 : VOPC_F32 <"v_cmps_tru_f32">; 330 331defm V_CMPSX_F_F32 : VOPCX_F32 <"v_cmpsx_f_f32">; 332defm V_CMPSX_LT_F32 : VOPCX_F32 <"v_cmpsx_lt_f32", "v_cmpsx_gt_f32">; 333defm V_CMPSX_EQ_F32 : VOPCX_F32 <"v_cmpsx_eq_f32">; 334defm V_CMPSX_LE_F32 : VOPCX_F32 <"v_cmpsx_le_f32", "v_cmpsx_ge_f32">; 335defm V_CMPSX_GT_F32 : VOPCX_F32 <"v_cmpsx_gt_f32">; 336defm V_CMPSX_LG_F32 : VOPCX_F32 <"v_cmpsx_lg_f32">; 337defm V_CMPSX_GE_F32 : VOPCX_F32 <"v_cmpsx_ge_f32">; 338defm V_CMPSX_O_F32 : VOPCX_F32 <"v_cmpsx_o_f32">; 339defm V_CMPSX_U_F32 : VOPCX_F32 <"v_cmpsx_u_f32">; 340defm V_CMPSX_NGE_F32 : VOPCX_F32 <"v_cmpsx_nge_f32", "v_cmpsx_nle_f32">; 341defm V_CMPSX_NLG_F32 : VOPCX_F32 <"v_cmpsx_nlg_f32">; 342defm V_CMPSX_NGT_F32 : VOPCX_F32 <"v_cmpsx_ngt_f32", "v_cmpsx_nlt_f32">; 343defm V_CMPSX_NLE_F32 : VOPCX_F32 <"v_cmpsx_nle_f32">; 344defm V_CMPSX_NEQ_F32 : VOPCX_F32 <"v_cmpsx_neq_f32">; 345defm V_CMPSX_NLT_F32 : VOPCX_F32 <"v_cmpsx_nlt_f32">; 346defm V_CMPSX_TRU_F32 : VOPCX_F32 <"v_cmpsx_tru_f32">; 347 348defm V_CMPS_F_F64 : VOPC_F64 <"v_cmps_f_f64">; 349defm V_CMPS_LT_F64 : VOPC_F64 <"v_cmps_lt_f64", COND_NULL, "v_cmps_gt_f64">; 350defm V_CMPS_EQ_F64 : VOPC_F64 <"v_cmps_eq_f64">; 351defm V_CMPS_LE_F64 : VOPC_F64 <"v_cmps_le_f64", COND_NULL, "v_cmps_ge_f64">; 352defm V_CMPS_GT_F64 : VOPC_F64 <"v_cmps_gt_f64">; 353defm V_CMPS_LG_F64 : VOPC_F64 <"v_cmps_lg_f64">; 354defm V_CMPS_GE_F64 : VOPC_F64 <"v_cmps_ge_f64">; 355defm V_CMPS_O_F64 : VOPC_F64 <"v_cmps_o_f64">; 356defm V_CMPS_U_F64 : VOPC_F64 <"v_cmps_u_f64">; 357defm V_CMPS_NGE_F64 : VOPC_F64 <"v_cmps_nge_f64", COND_NULL, "v_cmps_nle_f64">; 358defm V_CMPS_NLG_F64 : VOPC_F64 <"v_cmps_nlg_f64">; 359defm V_CMPS_NGT_F64 : VOPC_F64 <"v_cmps_ngt_f64", COND_NULL, "v_cmps_nlt_f64">; 360defm V_CMPS_NLE_F64 : VOPC_F64 <"v_cmps_nle_f64">; 361defm V_CMPS_NEQ_F64 : VOPC_F64 <"v_cmps_neq_f64">; 362defm V_CMPS_NLT_F64 : VOPC_F64 <"v_cmps_nlt_f64">; 363defm V_CMPS_TRU_F64 : VOPC_F64 <"v_cmps_tru_f64">; 364 365defm V_CMPSX_F_F64 : VOPCX_F64 <"v_cmpsx_f_f64">; 366defm V_CMPSX_LT_F64 : VOPCX_F64 <"v_cmpsx_lt_f64", "v_cmpsx_gt_f64">; 367defm V_CMPSX_EQ_F64 : VOPCX_F64 <"v_cmpsx_eq_f64">; 368defm V_CMPSX_LE_F64 : VOPCX_F64 <"v_cmpsx_le_f64", "v_cmpsx_ge_f64">; 369defm V_CMPSX_GT_F64 : VOPCX_F64 <"v_cmpsx_gt_f64">; 370defm V_CMPSX_LG_F64 : VOPCX_F64 <"v_cmpsx_lg_f64">; 371defm V_CMPSX_GE_F64 : VOPCX_F64 <"v_cmpsx_ge_f64">; 372defm V_CMPSX_O_F64 : VOPCX_F64 <"v_cmpsx_o_f64">; 373defm V_CMPSX_U_F64 : VOPCX_F64 <"v_cmpsx_u_f64">; 374defm V_CMPSX_NGE_F64 : VOPCX_F64 <"v_cmpsx_nge_f64", "v_cmpsx_nle_f64">; 375defm V_CMPSX_NLG_F64 : VOPCX_F64 <"v_cmpsx_nlg_f64">; 376defm V_CMPSX_NGT_F64 : VOPCX_F64 <"v_cmpsx_ngt_f64", "v_cmpsx_nlt_f64">; 377defm V_CMPSX_NLE_F64 : VOPCX_F64 <"v_cmpsx_nle_f64">; 378defm V_CMPSX_NEQ_F64 : VOPCX_F64 <"v_cmpsx_neq_f64">; 379defm V_CMPSX_NLT_F64 : VOPCX_F64 <"v_cmpsx_nlt_f64">; 380defm V_CMPSX_TRU_F64 : VOPCX_F64 <"v_cmpsx_tru_f64">; 381 382} // End SubtargetPredicate = isSICI 383 384let SubtargetPredicate = Has16BitInsts in { 385 386defm V_CMP_F_F16 : VOPC_F16 <"v_cmp_f_f16">; 387defm V_CMP_LT_F16 : VOPC_F16 <"v_cmp_lt_f16", COND_OLT, "v_cmp_gt_f16">; 388defm V_CMP_EQ_F16 : VOPC_F16 <"v_cmp_eq_f16", COND_OEQ>; 389defm V_CMP_LE_F16 : VOPC_F16 <"v_cmp_le_f16", COND_OLE, "v_cmp_ge_f16">; 390defm V_CMP_GT_F16 : VOPC_F16 <"v_cmp_gt_f16", COND_OGT>; 391defm V_CMP_LG_F16 : VOPC_F16 <"v_cmp_lg_f16", COND_ONE>; 392defm V_CMP_GE_F16 : VOPC_F16 <"v_cmp_ge_f16", COND_OGE>; 393defm V_CMP_O_F16 : VOPC_F16 <"v_cmp_o_f16", COND_O>; 394defm V_CMP_U_F16 : VOPC_F16 <"v_cmp_u_f16", COND_UO>; 395defm V_CMP_NGE_F16 : VOPC_F16 <"v_cmp_nge_f16", COND_ULT, "v_cmp_nle_f16">; 396defm V_CMP_NLG_F16 : VOPC_F16 <"v_cmp_nlg_f16", COND_UEQ>; 397defm V_CMP_NGT_F16 : VOPC_F16 <"v_cmp_ngt_f16", COND_ULE, "v_cmp_nlt_f16">; 398defm V_CMP_NLE_F16 : VOPC_F16 <"v_cmp_nle_f16", COND_UGT>; 399defm V_CMP_NEQ_F16 : VOPC_F16 <"v_cmp_neq_f16", COND_UNE>; 400defm V_CMP_NLT_F16 : VOPC_F16 <"v_cmp_nlt_f16", COND_UGE>; 401defm V_CMP_TRU_F16 : VOPC_F16 <"v_cmp_tru_f16">; 402 403defm V_CMPX_F_F16 : VOPCX_F16 <"v_cmpx_f_f16">; 404defm V_CMPX_LT_F16 : VOPCX_F16 <"v_cmpx_lt_f16", "v_cmpx_gt_f16">; 405defm V_CMPX_EQ_F16 : VOPCX_F16 <"v_cmpx_eq_f16">; 406defm V_CMPX_LE_F16 : VOPCX_F16 <"v_cmpx_le_f16", "v_cmpx_ge_f16">; 407defm V_CMPX_GT_F16 : VOPCX_F16 <"v_cmpx_gt_f16">; 408defm V_CMPX_LG_F16 : VOPCX_F16 <"v_cmpx_lg_f16">; 409defm V_CMPX_GE_F16 : VOPCX_F16 <"v_cmpx_ge_f16">; 410defm V_CMPX_O_F16 : VOPCX_F16 <"v_cmpx_o_f16">; 411defm V_CMPX_U_F16 : VOPCX_F16 <"v_cmpx_u_f16">; 412defm V_CMPX_NGE_F16 : VOPCX_F16 <"v_cmpx_nge_f16", "v_cmpx_nle_f16">; 413defm V_CMPX_NLG_F16 : VOPCX_F16 <"v_cmpx_nlg_f16">; 414defm V_CMPX_NGT_F16 : VOPCX_F16 <"v_cmpx_ngt_f16", "v_cmpx_nlt_f16">; 415defm V_CMPX_NLE_F16 : VOPCX_F16 <"v_cmpx_nle_f16">; 416defm V_CMPX_NEQ_F16 : VOPCX_F16 <"v_cmpx_neq_f16">; 417defm V_CMPX_NLT_F16 : VOPCX_F16 <"v_cmpx_nlt_f16">; 418defm V_CMPX_TRU_F16 : VOPCX_F16 <"v_cmpx_tru_f16">; 419 420defm V_CMP_F_I16 : VOPC_I16 <"v_cmp_f_i16">; 421defm V_CMP_LT_I16 : VOPC_I16 <"v_cmp_lt_i16", COND_SLT, "v_cmp_gt_i16">; 422defm V_CMP_EQ_I16 : VOPC_I16 <"v_cmp_eq_i16">; 423defm V_CMP_LE_I16 : VOPC_I16 <"v_cmp_le_i16", COND_SLE, "v_cmp_ge_i16">; 424defm V_CMP_GT_I16 : VOPC_I16 <"v_cmp_gt_i16", COND_SGT>; 425defm V_CMP_NE_I16 : VOPC_I16 <"v_cmp_ne_i16">; 426defm V_CMP_GE_I16 : VOPC_I16 <"v_cmp_ge_i16", COND_SGE>; 427defm V_CMP_T_I16 : VOPC_I16 <"v_cmp_t_i16">; 428 429defm V_CMP_F_U16 : VOPC_I16 <"v_cmp_f_u16">; 430defm V_CMP_LT_U16 : VOPC_I16 <"v_cmp_lt_u16", COND_ULT, "v_cmp_gt_u16">; 431defm V_CMP_EQ_U16 : VOPC_I16 <"v_cmp_eq_u16", COND_EQ>; 432defm V_CMP_LE_U16 : VOPC_I16 <"v_cmp_le_u16", COND_ULE, "v_cmp_ge_u16">; 433defm V_CMP_GT_U16 : VOPC_I16 <"v_cmp_gt_u16", COND_UGT>; 434defm V_CMP_NE_U16 : VOPC_I16 <"v_cmp_ne_u16", COND_NE>; 435defm V_CMP_GE_U16 : VOPC_I16 <"v_cmp_ge_u16", COND_UGE>; 436defm V_CMP_T_U16 : VOPC_I16 <"v_cmp_t_u16">; 437 438defm V_CMPX_F_I16 : VOPCX_I16 <"v_cmpx_f_i16">; 439defm V_CMPX_LT_I16 : VOPCX_I16 <"v_cmpx_lt_i16", "v_cmpx_gt_i16">; 440defm V_CMPX_EQ_I16 : VOPCX_I16 <"v_cmpx_eq_i16">; 441defm V_CMPX_LE_I16 : VOPCX_I16 <"v_cmpx_le_i16", "v_cmpx_ge_i16">; 442defm V_CMPX_GT_I16 : VOPCX_I16 <"v_cmpx_gt_i16">; 443defm V_CMPX_NE_I16 : VOPCX_I16 <"v_cmpx_ne_i16">; 444defm V_CMPX_GE_I16 : VOPCX_I16 <"v_cmpx_ge_i16">; 445defm V_CMPX_T_I16 : VOPCX_I16 <"v_cmpx_t_i16">; 446defm V_CMPX_F_U16 : VOPCX_I16 <"v_cmpx_f_u16">; 447 448defm V_CMPX_LT_U16 : VOPCX_I16 <"v_cmpx_lt_u16", "v_cmpx_gt_u16">; 449defm V_CMPX_EQ_U16 : VOPCX_I16 <"v_cmpx_eq_u16">; 450defm V_CMPX_LE_U16 : VOPCX_I16 <"v_cmpx_le_u16", "v_cmpx_ge_u16">; 451defm V_CMPX_GT_U16 : VOPCX_I16 <"v_cmpx_gt_u16">; 452defm V_CMPX_NE_U16 : VOPCX_I16 <"v_cmpx_ne_u16">; 453defm V_CMPX_GE_U16 : VOPCX_I16 <"v_cmpx_ge_u16">; 454defm V_CMPX_T_U16 : VOPCX_I16 <"v_cmpx_t_u16">; 455 456} // End SubtargetPredicate = Has16BitInsts 457 458defm V_CMP_F_I32 : VOPC_I32 <"v_cmp_f_i32">; 459defm V_CMP_LT_I32 : VOPC_I32 <"v_cmp_lt_i32", COND_SLT, "v_cmp_gt_i32">; 460defm V_CMP_EQ_I32 : VOPC_I32 <"v_cmp_eq_i32">; 461defm V_CMP_LE_I32 : VOPC_I32 <"v_cmp_le_i32", COND_SLE, "v_cmp_ge_i32">; 462defm V_CMP_GT_I32 : VOPC_I32 <"v_cmp_gt_i32", COND_SGT>; 463defm V_CMP_NE_I32 : VOPC_I32 <"v_cmp_ne_i32">; 464defm V_CMP_GE_I32 : VOPC_I32 <"v_cmp_ge_i32", COND_SGE>; 465defm V_CMP_T_I32 : VOPC_I32 <"v_cmp_t_i32">; 466 467defm V_CMPX_F_I32 : VOPCX_I32 <"v_cmpx_f_i32">; 468defm V_CMPX_LT_I32 : VOPCX_I32 <"v_cmpx_lt_i32", "v_cmpx_gt_i32">; 469defm V_CMPX_EQ_I32 : VOPCX_I32 <"v_cmpx_eq_i32">; 470defm V_CMPX_LE_I32 : VOPCX_I32 <"v_cmpx_le_i32", "v_cmpx_ge_i32">; 471defm V_CMPX_GT_I32 : VOPCX_I32 <"v_cmpx_gt_i32">; 472defm V_CMPX_NE_I32 : VOPCX_I32 <"v_cmpx_ne_i32">; 473defm V_CMPX_GE_I32 : VOPCX_I32 <"v_cmpx_ge_i32">; 474defm V_CMPX_T_I32 : VOPCX_I32 <"v_cmpx_t_i32">; 475 476defm V_CMP_F_I64 : VOPC_I64 <"v_cmp_f_i64">; 477defm V_CMP_LT_I64 : VOPC_I64 <"v_cmp_lt_i64", COND_SLT, "v_cmp_gt_i64">; 478defm V_CMP_EQ_I64 : VOPC_I64 <"v_cmp_eq_i64">; 479defm V_CMP_LE_I64 : VOPC_I64 <"v_cmp_le_i64", COND_SLE, "v_cmp_ge_i64">; 480defm V_CMP_GT_I64 : VOPC_I64 <"v_cmp_gt_i64", COND_SGT>; 481defm V_CMP_NE_I64 : VOPC_I64 <"v_cmp_ne_i64">; 482defm V_CMP_GE_I64 : VOPC_I64 <"v_cmp_ge_i64", COND_SGE>; 483defm V_CMP_T_I64 : VOPC_I64 <"v_cmp_t_i64">; 484 485defm V_CMPX_F_I64 : VOPCX_I64 <"v_cmpx_f_i64">; 486defm V_CMPX_LT_I64 : VOPCX_I64 <"v_cmpx_lt_i64", "v_cmpx_gt_i64">; 487defm V_CMPX_EQ_I64 : VOPCX_I64 <"v_cmpx_eq_i64">; 488defm V_CMPX_LE_I64 : VOPCX_I64 <"v_cmpx_le_i64", "v_cmpx_ge_i64">; 489defm V_CMPX_GT_I64 : VOPCX_I64 <"v_cmpx_gt_i64">; 490defm V_CMPX_NE_I64 : VOPCX_I64 <"v_cmpx_ne_i64">; 491defm V_CMPX_GE_I64 : VOPCX_I64 <"v_cmpx_ge_i64">; 492defm V_CMPX_T_I64 : VOPCX_I64 <"v_cmpx_t_i64">; 493 494defm V_CMP_F_U32 : VOPC_I32 <"v_cmp_f_u32">; 495defm V_CMP_LT_U32 : VOPC_I32 <"v_cmp_lt_u32", COND_ULT, "v_cmp_gt_u32">; 496defm V_CMP_EQ_U32 : VOPC_I32 <"v_cmp_eq_u32", COND_EQ>; 497defm V_CMP_LE_U32 : VOPC_I32 <"v_cmp_le_u32", COND_ULE, "v_cmp_ge_u32">; 498defm V_CMP_GT_U32 : VOPC_I32 <"v_cmp_gt_u32", COND_UGT>; 499defm V_CMP_NE_U32 : VOPC_I32 <"v_cmp_ne_u32", COND_NE>; 500defm V_CMP_GE_U32 : VOPC_I32 <"v_cmp_ge_u32", COND_UGE>; 501defm V_CMP_T_U32 : VOPC_I32 <"v_cmp_t_u32">; 502 503defm V_CMPX_F_U32 : VOPCX_I32 <"v_cmpx_f_u32">; 504defm V_CMPX_LT_U32 : VOPCX_I32 <"v_cmpx_lt_u32", "v_cmpx_gt_u32">; 505defm V_CMPX_EQ_U32 : VOPCX_I32 <"v_cmpx_eq_u32">; 506defm V_CMPX_LE_U32 : VOPCX_I32 <"v_cmpx_le_u32", "v_cmpx_le_u32">; 507defm V_CMPX_GT_U32 : VOPCX_I32 <"v_cmpx_gt_u32">; 508defm V_CMPX_NE_U32 : VOPCX_I32 <"v_cmpx_ne_u32">; 509defm V_CMPX_GE_U32 : VOPCX_I32 <"v_cmpx_ge_u32">; 510defm V_CMPX_T_U32 : VOPCX_I32 <"v_cmpx_t_u32">; 511 512defm V_CMP_F_U64 : VOPC_I64 <"v_cmp_f_u64">; 513defm V_CMP_LT_U64 : VOPC_I64 <"v_cmp_lt_u64", COND_ULT, "v_cmp_gt_u64">; 514defm V_CMP_EQ_U64 : VOPC_I64 <"v_cmp_eq_u64", COND_EQ>; 515defm V_CMP_LE_U64 : VOPC_I64 <"v_cmp_le_u64", COND_ULE, "v_cmp_ge_u64">; 516defm V_CMP_GT_U64 : VOPC_I64 <"v_cmp_gt_u64", COND_UGT>; 517defm V_CMP_NE_U64 : VOPC_I64 <"v_cmp_ne_u64", COND_NE>; 518defm V_CMP_GE_U64 : VOPC_I64 <"v_cmp_ge_u64", COND_UGE>; 519defm V_CMP_T_U64 : VOPC_I64 <"v_cmp_t_u64">; 520 521defm V_CMPX_F_U64 : VOPCX_I64 <"v_cmpx_f_u64">; 522defm V_CMPX_LT_U64 : VOPCX_I64 <"v_cmpx_lt_u64", "v_cmpx_gt_u64">; 523defm V_CMPX_EQ_U64 : VOPCX_I64 <"v_cmpx_eq_u64">; 524defm V_CMPX_LE_U64 : VOPCX_I64 <"v_cmpx_le_u64", "v_cmpx_ge_u64">; 525defm V_CMPX_GT_U64 : VOPCX_I64 <"v_cmpx_gt_u64">; 526defm V_CMPX_NE_U64 : VOPCX_I64 <"v_cmpx_ne_u64">; 527defm V_CMPX_GE_U64 : VOPCX_I64 <"v_cmpx_ge_u64">; 528defm V_CMPX_T_U64 : VOPCX_I64 <"v_cmpx_t_u64">; 529 530//===----------------------------------------------------------------------===// 531// Class instructions 532//===----------------------------------------------------------------------===// 533 534class VOPC_Class_Profile<list<SchedReadWrite> sched, ValueType vt> : 535 VOPC_Profile<sched, vt, i32> { 536 let Ins64 = (ins Src0Mod:$src0_modifiers, Src0RC64:$src0, Src1RC64:$src1); 537 let Asm64 = "$sdst, $src0_modifiers, $src1"; 538 539 let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0, 540 Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1, 541 clampmod:$clamp, src0_sel:$src0_sel, src1_sel:$src1_sel); 542 543 let AsmSDWA = " vcc, $src0_modifiers, $src1_modifiers$clamp $src0_sel $src1_sel"; 544 let HasSrc1Mods = 0; 545 let HasClamp = 0; 546 let HasOMod = 0; 547} 548 549class getVOPCClassPat64 <VOPProfile P> { 550 list<dag> ret = 551 [(set i1:$sdst, 552 (AMDGPUfp_class 553 (P.Src0VT (VOP3Mods0Clamp0OMod P.Src0VT:$src0, i32:$src0_modifiers)), 554 P.Src1VT:$src1))]; 555} 556 557// Special case for class instructions which only have modifiers on 558// the 1st source operand. 559multiclass VOPC_Class_Pseudos <string opName, VOPC_Profile p, bit DefExec> { 560 def _e32 : VOPC_Pseudo <opName, p> { 561 let Defs = !if(DefExec, [VCC, EXEC], [VCC]); 562 let SchedRW = p.Schedule; 563 let isConvergent = DefExec; 564 } 565 566 def _e64 : VOP3_Pseudo<opName, p, getVOPCClassPat64<p>.ret> { 567 let Defs = !if(DefExec, [EXEC], []); 568 let SchedRW = p.Schedule; 569 } 570 571 def _sdwa : VOPC_SDWA_Pseudo <opName, p> { 572 let Defs = !if(DefExec, [VCC, EXEC], [VCC]); 573 let SchedRW = p.Schedule; 574 let isConvergent = DefExec; 575 } 576} 577 578def VOPC_I1_F16_I32 : VOPC_Class_Profile<[Write32Bit], f16>; 579def VOPC_I1_F32_I32 : VOPC_Class_Profile<[Write32Bit], f32>; 580def VOPC_I1_F64_I32 : VOPC_Class_Profile<[WriteDoubleAdd], f64>; 581 582multiclass VOPC_CLASS_F16 <string opName> : 583 VOPC_Class_Pseudos <opName, VOPC_I1_F16_I32, 0>; 584 585multiclass VOPCX_CLASS_F16 <string opName> : 586 VOPC_Class_Pseudos <opName, VOPC_I1_F16_I32, 1>; 587 588multiclass VOPC_CLASS_F32 <string opName> : 589 VOPC_Class_Pseudos <opName, VOPC_I1_F32_I32, 0>; 590 591multiclass VOPCX_CLASS_F32 <string opName> : 592 VOPC_Class_Pseudos <opName, VOPC_I1_F32_I32, 1>; 593 594multiclass VOPC_CLASS_F64 <string opName> : 595 VOPC_Class_Pseudos <opName, VOPC_I1_F64_I32, 0>; 596 597multiclass VOPCX_CLASS_F64 <string opName> : 598 VOPC_Class_Pseudos <opName, VOPC_I1_F64_I32, 1>; 599 600defm V_CMP_CLASS_F32 : VOPC_CLASS_F32 <"v_cmp_class_f32">; 601defm V_CMPX_CLASS_F32 : VOPCX_CLASS_F32 <"v_cmpx_class_f32">; 602defm V_CMP_CLASS_F64 : VOPC_CLASS_F64 <"v_cmp_class_f64">; 603defm V_CMPX_CLASS_F64 : VOPCX_CLASS_F64 <"v_cmpx_class_f64">; 604defm V_CMP_CLASS_F16 : VOPC_CLASS_F16 <"v_cmp_class_f16">; 605defm V_CMPX_CLASS_F16 : VOPCX_CLASS_F16 <"v_cmpx_class_f16">; 606 607//===----------------------------------------------------------------------===// 608// V_ICMPIntrinsic Pattern. 609//===----------------------------------------------------------------------===// 610 611class ICMP_Pattern <PatLeaf cond, Instruction inst, ValueType vt> : GCNPat < 612 (AMDGPUsetcc vt:$src0, vt:$src1, cond), 613 (inst $src0, $src1) 614>; 615 616def : ICMP_Pattern <COND_EQ, V_CMP_EQ_U32_e64, i32>; 617def : ICMP_Pattern <COND_NE, V_CMP_NE_U32_e64, i32>; 618def : ICMP_Pattern <COND_UGT, V_CMP_GT_U32_e64, i32>; 619def : ICMP_Pattern <COND_UGE, V_CMP_GE_U32_e64, i32>; 620def : ICMP_Pattern <COND_ULT, V_CMP_LT_U32_e64, i32>; 621def : ICMP_Pattern <COND_ULE, V_CMP_LE_U32_e64, i32>; 622def : ICMP_Pattern <COND_SGT, V_CMP_GT_I32_e64, i32>; 623def : ICMP_Pattern <COND_SGE, V_CMP_GE_I32_e64, i32>; 624def : ICMP_Pattern <COND_SLT, V_CMP_LT_I32_e64, i32>; 625def : ICMP_Pattern <COND_SLE, V_CMP_LE_I32_e64, i32>; 626 627def : ICMP_Pattern <COND_EQ, V_CMP_EQ_U64_e64, i64>; 628def : ICMP_Pattern <COND_NE, V_CMP_NE_U64_e64, i64>; 629def : ICMP_Pattern <COND_UGT, V_CMP_GT_U64_e64, i64>; 630def : ICMP_Pattern <COND_UGE, V_CMP_GE_U64_e64, i64>; 631def : ICMP_Pattern <COND_ULT, V_CMP_LT_U64_e64, i64>; 632def : ICMP_Pattern <COND_ULE, V_CMP_LE_U64_e64, i64>; 633def : ICMP_Pattern <COND_SGT, V_CMP_GT_I64_e64, i64>; 634def : ICMP_Pattern <COND_SGE, V_CMP_GE_I64_e64, i64>; 635def : ICMP_Pattern <COND_SLT, V_CMP_LT_I64_e64, i64>; 636def : ICMP_Pattern <COND_SLE, V_CMP_LE_I64_e64, i64>; 637 638class FCMP_Pattern <PatLeaf cond, Instruction inst, ValueType vt> : GCNPat < 639 (i64 (AMDGPUsetcc (vt (VOP3Mods vt:$src0, i32:$src0_modifiers)), 640 (vt (VOP3Mods vt:$src1, i32:$src1_modifiers)), cond)), 641 (inst $src0_modifiers, $src0, $src1_modifiers, $src1, 642 DSTCLAMP.NONE) 643>; 644 645def : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F32_e64, f32>; 646def : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F32_e64, f32>; 647def : FCMP_Pattern <COND_OGT, V_CMP_GT_F32_e64, f32>; 648def : FCMP_Pattern <COND_OGE, V_CMP_GE_F32_e64, f32>; 649def : FCMP_Pattern <COND_OLT, V_CMP_LT_F32_e64, f32>; 650def : FCMP_Pattern <COND_OLE, V_CMP_LE_F32_e64, f32>; 651 652def : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F64_e64, f64>; 653def : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F64_e64, f64>; 654def : FCMP_Pattern <COND_OGT, V_CMP_GT_F64_e64, f64>; 655def : FCMP_Pattern <COND_OGE, V_CMP_GE_F64_e64, f64>; 656def : FCMP_Pattern <COND_OLT, V_CMP_LT_F64_e64, f64>; 657def : FCMP_Pattern <COND_OLE, V_CMP_LE_F64_e64, f64>; 658 659def : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F32_e64, f32>; 660def : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F32_e64, f32>; 661def : FCMP_Pattern <COND_UGT, V_CMP_NLE_F32_e64, f32>; 662def : FCMP_Pattern <COND_UGE, V_CMP_NLT_F32_e64, f32>; 663def : FCMP_Pattern <COND_ULT, V_CMP_NGE_F32_e64, f32>; 664def : FCMP_Pattern <COND_ULE, V_CMP_NGT_F32_e64, f32>; 665 666def : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F64_e64, f64>; 667def : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F64_e64, f64>; 668def : FCMP_Pattern <COND_UGT, V_CMP_NLE_F64_e64, f64>; 669def : FCMP_Pattern <COND_UGE, V_CMP_NLT_F64_e64, f64>; 670def : FCMP_Pattern <COND_ULT, V_CMP_NGE_F64_e64, f64>; 671def : FCMP_Pattern <COND_ULE, V_CMP_NGT_F64_e64, f64>; 672 673//===----------------------------------------------------------------------===// 674// Target 675//===----------------------------------------------------------------------===// 676 677//===----------------------------------------------------------------------===// 678// SI 679//===----------------------------------------------------------------------===// 680 681multiclass VOPC_Real_si <bits<9> op> { 682 let AssemblerPredicates = [isSICI], DecoderNamespace = "SICI" in { 683 def _e32_si : 684 VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.SI>, 685 VOPCe<op{7-0}>; 686 687 def _e64_si : 688 VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.SI>, 689 VOP3a_si <op, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> { 690 // Encoding used for VOPC instructions encoded as VOP3 691 // Differs from VOP3e by destination name (sdst) as VOPC doesn't have vector dst 692 bits<8> sdst; 693 let Inst{7-0} = sdst; 694 } 695 } 696 def : VOPCInstAlias <!cast<VOP3_Pseudo>(NAME#"_e64"), 697 !cast<Instruction>(NAME#"_e32_si")> { 698 let AssemblerPredicate = isSICI; 699 } 700} 701 702defm V_CMP_F_F32 : VOPC_Real_si <0x0>; 703defm V_CMP_LT_F32 : VOPC_Real_si <0x1>; 704defm V_CMP_EQ_F32 : VOPC_Real_si <0x2>; 705defm V_CMP_LE_F32 : VOPC_Real_si <0x3>; 706defm V_CMP_GT_F32 : VOPC_Real_si <0x4>; 707defm V_CMP_LG_F32 : VOPC_Real_si <0x5>; 708defm V_CMP_GE_F32 : VOPC_Real_si <0x6>; 709defm V_CMP_O_F32 : VOPC_Real_si <0x7>; 710defm V_CMP_U_F32 : VOPC_Real_si <0x8>; 711defm V_CMP_NGE_F32 : VOPC_Real_si <0x9>; 712defm V_CMP_NLG_F32 : VOPC_Real_si <0xa>; 713defm V_CMP_NGT_F32 : VOPC_Real_si <0xb>; 714defm V_CMP_NLE_F32 : VOPC_Real_si <0xc>; 715defm V_CMP_NEQ_F32 : VOPC_Real_si <0xd>; 716defm V_CMP_NLT_F32 : VOPC_Real_si <0xe>; 717defm V_CMP_TRU_F32 : VOPC_Real_si <0xf>; 718 719defm V_CMPX_F_F32 : VOPC_Real_si <0x10>; 720defm V_CMPX_LT_F32 : VOPC_Real_si <0x11>; 721defm V_CMPX_EQ_F32 : VOPC_Real_si <0x12>; 722defm V_CMPX_LE_F32 : VOPC_Real_si <0x13>; 723defm V_CMPX_GT_F32 : VOPC_Real_si <0x14>; 724defm V_CMPX_LG_F32 : VOPC_Real_si <0x15>; 725defm V_CMPX_GE_F32 : VOPC_Real_si <0x16>; 726defm V_CMPX_O_F32 : VOPC_Real_si <0x17>; 727defm V_CMPX_U_F32 : VOPC_Real_si <0x18>; 728defm V_CMPX_NGE_F32 : VOPC_Real_si <0x19>; 729defm V_CMPX_NLG_F32 : VOPC_Real_si <0x1a>; 730defm V_CMPX_NGT_F32 : VOPC_Real_si <0x1b>; 731defm V_CMPX_NLE_F32 : VOPC_Real_si <0x1c>; 732defm V_CMPX_NEQ_F32 : VOPC_Real_si <0x1d>; 733defm V_CMPX_NLT_F32 : VOPC_Real_si <0x1e>; 734defm V_CMPX_TRU_F32 : VOPC_Real_si <0x1f>; 735 736defm V_CMP_F_F64 : VOPC_Real_si <0x20>; 737defm V_CMP_LT_F64 : VOPC_Real_si <0x21>; 738defm V_CMP_EQ_F64 : VOPC_Real_si <0x22>; 739defm V_CMP_LE_F64 : VOPC_Real_si <0x23>; 740defm V_CMP_GT_F64 : VOPC_Real_si <0x24>; 741defm V_CMP_LG_F64 : VOPC_Real_si <0x25>; 742defm V_CMP_GE_F64 : VOPC_Real_si <0x26>; 743defm V_CMP_O_F64 : VOPC_Real_si <0x27>; 744defm V_CMP_U_F64 : VOPC_Real_si <0x28>; 745defm V_CMP_NGE_F64 : VOPC_Real_si <0x29>; 746defm V_CMP_NLG_F64 : VOPC_Real_si <0x2a>; 747defm V_CMP_NGT_F64 : VOPC_Real_si <0x2b>; 748defm V_CMP_NLE_F64 : VOPC_Real_si <0x2c>; 749defm V_CMP_NEQ_F64 : VOPC_Real_si <0x2d>; 750defm V_CMP_NLT_F64 : VOPC_Real_si <0x2e>; 751defm V_CMP_TRU_F64 : VOPC_Real_si <0x2f>; 752 753defm V_CMPX_F_F64 : VOPC_Real_si <0x30>; 754defm V_CMPX_LT_F64 : VOPC_Real_si <0x31>; 755defm V_CMPX_EQ_F64 : VOPC_Real_si <0x32>; 756defm V_CMPX_LE_F64 : VOPC_Real_si <0x33>; 757defm V_CMPX_GT_F64 : VOPC_Real_si <0x34>; 758defm V_CMPX_LG_F64 : VOPC_Real_si <0x35>; 759defm V_CMPX_GE_F64 : VOPC_Real_si <0x36>; 760defm V_CMPX_O_F64 : VOPC_Real_si <0x37>; 761defm V_CMPX_U_F64 : VOPC_Real_si <0x38>; 762defm V_CMPX_NGE_F64 : VOPC_Real_si <0x39>; 763defm V_CMPX_NLG_F64 : VOPC_Real_si <0x3a>; 764defm V_CMPX_NGT_F64 : VOPC_Real_si <0x3b>; 765defm V_CMPX_NLE_F64 : VOPC_Real_si <0x3c>; 766defm V_CMPX_NEQ_F64 : VOPC_Real_si <0x3d>; 767defm V_CMPX_NLT_F64 : VOPC_Real_si <0x3e>; 768defm V_CMPX_TRU_F64 : VOPC_Real_si <0x3f>; 769 770defm V_CMPS_F_F32 : VOPC_Real_si <0x40>; 771defm V_CMPS_LT_F32 : VOPC_Real_si <0x41>; 772defm V_CMPS_EQ_F32 : VOPC_Real_si <0x42>; 773defm V_CMPS_LE_F32 : VOPC_Real_si <0x43>; 774defm V_CMPS_GT_F32 : VOPC_Real_si <0x44>; 775defm V_CMPS_LG_F32 : VOPC_Real_si <0x45>; 776defm V_CMPS_GE_F32 : VOPC_Real_si <0x46>; 777defm V_CMPS_O_F32 : VOPC_Real_si <0x47>; 778defm V_CMPS_U_F32 : VOPC_Real_si <0x48>; 779defm V_CMPS_NGE_F32 : VOPC_Real_si <0x49>; 780defm V_CMPS_NLG_F32 : VOPC_Real_si <0x4a>; 781defm V_CMPS_NGT_F32 : VOPC_Real_si <0x4b>; 782defm V_CMPS_NLE_F32 : VOPC_Real_si <0x4c>; 783defm V_CMPS_NEQ_F32 : VOPC_Real_si <0x4d>; 784defm V_CMPS_NLT_F32 : VOPC_Real_si <0x4e>; 785defm V_CMPS_TRU_F32 : VOPC_Real_si <0x4f>; 786 787defm V_CMPSX_F_F32 : VOPC_Real_si <0x50>; 788defm V_CMPSX_LT_F32 : VOPC_Real_si <0x51>; 789defm V_CMPSX_EQ_F32 : VOPC_Real_si <0x52>; 790defm V_CMPSX_LE_F32 : VOPC_Real_si <0x53>; 791defm V_CMPSX_GT_F32 : VOPC_Real_si <0x54>; 792defm V_CMPSX_LG_F32 : VOPC_Real_si <0x55>; 793defm V_CMPSX_GE_F32 : VOPC_Real_si <0x56>; 794defm V_CMPSX_O_F32 : VOPC_Real_si <0x57>; 795defm V_CMPSX_U_F32 : VOPC_Real_si <0x58>; 796defm V_CMPSX_NGE_F32 : VOPC_Real_si <0x59>; 797defm V_CMPSX_NLG_F32 : VOPC_Real_si <0x5a>; 798defm V_CMPSX_NGT_F32 : VOPC_Real_si <0x5b>; 799defm V_CMPSX_NLE_F32 : VOPC_Real_si <0x5c>; 800defm V_CMPSX_NEQ_F32 : VOPC_Real_si <0x5d>; 801defm V_CMPSX_NLT_F32 : VOPC_Real_si <0x5e>; 802defm V_CMPSX_TRU_F32 : VOPC_Real_si <0x5f>; 803 804defm V_CMPS_F_F64 : VOPC_Real_si <0x60>; 805defm V_CMPS_LT_F64 : VOPC_Real_si <0x61>; 806defm V_CMPS_EQ_F64 : VOPC_Real_si <0x62>; 807defm V_CMPS_LE_F64 : VOPC_Real_si <0x63>; 808defm V_CMPS_GT_F64 : VOPC_Real_si <0x64>; 809defm V_CMPS_LG_F64 : VOPC_Real_si <0x65>; 810defm V_CMPS_GE_F64 : VOPC_Real_si <0x66>; 811defm V_CMPS_O_F64 : VOPC_Real_si <0x67>; 812defm V_CMPS_U_F64 : VOPC_Real_si <0x68>; 813defm V_CMPS_NGE_F64 : VOPC_Real_si <0x69>; 814defm V_CMPS_NLG_F64 : VOPC_Real_si <0x6a>; 815defm V_CMPS_NGT_F64 : VOPC_Real_si <0x6b>; 816defm V_CMPS_NLE_F64 : VOPC_Real_si <0x6c>; 817defm V_CMPS_NEQ_F64 : VOPC_Real_si <0x6d>; 818defm V_CMPS_NLT_F64 : VOPC_Real_si <0x6e>; 819defm V_CMPS_TRU_F64 : VOPC_Real_si <0x6f>; 820 821defm V_CMPSX_F_F64 : VOPC_Real_si <0x70>; 822defm V_CMPSX_LT_F64 : VOPC_Real_si <0x71>; 823defm V_CMPSX_EQ_F64 : VOPC_Real_si <0x72>; 824defm V_CMPSX_LE_F64 : VOPC_Real_si <0x73>; 825defm V_CMPSX_GT_F64 : VOPC_Real_si <0x74>; 826defm V_CMPSX_LG_F64 : VOPC_Real_si <0x75>; 827defm V_CMPSX_GE_F64 : VOPC_Real_si <0x76>; 828defm V_CMPSX_O_F64 : VOPC_Real_si <0x77>; 829defm V_CMPSX_U_F64 : VOPC_Real_si <0x78>; 830defm V_CMPSX_NGE_F64 : VOPC_Real_si <0x79>; 831defm V_CMPSX_NLG_F64 : VOPC_Real_si <0x7a>; 832defm V_CMPSX_NGT_F64 : VOPC_Real_si <0x7b>; 833defm V_CMPSX_NLE_F64 : VOPC_Real_si <0x7c>; 834defm V_CMPSX_NEQ_F64 : VOPC_Real_si <0x7d>; 835defm V_CMPSX_NLT_F64 : VOPC_Real_si <0x7e>; 836defm V_CMPSX_TRU_F64 : VOPC_Real_si <0x7f>; 837 838defm V_CMP_F_I32 : VOPC_Real_si <0x80>; 839defm V_CMP_LT_I32 : VOPC_Real_si <0x81>; 840defm V_CMP_EQ_I32 : VOPC_Real_si <0x82>; 841defm V_CMP_LE_I32 : VOPC_Real_si <0x83>; 842defm V_CMP_GT_I32 : VOPC_Real_si <0x84>; 843defm V_CMP_NE_I32 : VOPC_Real_si <0x85>; 844defm V_CMP_GE_I32 : VOPC_Real_si <0x86>; 845defm V_CMP_T_I32 : VOPC_Real_si <0x87>; 846 847defm V_CMPX_F_I32 : VOPC_Real_si <0x90>; 848defm V_CMPX_LT_I32 : VOPC_Real_si <0x91>; 849defm V_CMPX_EQ_I32 : VOPC_Real_si <0x92>; 850defm V_CMPX_LE_I32 : VOPC_Real_si <0x93>; 851defm V_CMPX_GT_I32 : VOPC_Real_si <0x94>; 852defm V_CMPX_NE_I32 : VOPC_Real_si <0x95>; 853defm V_CMPX_GE_I32 : VOPC_Real_si <0x96>; 854defm V_CMPX_T_I32 : VOPC_Real_si <0x97>; 855 856defm V_CMP_F_I64 : VOPC_Real_si <0xa0>; 857defm V_CMP_LT_I64 : VOPC_Real_si <0xa1>; 858defm V_CMP_EQ_I64 : VOPC_Real_si <0xa2>; 859defm V_CMP_LE_I64 : VOPC_Real_si <0xa3>; 860defm V_CMP_GT_I64 : VOPC_Real_si <0xa4>; 861defm V_CMP_NE_I64 : VOPC_Real_si <0xa5>; 862defm V_CMP_GE_I64 : VOPC_Real_si <0xa6>; 863defm V_CMP_T_I64 : VOPC_Real_si <0xa7>; 864 865defm V_CMPX_F_I64 : VOPC_Real_si <0xb0>; 866defm V_CMPX_LT_I64 : VOPC_Real_si <0xb1>; 867defm V_CMPX_EQ_I64 : VOPC_Real_si <0xb2>; 868defm V_CMPX_LE_I64 : VOPC_Real_si <0xb3>; 869defm V_CMPX_GT_I64 : VOPC_Real_si <0xb4>; 870defm V_CMPX_NE_I64 : VOPC_Real_si <0xb5>; 871defm V_CMPX_GE_I64 : VOPC_Real_si <0xb6>; 872defm V_CMPX_T_I64 : VOPC_Real_si <0xb7>; 873 874defm V_CMP_F_U32 : VOPC_Real_si <0xc0>; 875defm V_CMP_LT_U32 : VOPC_Real_si <0xc1>; 876defm V_CMP_EQ_U32 : VOPC_Real_si <0xc2>; 877defm V_CMP_LE_U32 : VOPC_Real_si <0xc3>; 878defm V_CMP_GT_U32 : VOPC_Real_si <0xc4>; 879defm V_CMP_NE_U32 : VOPC_Real_si <0xc5>; 880defm V_CMP_GE_U32 : VOPC_Real_si <0xc6>; 881defm V_CMP_T_U32 : VOPC_Real_si <0xc7>; 882 883defm V_CMPX_F_U32 : VOPC_Real_si <0xd0>; 884defm V_CMPX_LT_U32 : VOPC_Real_si <0xd1>; 885defm V_CMPX_EQ_U32 : VOPC_Real_si <0xd2>; 886defm V_CMPX_LE_U32 : VOPC_Real_si <0xd3>; 887defm V_CMPX_GT_U32 : VOPC_Real_si <0xd4>; 888defm V_CMPX_NE_U32 : VOPC_Real_si <0xd5>; 889defm V_CMPX_GE_U32 : VOPC_Real_si <0xd6>; 890defm V_CMPX_T_U32 : VOPC_Real_si <0xd7>; 891 892defm V_CMP_F_U64 : VOPC_Real_si <0xe0>; 893defm V_CMP_LT_U64 : VOPC_Real_si <0xe1>; 894defm V_CMP_EQ_U64 : VOPC_Real_si <0xe2>; 895defm V_CMP_LE_U64 : VOPC_Real_si <0xe3>; 896defm V_CMP_GT_U64 : VOPC_Real_si <0xe4>; 897defm V_CMP_NE_U64 : VOPC_Real_si <0xe5>; 898defm V_CMP_GE_U64 : VOPC_Real_si <0xe6>; 899defm V_CMP_T_U64 : VOPC_Real_si <0xe7>; 900 901defm V_CMPX_F_U64 : VOPC_Real_si <0xf0>; 902defm V_CMPX_LT_U64 : VOPC_Real_si <0xf1>; 903defm V_CMPX_EQ_U64 : VOPC_Real_si <0xf2>; 904defm V_CMPX_LE_U64 : VOPC_Real_si <0xf3>; 905defm V_CMPX_GT_U64 : VOPC_Real_si <0xf4>; 906defm V_CMPX_NE_U64 : VOPC_Real_si <0xf5>; 907defm V_CMPX_GE_U64 : VOPC_Real_si <0xf6>; 908defm V_CMPX_T_U64 : VOPC_Real_si <0xf7>; 909 910defm V_CMP_CLASS_F32 : VOPC_Real_si <0x88>; 911defm V_CMPX_CLASS_F32 : VOPC_Real_si <0x98>; 912defm V_CMP_CLASS_F64 : VOPC_Real_si <0xa8>; 913defm V_CMPX_CLASS_F64 : VOPC_Real_si <0xb8>; 914 915//===----------------------------------------------------------------------===// 916// VI 917//===----------------------------------------------------------------------===// 918 919multiclass VOPC_Real_vi <bits<10> op> { 920 let AssemblerPredicates = [isVI], DecoderNamespace = "VI" in { 921 def _e32_vi : 922 VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.VI>, 923 VOPCe<op{7-0}>; 924 925 def _e64_vi : 926 VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.VI>, 927 VOP3a_vi <op, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> { 928 // Encoding used for VOPC instructions encoded as VOP3 929 // Differs from VOP3e by destination name (sdst) as VOPC doesn't have vector dst 930 bits<8> sdst; 931 let Inst{7-0} = sdst; 932 } 933 } 934 935 def _sdwa_vi : 936 VOP_SDWA_Real <!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>, 937 VOPC_SDWAe <op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>; 938 939 def _sdwa_gfx9 : 940 VOP_SDWA9_Real <!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>, 941 VOPC_SDWA9e <op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>; 942 943 def : VOPCInstAlias <!cast<VOP3_Pseudo>(NAME#"_e64"), 944 !cast<Instruction>(NAME#"_e32_vi")> { 945 let AssemblerPredicate = isVI; 946 } 947} 948 949defm V_CMP_CLASS_F32 : VOPC_Real_vi <0x10>; 950defm V_CMPX_CLASS_F32 : VOPC_Real_vi <0x11>; 951defm V_CMP_CLASS_F64 : VOPC_Real_vi <0x12>; 952defm V_CMPX_CLASS_F64 : VOPC_Real_vi <0x13>; 953defm V_CMP_CLASS_F16 : VOPC_Real_vi <0x14>; 954defm V_CMPX_CLASS_F16 : VOPC_Real_vi <0x15>; 955 956defm V_CMP_F_F16 : VOPC_Real_vi <0x20>; 957defm V_CMP_LT_F16 : VOPC_Real_vi <0x21>; 958defm V_CMP_EQ_F16 : VOPC_Real_vi <0x22>; 959defm V_CMP_LE_F16 : VOPC_Real_vi <0x23>; 960defm V_CMP_GT_F16 : VOPC_Real_vi <0x24>; 961defm V_CMP_LG_F16 : VOPC_Real_vi <0x25>; 962defm V_CMP_GE_F16 : VOPC_Real_vi <0x26>; 963defm V_CMP_O_F16 : VOPC_Real_vi <0x27>; 964defm V_CMP_U_F16 : VOPC_Real_vi <0x28>; 965defm V_CMP_NGE_F16 : VOPC_Real_vi <0x29>; 966defm V_CMP_NLG_F16 : VOPC_Real_vi <0x2a>; 967defm V_CMP_NGT_F16 : VOPC_Real_vi <0x2b>; 968defm V_CMP_NLE_F16 : VOPC_Real_vi <0x2c>; 969defm V_CMP_NEQ_F16 : VOPC_Real_vi <0x2d>; 970defm V_CMP_NLT_F16 : VOPC_Real_vi <0x2e>; 971defm V_CMP_TRU_F16 : VOPC_Real_vi <0x2f>; 972 973defm V_CMPX_F_F16 : VOPC_Real_vi <0x30>; 974defm V_CMPX_LT_F16 : VOPC_Real_vi <0x31>; 975defm V_CMPX_EQ_F16 : VOPC_Real_vi <0x32>; 976defm V_CMPX_LE_F16 : VOPC_Real_vi <0x33>; 977defm V_CMPX_GT_F16 : VOPC_Real_vi <0x34>; 978defm V_CMPX_LG_F16 : VOPC_Real_vi <0x35>; 979defm V_CMPX_GE_F16 : VOPC_Real_vi <0x36>; 980defm V_CMPX_O_F16 : VOPC_Real_vi <0x37>; 981defm V_CMPX_U_F16 : VOPC_Real_vi <0x38>; 982defm V_CMPX_NGE_F16 : VOPC_Real_vi <0x39>; 983defm V_CMPX_NLG_F16 : VOPC_Real_vi <0x3a>; 984defm V_CMPX_NGT_F16 : VOPC_Real_vi <0x3b>; 985defm V_CMPX_NLE_F16 : VOPC_Real_vi <0x3c>; 986defm V_CMPX_NEQ_F16 : VOPC_Real_vi <0x3d>; 987defm V_CMPX_NLT_F16 : VOPC_Real_vi <0x3e>; 988defm V_CMPX_TRU_F16 : VOPC_Real_vi <0x3f>; 989 990defm V_CMP_F_F32 : VOPC_Real_vi <0x40>; 991defm V_CMP_LT_F32 : VOPC_Real_vi <0x41>; 992defm V_CMP_EQ_F32 : VOPC_Real_vi <0x42>; 993defm V_CMP_LE_F32 : VOPC_Real_vi <0x43>; 994defm V_CMP_GT_F32 : VOPC_Real_vi <0x44>; 995defm V_CMP_LG_F32 : VOPC_Real_vi <0x45>; 996defm V_CMP_GE_F32 : VOPC_Real_vi <0x46>; 997defm V_CMP_O_F32 : VOPC_Real_vi <0x47>; 998defm V_CMP_U_F32 : VOPC_Real_vi <0x48>; 999defm V_CMP_NGE_F32 : VOPC_Real_vi <0x49>; 1000defm V_CMP_NLG_F32 : VOPC_Real_vi <0x4a>; 1001defm V_CMP_NGT_F32 : VOPC_Real_vi <0x4b>; 1002defm V_CMP_NLE_F32 : VOPC_Real_vi <0x4c>; 1003defm V_CMP_NEQ_F32 : VOPC_Real_vi <0x4d>; 1004defm V_CMP_NLT_F32 : VOPC_Real_vi <0x4e>; 1005defm V_CMP_TRU_F32 : VOPC_Real_vi <0x4f>; 1006 1007defm V_CMPX_F_F32 : VOPC_Real_vi <0x50>; 1008defm V_CMPX_LT_F32 : VOPC_Real_vi <0x51>; 1009defm V_CMPX_EQ_F32 : VOPC_Real_vi <0x52>; 1010defm V_CMPX_LE_F32 : VOPC_Real_vi <0x53>; 1011defm V_CMPX_GT_F32 : VOPC_Real_vi <0x54>; 1012defm V_CMPX_LG_F32 : VOPC_Real_vi <0x55>; 1013defm V_CMPX_GE_F32 : VOPC_Real_vi <0x56>; 1014defm V_CMPX_O_F32 : VOPC_Real_vi <0x57>; 1015defm V_CMPX_U_F32 : VOPC_Real_vi <0x58>; 1016defm V_CMPX_NGE_F32 : VOPC_Real_vi <0x59>; 1017defm V_CMPX_NLG_F32 : VOPC_Real_vi <0x5a>; 1018defm V_CMPX_NGT_F32 : VOPC_Real_vi <0x5b>; 1019defm V_CMPX_NLE_F32 : VOPC_Real_vi <0x5c>; 1020defm V_CMPX_NEQ_F32 : VOPC_Real_vi <0x5d>; 1021defm V_CMPX_NLT_F32 : VOPC_Real_vi <0x5e>; 1022defm V_CMPX_TRU_F32 : VOPC_Real_vi <0x5f>; 1023 1024defm V_CMP_F_F64 : VOPC_Real_vi <0x60>; 1025defm V_CMP_LT_F64 : VOPC_Real_vi <0x61>; 1026defm V_CMP_EQ_F64 : VOPC_Real_vi <0x62>; 1027defm V_CMP_LE_F64 : VOPC_Real_vi <0x63>; 1028defm V_CMP_GT_F64 : VOPC_Real_vi <0x64>; 1029defm V_CMP_LG_F64 : VOPC_Real_vi <0x65>; 1030defm V_CMP_GE_F64 : VOPC_Real_vi <0x66>; 1031defm V_CMP_O_F64 : VOPC_Real_vi <0x67>; 1032defm V_CMP_U_F64 : VOPC_Real_vi <0x68>; 1033defm V_CMP_NGE_F64 : VOPC_Real_vi <0x69>; 1034defm V_CMP_NLG_F64 : VOPC_Real_vi <0x6a>; 1035defm V_CMP_NGT_F64 : VOPC_Real_vi <0x6b>; 1036defm V_CMP_NLE_F64 : VOPC_Real_vi <0x6c>; 1037defm V_CMP_NEQ_F64 : VOPC_Real_vi <0x6d>; 1038defm V_CMP_NLT_F64 : VOPC_Real_vi <0x6e>; 1039defm V_CMP_TRU_F64 : VOPC_Real_vi <0x6f>; 1040 1041defm V_CMPX_F_F64 : VOPC_Real_vi <0x70>; 1042defm V_CMPX_LT_F64 : VOPC_Real_vi <0x71>; 1043defm V_CMPX_EQ_F64 : VOPC_Real_vi <0x72>; 1044defm V_CMPX_LE_F64 : VOPC_Real_vi <0x73>; 1045defm V_CMPX_GT_F64 : VOPC_Real_vi <0x74>; 1046defm V_CMPX_LG_F64 : VOPC_Real_vi <0x75>; 1047defm V_CMPX_GE_F64 : VOPC_Real_vi <0x76>; 1048defm V_CMPX_O_F64 : VOPC_Real_vi <0x77>; 1049defm V_CMPX_U_F64 : VOPC_Real_vi <0x78>; 1050defm V_CMPX_NGE_F64 : VOPC_Real_vi <0x79>; 1051defm V_CMPX_NLG_F64 : VOPC_Real_vi <0x7a>; 1052defm V_CMPX_NGT_F64 : VOPC_Real_vi <0x7b>; 1053defm V_CMPX_NLE_F64 : VOPC_Real_vi <0x7c>; 1054defm V_CMPX_NEQ_F64 : VOPC_Real_vi <0x7d>; 1055defm V_CMPX_NLT_F64 : VOPC_Real_vi <0x7e>; 1056defm V_CMPX_TRU_F64 : VOPC_Real_vi <0x7f>; 1057 1058defm V_CMP_F_I16 : VOPC_Real_vi <0xa0>; 1059defm V_CMP_LT_I16 : VOPC_Real_vi <0xa1>; 1060defm V_CMP_EQ_I16 : VOPC_Real_vi <0xa2>; 1061defm V_CMP_LE_I16 : VOPC_Real_vi <0xa3>; 1062defm V_CMP_GT_I16 : VOPC_Real_vi <0xa4>; 1063defm V_CMP_NE_I16 : VOPC_Real_vi <0xa5>; 1064defm V_CMP_GE_I16 : VOPC_Real_vi <0xa6>; 1065defm V_CMP_T_I16 : VOPC_Real_vi <0xa7>; 1066 1067defm V_CMP_F_U16 : VOPC_Real_vi <0xa8>; 1068defm V_CMP_LT_U16 : VOPC_Real_vi <0xa9>; 1069defm V_CMP_EQ_U16 : VOPC_Real_vi <0xaa>; 1070defm V_CMP_LE_U16 : VOPC_Real_vi <0xab>; 1071defm V_CMP_GT_U16 : VOPC_Real_vi <0xac>; 1072defm V_CMP_NE_U16 : VOPC_Real_vi <0xad>; 1073defm V_CMP_GE_U16 : VOPC_Real_vi <0xae>; 1074defm V_CMP_T_U16 : VOPC_Real_vi <0xaf>; 1075 1076defm V_CMPX_F_I16 : VOPC_Real_vi <0xb0>; 1077defm V_CMPX_LT_I16 : VOPC_Real_vi <0xb1>; 1078defm V_CMPX_EQ_I16 : VOPC_Real_vi <0xb2>; 1079defm V_CMPX_LE_I16 : VOPC_Real_vi <0xb3>; 1080defm V_CMPX_GT_I16 : VOPC_Real_vi <0xb4>; 1081defm V_CMPX_NE_I16 : VOPC_Real_vi <0xb5>; 1082defm V_CMPX_GE_I16 : VOPC_Real_vi <0xb6>; 1083defm V_CMPX_T_I16 : VOPC_Real_vi <0xb7>; 1084 1085defm V_CMPX_F_U16 : VOPC_Real_vi <0xb8>; 1086defm V_CMPX_LT_U16 : VOPC_Real_vi <0xb9>; 1087defm V_CMPX_EQ_U16 : VOPC_Real_vi <0xba>; 1088defm V_CMPX_LE_U16 : VOPC_Real_vi <0xbb>; 1089defm V_CMPX_GT_U16 : VOPC_Real_vi <0xbc>; 1090defm V_CMPX_NE_U16 : VOPC_Real_vi <0xbd>; 1091defm V_CMPX_GE_U16 : VOPC_Real_vi <0xbe>; 1092defm V_CMPX_T_U16 : VOPC_Real_vi <0xbf>; 1093 1094defm V_CMP_F_I32 : VOPC_Real_vi <0xc0>; 1095defm V_CMP_LT_I32 : VOPC_Real_vi <0xc1>; 1096defm V_CMP_EQ_I32 : VOPC_Real_vi <0xc2>; 1097defm V_CMP_LE_I32 : VOPC_Real_vi <0xc3>; 1098defm V_CMP_GT_I32 : VOPC_Real_vi <0xc4>; 1099defm V_CMP_NE_I32 : VOPC_Real_vi <0xc5>; 1100defm V_CMP_GE_I32 : VOPC_Real_vi <0xc6>; 1101defm V_CMP_T_I32 : VOPC_Real_vi <0xc7>; 1102 1103defm V_CMPX_F_I32 : VOPC_Real_vi <0xd0>; 1104defm V_CMPX_LT_I32 : VOPC_Real_vi <0xd1>; 1105defm V_CMPX_EQ_I32 : VOPC_Real_vi <0xd2>; 1106defm V_CMPX_LE_I32 : VOPC_Real_vi <0xd3>; 1107defm V_CMPX_GT_I32 : VOPC_Real_vi <0xd4>; 1108defm V_CMPX_NE_I32 : VOPC_Real_vi <0xd5>; 1109defm V_CMPX_GE_I32 : VOPC_Real_vi <0xd6>; 1110defm V_CMPX_T_I32 : VOPC_Real_vi <0xd7>; 1111 1112defm V_CMP_F_I64 : VOPC_Real_vi <0xe0>; 1113defm V_CMP_LT_I64 : VOPC_Real_vi <0xe1>; 1114defm V_CMP_EQ_I64 : VOPC_Real_vi <0xe2>; 1115defm V_CMP_LE_I64 : VOPC_Real_vi <0xe3>; 1116defm V_CMP_GT_I64 : VOPC_Real_vi <0xe4>; 1117defm V_CMP_NE_I64 : VOPC_Real_vi <0xe5>; 1118defm V_CMP_GE_I64 : VOPC_Real_vi <0xe6>; 1119defm V_CMP_T_I64 : VOPC_Real_vi <0xe7>; 1120 1121defm V_CMPX_F_I64 : VOPC_Real_vi <0xf0>; 1122defm V_CMPX_LT_I64 : VOPC_Real_vi <0xf1>; 1123defm V_CMPX_EQ_I64 : VOPC_Real_vi <0xf2>; 1124defm V_CMPX_LE_I64 : VOPC_Real_vi <0xf3>; 1125defm V_CMPX_GT_I64 : VOPC_Real_vi <0xf4>; 1126defm V_CMPX_NE_I64 : VOPC_Real_vi <0xf5>; 1127defm V_CMPX_GE_I64 : VOPC_Real_vi <0xf6>; 1128defm V_CMPX_T_I64 : VOPC_Real_vi <0xf7>; 1129 1130defm V_CMP_F_U32 : VOPC_Real_vi <0xc8>; 1131defm V_CMP_LT_U32 : VOPC_Real_vi <0xc9>; 1132defm V_CMP_EQ_U32 : VOPC_Real_vi <0xca>; 1133defm V_CMP_LE_U32 : VOPC_Real_vi <0xcb>; 1134defm V_CMP_GT_U32 : VOPC_Real_vi <0xcc>; 1135defm V_CMP_NE_U32 : VOPC_Real_vi <0xcd>; 1136defm V_CMP_GE_U32 : VOPC_Real_vi <0xce>; 1137defm V_CMP_T_U32 : VOPC_Real_vi <0xcf>; 1138 1139defm V_CMPX_F_U32 : VOPC_Real_vi <0xd8>; 1140defm V_CMPX_LT_U32 : VOPC_Real_vi <0xd9>; 1141defm V_CMPX_EQ_U32 : VOPC_Real_vi <0xda>; 1142defm V_CMPX_LE_U32 : VOPC_Real_vi <0xdb>; 1143defm V_CMPX_GT_U32 : VOPC_Real_vi <0xdc>; 1144defm V_CMPX_NE_U32 : VOPC_Real_vi <0xdd>; 1145defm V_CMPX_GE_U32 : VOPC_Real_vi <0xde>; 1146defm V_CMPX_T_U32 : VOPC_Real_vi <0xdf>; 1147 1148defm V_CMP_F_U64 : VOPC_Real_vi <0xe8>; 1149defm V_CMP_LT_U64 : VOPC_Real_vi <0xe9>; 1150defm V_CMP_EQ_U64 : VOPC_Real_vi <0xea>; 1151defm V_CMP_LE_U64 : VOPC_Real_vi <0xeb>; 1152defm V_CMP_GT_U64 : VOPC_Real_vi <0xec>; 1153defm V_CMP_NE_U64 : VOPC_Real_vi <0xed>; 1154defm V_CMP_GE_U64 : VOPC_Real_vi <0xee>; 1155defm V_CMP_T_U64 : VOPC_Real_vi <0xef>; 1156 1157defm V_CMPX_F_U64 : VOPC_Real_vi <0xf8>; 1158defm V_CMPX_LT_U64 : VOPC_Real_vi <0xf9>; 1159defm V_CMPX_EQ_U64 : VOPC_Real_vi <0xfa>; 1160defm V_CMPX_LE_U64 : VOPC_Real_vi <0xfb>; 1161defm V_CMPX_GT_U64 : VOPC_Real_vi <0xfc>; 1162defm V_CMPX_NE_U64 : VOPC_Real_vi <0xfd>; 1163defm V_CMPX_GE_U64 : VOPC_Real_vi <0xfe>; 1164defm V_CMPX_T_U64 : VOPC_Real_vi <0xff>; 1165