1//===-- VOPCInstructions.td - Vector Instruction Definitions --------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9//===----------------------------------------------------------------------===// 10// Encodings 11//===----------------------------------------------------------------------===// 12 13class VOPCe <bits<8> op> : Enc32 { 14 bits<9> src0; 15 bits<8> src1; 16 17 let Inst{8-0} = src0; 18 let Inst{16-9} = src1; 19 let Inst{24-17} = op; 20 let Inst{31-25} = 0x3e; 21} 22 23class VOPC_SDWAe <bits<8> op, VOPProfile P> : VOP_SDWAe <P> { 24 bits<8> src1; 25 26 let Inst{8-0} = 0xf9; // sdwa 27 let Inst{16-9} = !if(P.HasSrc1, src1{7-0}, 0); 28 let Inst{24-17} = op; 29 let Inst{31-25} = 0x3e; // encoding 30} 31 32class VOPC_SDWA9e <bits<8> op, VOPProfile P> : VOP_SDWA9Be <P> { 33 bits<9> src1; 34 35 let Inst{8-0} = 0xf9; // sdwa 36 let Inst{16-9} = !if(P.HasSrc1, src1{7-0}, 0); 37 let Inst{24-17} = op; 38 let Inst{31-25} = 0x3e; // encoding 39 let Inst{63} = !if(P.HasSrc1, src1{8}, 0); // src1_sgpr 40} 41 42 43//===----------------------------------------------------------------------===// 44// VOPC classes 45//===----------------------------------------------------------------------===// 46 47// VOPC instructions are a special case because for the 32-bit 48// encoding, we want to display the implicit vcc write as if it were 49// an explicit $dst. 50class VOPC_Profile<list<SchedReadWrite> sched, ValueType vt0, ValueType vt1 = vt0> : 51 VOPProfile <[i1, vt0, vt1, untyped]> { 52 // We want to exclude instructions with 64bit operands 53 let HasExtDPP = getHasVOP3DPP<DstVT, Src0VT, Src1VT, Src2VT>.ret; 54 let Asm32 = "$src0, $src1"; 55 56 let AsmDPP = !if (HasModifiers, 57 "$src0_modifiers, $src1_modifiers " 58 "$dpp_ctrl$row_mask$bank_mask$bound_ctrl", 59 "$src0, $src1 $dpp_ctrl$row_mask$bank_mask$bound_ctrl"); 60 let AsmDPP8 = "$src0, $src1 $dpp8$fi"; 61 let AsmDPP16 = AsmDPP#"$fi"; 62 // VOPC DPP Instructions do not need an old operand 63 let TieRegDPP = ""; 64 let InsDPP = getInsDPP<VOPDstOperand<Src0DPP.RegClass>, Src0DPP, Src1DPP, Src2DPP, 65 NumSrcArgs, HasModifiers, Src0ModDPP, Src1ModDPP, 66 Src2ModDPP, 0/*HasOld*/>.ret; 67 let InsDPP16 = getInsDPP16<VOPDstOperand<Src0DPP.RegClass>, Src0DPP, Src1DPP, Src2DPP, 68 NumSrcArgs, HasModifiers, Src0ModDPP, Src1ModDPP, 69 Src2ModDPP, 0/*HasOld*/>.ret; 70 let InsDPP8 = getInsDPP8<VOPDstOperand<Src0DPP.RegClass>, Src0DPP, Src1DPP, Src2DPP, 71 NumSrcArgs, HasModifiers, Src0ModDPP, Src1ModDPP, 72 Src2ModDPP, 0/*HasOld*/>.ret; 73 74 // The destination for 32-bit encoding is implicit. 75 let HasDst32 = 0; 76 // VOPC disallows dst_sel and dst_unused as they have no effect on destination 77 let EmitDstSel = 0; 78 let Outs64 = (outs VOPDstS64orS32:$sdst); 79 let OutsVOP3DPP = Outs64; 80 let OutsVOP3DPP8 = Outs64; 81 let InsVOP3DPP = getInsVOP3DPP<InsVOP3Base, Src0VOP3DPP, NumSrcArgs, 0/*HasOld*/>.ret; 82 let InsVOP3DPP16 = getInsVOP3DPP16<InsVOP3Base, Src0VOP3DPP, NumSrcArgs, 0/*HasOld*/>.ret; 83 let InsVOP3DPP8 = getInsVOP3DPP8<InsVOP3Base, Src0VOP3DPP, NumSrcArgs, 0/*HasOld*/>.ret; 84 list<SchedReadWrite> Schedule = sched; 85} 86 87multiclass VOPC_Profile_t16<list<SchedReadWrite> sched, ValueType vt0, ValueType vt1 = vt0> { 88 def NAME : VOPC_Profile<sched, vt0, vt1>; 89 def _t16 : VOPC_Profile<sched, vt0, vt1> { 90 let IsTrue16 = 1; 91 let Src1RC32 = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 92 let Src0DPP = getVregSrcForVT<Src0VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 93 let Src1DPP = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 94 let Src2DPP = getVregSrcForVT<Src2VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 95 let Src0ModDPP = getSrcModDPP_t16<Src0VT>.ret; 96 let Src1ModDPP = getSrcModDPP_t16<Src1VT>.ret; 97 let Src2ModDPP = getSrcModDPP_t16<Src2VT>.ret; 98 } 99} 100 101class VOPC_NoSdst_Profile<list<SchedReadWrite> sched, ValueType vt0, 102 ValueType vt1 = vt0> : 103 VOPC_Profile<sched, vt0, vt1> { 104 let Outs64 = (outs ); 105 let OutsVOP3DPP = Outs64; 106 let OutsVOP3DPP8 = Outs64; 107 let OutsSDWA = (outs ); 108 let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0, 109 Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1, 110 src0_sel:$src0_sel, src1_sel:$src1_sel); 111 let AsmVOP3Base = !if(Src0VT.isFP, "$src0_modifiers, $src1_modifiers$clamp", 112 "$src0, $src1"); 113 let AsmSDWA9 = "$src0_modifiers, $src1_modifiers $src0_sel $src1_sel"; 114 let EmitDst = 0; 115} 116 117multiclass VOPC_NoSdst_Profile_t16<list<SchedReadWrite> sched, ValueType vt0, ValueType vt1 = vt0> { 118 def NAME : VOPC_NoSdst_Profile<sched, vt0, vt1>; 119 def _t16 : VOPC_NoSdst_Profile<sched, vt0, vt1> { 120 let IsTrue16 = 1; 121 let Src1RC32 = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 122 let Src0DPP = getVregSrcForVT<Src0VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 123 let Src1DPP = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 124 let Src2DPP = getVregSrcForVT<Src2VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 125 let Src0ModDPP = getSrcModDPP_t16<Src0VT>.ret; 126 let Src1ModDPP = getSrcModDPP_t16<Src1VT>.ret; 127 let Src2ModDPP = getSrcModDPP_t16<Src2VT>.ret; 128 } 129} 130 131class VOPC_Pseudo <string opName, VOPC_Profile P, list<dag> pattern=[], 132 bit DefVcc = 1> : 133 InstSI<(outs), P.Ins32, "", pattern>, 134 VOP <opName>, 135 SIMCInstr<opName#"_e32", SIEncodingFamily.NONE> { 136 137 let isPseudo = 1; 138 let isCodeGenOnly = 1; 139 let UseNamedOperandTable = 1; 140 141 string Mnemonic = opName; 142 string AsmOperands = P.Asm32; 143 144 let Size = 4; 145 let mayLoad = 0; 146 let mayStore = 0; 147 let hasSideEffects = 0; 148 149 let ReadsModeReg = P.Src0VT.isFP; 150 151 let VALU = 1; 152 let VOPC = 1; 153 let Uses = !if(ReadsModeReg, [MODE, EXEC], [EXEC]); 154 let Defs = !if(DefVcc, [VCC], []); 155 156 VOPProfile Pfl = P; 157} 158 159class VOPC_Real <VOPC_Pseudo ps, int EncodingFamily, string asm_name = ps.PseudoInstr> : 160 InstSI <ps.OutOperandList, ps.InOperandList, asm_name # " " # ps.AsmOperands, []>, 161 SIMCInstr <ps.PseudoInstr, EncodingFamily> { 162 163 let VALU = 1; 164 let VOPC = 1; 165 let isPseudo = 0; 166 let isCodeGenOnly = 0; 167 168 let Constraints = ps.Constraints; 169 let DisableEncoding = ps.DisableEncoding; 170 171 // copy relevant pseudo op flags 172 let SubtargetPredicate = ps.SubtargetPredicate; 173 let AsmMatchConverter = ps.AsmMatchConverter; 174 let Constraints = ps.Constraints; 175 let DisableEncoding = ps.DisableEncoding; 176 let TSFlags = ps.TSFlags; 177 let UseNamedOperandTable = ps.UseNamedOperandTable; 178 let Uses = ps.Uses; 179 let Defs = ps.Defs; 180 let SchedRW = ps.SchedRW; 181 let mayLoad = ps.mayLoad; 182 let mayStore = ps.mayStore; 183} 184 185class VOPC_SDWA_Pseudo <string OpName, VOPProfile P, list<dag> pattern=[]> : 186 VOP_SDWA_Pseudo <OpName, P, pattern> { 187 let AsmMatchConverter = "cvtSdwaVOPC"; 188} 189 190// This class is used only with VOPC instructions. Use $sdst for out operand 191class VOPCInstAlias <VOP3_Pseudo ps, Instruction inst, 192 string Asm32 = ps.Pfl.Asm32, string real_name = ps.OpName, 193 VOPProfile p = ps.Pfl> : 194 InstAlias <real_name#" "#Asm32, (inst)>, PredicateControl { 195 196 field bit isCompare; 197 field bit isCommutable; 198 199 let ResultInst = 200 !if (p.HasDst32, 201 !if (!eq(p.NumSrcArgs, 0), 202 // 1 dst, 0 src 203 (inst p.DstRC:$sdst), 204 !if (!eq(p.NumSrcArgs, 1), 205 // 1 dst, 1 src 206 (inst p.DstRC:$sdst, p.Src0RC32:$src0), 207 !if (!eq(p.NumSrcArgs, 2), 208 // 1 dst, 2 src 209 (inst p.DstRC:$sdst, p.Src0RC32:$src0, p.Src1RC32:$src1), 210 // else - unreachable 211 (inst)))), 212 // else 213 !if (!eq(p.NumSrcArgs, 2), 214 // 0 dst, 2 src 215 (inst p.Src0RC32:$src0, p.Src1RC32:$src1), 216 !if (!eq(p.NumSrcArgs, 1), 217 // 0 dst, 1 src 218 (inst p.Src0RC32:$src1), 219 // else 220 // 0 dst, 0 src 221 (inst)))); 222 223 let AsmVariantName = AMDGPUAsmVariants.Default; 224 let SubtargetPredicate = AssemblerPredicate; 225} 226 227multiclass VOPCInstAliases <string old_name, string Arch, string real_name = old_name, string mnemonic_from = real_name> { 228 def : VOPCInstAlias <!cast<VOP3_Pseudo>(old_name#"_e64"), 229 !cast<Instruction>(real_name#"_e32_"#Arch), 230 !cast<VOP3_Pseudo>(old_name#"_e64").Pfl.Asm32, 231 mnemonic_from>; 232 let WaveSizePredicate = isWave32 in { 233 def : VOPCInstAlias <!cast<VOP3_Pseudo>(old_name#"_e64"), 234 !cast<Instruction>(real_name#"_e32_"#Arch), 235 "vcc_lo, "#!cast<VOP3_Pseudo>(old_name#"_e64").Pfl.Asm32, 236 mnemonic_from>; 237 } 238 let WaveSizePredicate = isWave64 in { 239 def : VOPCInstAlias <!cast<VOP3_Pseudo>(old_name#"_e64"), 240 !cast<Instruction>(real_name#"_e32_"#Arch), 241 "vcc, "#!cast<VOP3_Pseudo>(old_name#"_e64").Pfl.Asm32, 242 mnemonic_from>; 243 } 244} 245 246multiclass VOPCXInstAliases <string old_name, string Arch, string real_name = old_name, string mnemonic_from = real_name> { 247 def : VOPCInstAlias <!cast<VOP3_Pseudo>(old_name#"_e64"), 248 !cast<Instruction>(real_name#"_e32_"#Arch), 249 !cast<VOP3_Pseudo>(old_name#"_e64").Pfl.Asm32, 250 mnemonic_from>; 251} 252 253class getVOPCPat64 <SDPatternOperator cond, VOPProfile P> : LetDummies { 254 list<dag> ret = !if(P.HasModifiers, 255 [(set i1:$sdst, 256 (setcc (P.Src0VT 257 !if(P.HasOMod, 258 (VOP3Mods0 P.Src0VT:$src0, i32:$src0_modifiers, i1:$clamp, i32:$omod), 259 (VOP3Mods0 P.Src0VT:$src0, i32:$src0_modifiers, i1:$clamp))), 260 (P.Src1VT (VOP3Mods P.Src1VT:$src1, i32:$src1_modifiers)), 261 cond))], 262 [(set i1:$sdst, (setcc P.Src0VT:$src0, P.Src1VT:$src1, cond))]); 263} 264 265class VCMPXNoSDstTable <bit has_sdst, string Name> { 266 bit HasSDst = has_sdst; 267 string NoSDstOp = Name; 268} 269 270class VCMPVCMPXTable <string Name> { 271 bit IsVCMPX = 0; 272 string VCMPOp = Name; 273} 274 275multiclass VOPC_Pseudos <string opName, 276 VOPC_Profile P, 277 SDPatternOperator cond = COND_NULL, 278 string revOp = opName, 279 bit DefExec = 0> { 280 281 def _e32 : VOPC_Pseudo <opName, P>, 282 Commutable_REV<revOp#"_e32", !eq(revOp, opName)>, 283 VCMPXNoSDstTable<1, opName#"_e32">, 284 VCMPVCMPXTable<opName#"_e32"> { 285 let Defs = !if(DefExec, [VCC, EXEC], [VCC]); 286 let SchedRW = P.Schedule; 287 let isConvergent = DefExec; 288 let isCompare = 1; 289 let isCommutable = 1; 290 } 291 292 def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret>, 293 Commutable_REV<revOp#"_e64", !eq(revOp, opName)>, 294 VCMPXNoSDstTable<1, opName#"_e64">, 295 VCMPVCMPXTable<opName#"_e64"> { 296 let Defs = !if(DefExec, [EXEC], []); 297 let SchedRW = P.Schedule; 298 let isCompare = 1; 299 let isCommutable = 1; 300 } 301 302 if P.HasExtSDWA then 303 def _sdwa : VOPC_SDWA_Pseudo <opName, P> { 304 let Defs = !if(DefExec, [EXEC], []); 305 let SchedRW = P.Schedule; 306 let isConvergent = DefExec; 307 let isCompare = 1; 308 } 309 310 let SubtargetPredicate = isGFX11Plus in { 311 if P.HasExtDPP then 312 def _e32_dpp : VOP_DPP_Pseudo<opName, P> { 313 let Defs = !if(DefExec, [VCC, EXEC], [VCC]); 314 let SchedRW = P.Schedule; 315 let isConvergent = DefExec; 316 let isCompare = 1; 317 let VOPC = 1; 318 let Constraints = ""; 319 } 320 if P.HasExtVOP3DPP then 321 def _e64_dpp : VOP3_DPP_Pseudo<opName, P> { 322 let Defs = !if(DefExec, [EXEC], []); 323 let SchedRW = P.Schedule; 324 let isCompare = 1; 325 let Constraints = ""; 326 } 327 } // end SubtargetPredicate = isGFX11Plus 328 329} 330 331let SubtargetPredicate = HasSdstCMPX in { 332multiclass VOPCX_Pseudos <string opName, 333 VOPC_Profile P, VOPC_Profile P_NoSDst, 334 SDPatternOperator cond = COND_NULL, 335 string revOp = opName> : 336 VOPC_Pseudos <opName, P, cond, revOp, 1> { 337 338 def _nosdst_e32 : VOPC_Pseudo <opName#"_nosdst", P_NoSDst, [], 0>, 339 Commutable_REV<revOp#"_nosdst_e32", !eq(revOp, opName)>, 340 VCMPXNoSDstTable<0, opName#"_e32">, 341 VCMPVCMPXTable<!subst("v_cmpx", "v_cmp", opName#"_e32")> { 342 let Defs = [EXEC]; 343 let SchedRW = P_NoSDst.Schedule; 344 let isConvergent = 1; 345 let isCompare = 1; 346 let isCommutable = 1; 347 let SubtargetPredicate = HasNoSdstCMPX; 348 let IsVCMPX = 1; 349 } 350 351 def _nosdst_e64 : VOP3_Pseudo<opName#"_nosdst", P_NoSDst>, 352 Commutable_REV<revOp#"_nosdst_e64", !eq(revOp, opName)>, 353 VCMPXNoSDstTable<0, opName#"_e64">, 354 VCMPVCMPXTable<!subst("v_cmpx", "v_cmp", opName#"_e64")> { 355 let Defs = [EXEC]; 356 let SchedRW = P_NoSDst.Schedule; 357 let isCompare = 1; 358 let isCommutable = 1; 359 let SubtargetPredicate = HasNoSdstCMPX; 360 let IsVCMPX = 1; 361 } 362 363 if P_NoSDst.HasExtSDWA then 364 def _nosdst_sdwa : VOPC_SDWA_Pseudo <opName#"_nosdst", P_NoSDst> { 365 let Defs = [EXEC]; 366 let SchedRW = P_NoSDst.Schedule; 367 let isConvergent = 1; 368 let isCompare = 1; 369 let SubtargetPredicate = HasNoSdstCMPX; 370 } 371 372 let SubtargetPredicate = isGFX11Plus in { 373 if P.HasExtDPP then 374 def _nosdst_e32_dpp : VOP_DPP_Pseudo<opName#"_nosdst", P_NoSDst> { 375 let Defs = [EXEC]; 376 let SchedRW = P_NoSDst.Schedule; 377 let isConvergent = 1; 378 let isCompare = 1; 379 let VOPC = 1; 380 let Constraints = ""; 381 } 382 if P.HasExtVOP3DPP then 383 def _nosdst_e64_dpp : VOP3_DPP_Pseudo<opName#"_nosdst", P_NoSDst> { 384 let Defs = [EXEC]; 385 let SchedRW = P_NoSDst.Schedule; 386 let isCompare = 1; 387 let Constraints = ""; 388 } 389 } // end SubtargetPredicate = isGFX11Plus 390} 391} // End SubtargetPredicate = HasSdstCMPX 392 393defm VOPC_I1_F16_F16 : VOPC_Profile_t16<[Write32Bit], f16>; 394def VOPC_I1_F32_F32 : VOPC_Profile<[Write32Bit], f32>; 395def VOPC_I1_F64_F64 : VOPC_Profile<[WriteDoubleAdd], f64>; 396defm VOPC_I1_I16_I16 : VOPC_Profile_t16<[Write32Bit], i16>; 397def VOPC_I1_I32_I32 : VOPC_Profile<[Write32Bit], i32>; 398def VOPC_I1_I64_I64 : VOPC_Profile<[Write64Bit], i64>; 399 400defm VOPC_F16_F16 : VOPC_NoSdst_Profile_t16<[Write32Bit], f16>; 401def VOPC_F32_F32 : VOPC_NoSdst_Profile<[Write32Bit], f32>; 402def VOPC_F64_F64 : VOPC_NoSdst_Profile<[Write64Bit], f64>; 403defm VOPC_I16_I16 : VOPC_NoSdst_Profile_t16<[Write32Bit], i16>; 404def VOPC_I32_I32 : VOPC_NoSdst_Profile<[Write32Bit], i32>; 405def VOPC_I64_I64 : VOPC_NoSdst_Profile<[Write64Bit], i64>; 406 407multiclass VOPC_F16 <string opName, SDPatternOperator cond = COND_NULL, 408 string revOp = opName> { 409 let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in { 410 defm NAME : VOPC_Pseudos <opName, VOPC_I1_F16_F16, cond, revOp, 0>; 411 } 412 let OtherPredicates = [HasTrue16BitInsts] in { 413 defm _t16 : VOPC_Pseudos <opName#"_t16", VOPC_I1_F16_F16_t16, cond, revOp#"_t16", 0>; 414 } 415} 416 417multiclass VOPC_F32 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> : 418 VOPC_Pseudos <opName, VOPC_I1_F32_F32, cond, revOp, 0>; 419 420multiclass VOPC_F64 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> : 421 VOPC_Pseudos <opName, VOPC_I1_F64_F64, cond, revOp, 0>; 422 423multiclass VOPC_I16 <string opName, SDPatternOperator cond = COND_NULL, 424 string revOp = opName> { 425 let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in { 426 defm NAME : VOPC_Pseudos <opName, VOPC_I1_I16_I16, cond, revOp, 0>; 427 } 428 let OtherPredicates = [HasTrue16BitInsts] in { 429 defm _t16 : VOPC_Pseudos <opName#"_t16", VOPC_I1_I16_I16_t16, cond, revOp#"_t16", 0>; 430 } 431} 432 433multiclass VOPC_I32 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> : 434 VOPC_Pseudos <opName, VOPC_I1_I32_I32, cond, revOp, 0>; 435 436multiclass VOPC_I64 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> : 437 VOPC_Pseudos <opName, VOPC_I1_I64_I64, cond, revOp, 0>; 438 439multiclass VOPCX_F16<string opName, string revOp = opName> { 440 let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in { 441 defm NAME : VOPCX_Pseudos <opName, VOPC_I1_F16_F16, VOPC_F16_F16, COND_NULL, revOp>; 442 } 443 let OtherPredicates = [HasTrue16BitInsts] in { 444 defm _t16 : VOPCX_Pseudos <opName#"_t16", VOPC_I1_F16_F16_t16, VOPC_F16_F16_t16, COND_NULL, revOp#"_t16">; 445 } 446} 447 448multiclass VOPCX_F32 <string opName, string revOp = opName> : 449 VOPCX_Pseudos <opName, VOPC_I1_F32_F32, VOPC_F32_F32, COND_NULL, revOp>; 450 451multiclass VOPCX_F64 <string opName, string revOp = opName> : 452 VOPCX_Pseudos <opName, VOPC_I1_F64_F64, VOPC_F64_F64, COND_NULL, revOp>; 453 454multiclass VOPCX_I16<string opName, string revOp = opName> { 455 let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in { 456 defm NAME : VOPCX_Pseudos <opName, VOPC_I1_I16_I16, VOPC_I16_I16, COND_NULL, revOp>; 457 } 458 let OtherPredicates = [HasTrue16BitInsts] in { 459 defm _t16 : VOPCX_Pseudos <opName#"_t16", VOPC_I1_I16_I16_t16, VOPC_I16_I16_t16, COND_NULL, revOp#"_t16">; 460 } 461} 462 463multiclass VOPCX_I32 <string opName, string revOp = opName> : 464 VOPCX_Pseudos <opName, VOPC_I1_I32_I32, VOPC_I32_I32, COND_NULL, revOp>; 465 466multiclass VOPCX_I64 <string opName, string revOp = opName> : 467 VOPCX_Pseudos <opName, VOPC_I1_I64_I64, VOPC_I64_I64, COND_NULL, revOp>; 468 469 470//===----------------------------------------------------------------------===// 471// Compare instructions 472//===----------------------------------------------------------------------===// 473 474defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">; 475defm V_CMP_LT_F32 : VOPC_F32 <"v_cmp_lt_f32", COND_OLT, "v_cmp_gt_f32">; 476defm V_CMP_EQ_F32 : VOPC_F32 <"v_cmp_eq_f32", COND_OEQ>; 477defm V_CMP_LE_F32 : VOPC_F32 <"v_cmp_le_f32", COND_OLE, "v_cmp_ge_f32">; 478defm V_CMP_GT_F32 : VOPC_F32 <"v_cmp_gt_f32", COND_OGT>; 479defm V_CMP_LG_F32 : VOPC_F32 <"v_cmp_lg_f32", COND_ONE>; 480defm V_CMP_GE_F32 : VOPC_F32 <"v_cmp_ge_f32", COND_OGE>; 481defm V_CMP_O_F32 : VOPC_F32 <"v_cmp_o_f32", COND_O>; 482defm V_CMP_U_F32 : VOPC_F32 <"v_cmp_u_f32", COND_UO>; 483defm V_CMP_NGE_F32 : VOPC_F32 <"v_cmp_nge_f32", COND_ULT, "v_cmp_nle_f32">; 484defm V_CMP_NLG_F32 : VOPC_F32 <"v_cmp_nlg_f32", COND_UEQ>; 485defm V_CMP_NGT_F32 : VOPC_F32 <"v_cmp_ngt_f32", COND_ULE, "v_cmp_nlt_f32">; 486defm V_CMP_NLE_F32 : VOPC_F32 <"v_cmp_nle_f32", COND_UGT>; 487defm V_CMP_NEQ_F32 : VOPC_F32 <"v_cmp_neq_f32", COND_UNE>; 488defm V_CMP_NLT_F32 : VOPC_F32 <"v_cmp_nlt_f32", COND_UGE>; 489defm V_CMP_TRU_F32 : VOPC_F32 <"v_cmp_tru_f32">; 490 491defm V_CMPX_F_F32 : VOPCX_F32 <"v_cmpx_f_f32">; 492defm V_CMPX_LT_F32 : VOPCX_F32 <"v_cmpx_lt_f32", "v_cmpx_gt_f32">; 493defm V_CMPX_EQ_F32 : VOPCX_F32 <"v_cmpx_eq_f32">; 494defm V_CMPX_LE_F32 : VOPCX_F32 <"v_cmpx_le_f32", "v_cmpx_ge_f32">; 495defm V_CMPX_GT_F32 : VOPCX_F32 <"v_cmpx_gt_f32">; 496defm V_CMPX_LG_F32 : VOPCX_F32 <"v_cmpx_lg_f32">; 497defm V_CMPX_GE_F32 : VOPCX_F32 <"v_cmpx_ge_f32">; 498defm V_CMPX_O_F32 : VOPCX_F32 <"v_cmpx_o_f32">; 499defm V_CMPX_U_F32 : VOPCX_F32 <"v_cmpx_u_f32">; 500defm V_CMPX_NGE_F32 : VOPCX_F32 <"v_cmpx_nge_f32", "v_cmpx_nle_f32">; 501defm V_CMPX_NLG_F32 : VOPCX_F32 <"v_cmpx_nlg_f32">; 502defm V_CMPX_NGT_F32 : VOPCX_F32 <"v_cmpx_ngt_f32", "v_cmpx_nlt_f32">; 503defm V_CMPX_NLE_F32 : VOPCX_F32 <"v_cmpx_nle_f32">; 504defm V_CMPX_NEQ_F32 : VOPCX_F32 <"v_cmpx_neq_f32">; 505defm V_CMPX_NLT_F32 : VOPCX_F32 <"v_cmpx_nlt_f32">; 506defm V_CMPX_TRU_F32 : VOPCX_F32 <"v_cmpx_tru_f32">; 507 508defm V_CMP_F_F64 : VOPC_F64 <"v_cmp_f_f64">; 509defm V_CMP_LT_F64 : VOPC_F64 <"v_cmp_lt_f64", COND_OLT, "v_cmp_gt_f64">; 510defm V_CMP_EQ_F64 : VOPC_F64 <"v_cmp_eq_f64", COND_OEQ>; 511defm V_CMP_LE_F64 : VOPC_F64 <"v_cmp_le_f64", COND_OLE, "v_cmp_ge_f64">; 512defm V_CMP_GT_F64 : VOPC_F64 <"v_cmp_gt_f64", COND_OGT>; 513defm V_CMP_LG_F64 : VOPC_F64 <"v_cmp_lg_f64", COND_ONE>; 514defm V_CMP_GE_F64 : VOPC_F64 <"v_cmp_ge_f64", COND_OGE>; 515defm V_CMP_O_F64 : VOPC_F64 <"v_cmp_o_f64", COND_O>; 516defm V_CMP_U_F64 : VOPC_F64 <"v_cmp_u_f64", COND_UO>; 517defm V_CMP_NGE_F64 : VOPC_F64 <"v_cmp_nge_f64", COND_ULT, "v_cmp_nle_f64">; 518defm V_CMP_NLG_F64 : VOPC_F64 <"v_cmp_nlg_f64", COND_UEQ>; 519defm V_CMP_NGT_F64 : VOPC_F64 <"v_cmp_ngt_f64", COND_ULE, "v_cmp_nlt_f64">; 520defm V_CMP_NLE_F64 : VOPC_F64 <"v_cmp_nle_f64", COND_UGT>; 521defm V_CMP_NEQ_F64 : VOPC_F64 <"v_cmp_neq_f64", COND_UNE>; 522defm V_CMP_NLT_F64 : VOPC_F64 <"v_cmp_nlt_f64", COND_UGE>; 523defm V_CMP_TRU_F64 : VOPC_F64 <"v_cmp_tru_f64">; 524 525defm V_CMPX_F_F64 : VOPCX_F64 <"v_cmpx_f_f64">; 526defm V_CMPX_LT_F64 : VOPCX_F64 <"v_cmpx_lt_f64", "v_cmpx_gt_f64">; 527defm V_CMPX_EQ_F64 : VOPCX_F64 <"v_cmpx_eq_f64">; 528defm V_CMPX_LE_F64 : VOPCX_F64 <"v_cmpx_le_f64", "v_cmpx_ge_f64">; 529defm V_CMPX_GT_F64 : VOPCX_F64 <"v_cmpx_gt_f64">; 530defm V_CMPX_LG_F64 : VOPCX_F64 <"v_cmpx_lg_f64">; 531defm V_CMPX_GE_F64 : VOPCX_F64 <"v_cmpx_ge_f64">; 532defm V_CMPX_O_F64 : VOPCX_F64 <"v_cmpx_o_f64">; 533defm V_CMPX_U_F64 : VOPCX_F64 <"v_cmpx_u_f64">; 534defm V_CMPX_NGE_F64 : VOPCX_F64 <"v_cmpx_nge_f64", "v_cmpx_nle_f64">; 535defm V_CMPX_NLG_F64 : VOPCX_F64 <"v_cmpx_nlg_f64">; 536defm V_CMPX_NGT_F64 : VOPCX_F64 <"v_cmpx_ngt_f64", "v_cmpx_nlt_f64">; 537defm V_CMPX_NLE_F64 : VOPCX_F64 <"v_cmpx_nle_f64">; 538defm V_CMPX_NEQ_F64 : VOPCX_F64 <"v_cmpx_neq_f64">; 539defm V_CMPX_NLT_F64 : VOPCX_F64 <"v_cmpx_nlt_f64">; 540defm V_CMPX_TRU_F64 : VOPCX_F64 <"v_cmpx_tru_f64">; 541 542let SubtargetPredicate = isGFX6GFX7 in { 543 544defm V_CMPS_F_F32 : VOPC_F32 <"v_cmps_f_f32">; 545defm V_CMPS_LT_F32 : VOPC_F32 <"v_cmps_lt_f32", COND_NULL, "v_cmps_gt_f32">; 546defm V_CMPS_EQ_F32 : VOPC_F32 <"v_cmps_eq_f32">; 547defm V_CMPS_LE_F32 : VOPC_F32 <"v_cmps_le_f32", COND_NULL, "v_cmps_ge_f32">; 548defm V_CMPS_GT_F32 : VOPC_F32 <"v_cmps_gt_f32">; 549defm V_CMPS_LG_F32 : VOPC_F32 <"v_cmps_lg_f32">; 550defm V_CMPS_GE_F32 : VOPC_F32 <"v_cmps_ge_f32">; 551defm V_CMPS_O_F32 : VOPC_F32 <"v_cmps_o_f32">; 552defm V_CMPS_U_F32 : VOPC_F32 <"v_cmps_u_f32">; 553defm V_CMPS_NGE_F32 : VOPC_F32 <"v_cmps_nge_f32", COND_NULL, "v_cmps_nle_f32">; 554defm V_CMPS_NLG_F32 : VOPC_F32 <"v_cmps_nlg_f32">; 555defm V_CMPS_NGT_F32 : VOPC_F32 <"v_cmps_ngt_f32", COND_NULL, "v_cmps_nlt_f32">; 556defm V_CMPS_NLE_F32 : VOPC_F32 <"v_cmps_nle_f32">; 557defm V_CMPS_NEQ_F32 : VOPC_F32 <"v_cmps_neq_f32">; 558defm V_CMPS_NLT_F32 : VOPC_F32 <"v_cmps_nlt_f32">; 559defm V_CMPS_TRU_F32 : VOPC_F32 <"v_cmps_tru_f32">; 560 561defm V_CMPSX_F_F32 : VOPCX_F32 <"v_cmpsx_f_f32">; 562defm V_CMPSX_LT_F32 : VOPCX_F32 <"v_cmpsx_lt_f32", "v_cmpsx_gt_f32">; 563defm V_CMPSX_EQ_F32 : VOPCX_F32 <"v_cmpsx_eq_f32">; 564defm V_CMPSX_LE_F32 : VOPCX_F32 <"v_cmpsx_le_f32", "v_cmpsx_ge_f32">; 565defm V_CMPSX_GT_F32 : VOPCX_F32 <"v_cmpsx_gt_f32">; 566defm V_CMPSX_LG_F32 : VOPCX_F32 <"v_cmpsx_lg_f32">; 567defm V_CMPSX_GE_F32 : VOPCX_F32 <"v_cmpsx_ge_f32">; 568defm V_CMPSX_O_F32 : VOPCX_F32 <"v_cmpsx_o_f32">; 569defm V_CMPSX_U_F32 : VOPCX_F32 <"v_cmpsx_u_f32">; 570defm V_CMPSX_NGE_F32 : VOPCX_F32 <"v_cmpsx_nge_f32", "v_cmpsx_nle_f32">; 571defm V_CMPSX_NLG_F32 : VOPCX_F32 <"v_cmpsx_nlg_f32">; 572defm V_CMPSX_NGT_F32 : VOPCX_F32 <"v_cmpsx_ngt_f32", "v_cmpsx_nlt_f32">; 573defm V_CMPSX_NLE_F32 : VOPCX_F32 <"v_cmpsx_nle_f32">; 574defm V_CMPSX_NEQ_F32 : VOPCX_F32 <"v_cmpsx_neq_f32">; 575defm V_CMPSX_NLT_F32 : VOPCX_F32 <"v_cmpsx_nlt_f32">; 576defm V_CMPSX_TRU_F32 : VOPCX_F32 <"v_cmpsx_tru_f32">; 577 578defm V_CMPS_F_F64 : VOPC_F64 <"v_cmps_f_f64">; 579defm V_CMPS_LT_F64 : VOPC_F64 <"v_cmps_lt_f64", COND_NULL, "v_cmps_gt_f64">; 580defm V_CMPS_EQ_F64 : VOPC_F64 <"v_cmps_eq_f64">; 581defm V_CMPS_LE_F64 : VOPC_F64 <"v_cmps_le_f64", COND_NULL, "v_cmps_ge_f64">; 582defm V_CMPS_GT_F64 : VOPC_F64 <"v_cmps_gt_f64">; 583defm V_CMPS_LG_F64 : VOPC_F64 <"v_cmps_lg_f64">; 584defm V_CMPS_GE_F64 : VOPC_F64 <"v_cmps_ge_f64">; 585defm V_CMPS_O_F64 : VOPC_F64 <"v_cmps_o_f64">; 586defm V_CMPS_U_F64 : VOPC_F64 <"v_cmps_u_f64">; 587defm V_CMPS_NGE_F64 : VOPC_F64 <"v_cmps_nge_f64", COND_NULL, "v_cmps_nle_f64">; 588defm V_CMPS_NLG_F64 : VOPC_F64 <"v_cmps_nlg_f64">; 589defm V_CMPS_NGT_F64 : VOPC_F64 <"v_cmps_ngt_f64", COND_NULL, "v_cmps_nlt_f64">; 590defm V_CMPS_NLE_F64 : VOPC_F64 <"v_cmps_nle_f64">; 591defm V_CMPS_NEQ_F64 : VOPC_F64 <"v_cmps_neq_f64">; 592defm V_CMPS_NLT_F64 : VOPC_F64 <"v_cmps_nlt_f64">; 593defm V_CMPS_TRU_F64 : VOPC_F64 <"v_cmps_tru_f64">; 594 595defm V_CMPSX_F_F64 : VOPCX_F64 <"v_cmpsx_f_f64">; 596defm V_CMPSX_LT_F64 : VOPCX_F64 <"v_cmpsx_lt_f64", "v_cmpsx_gt_f64">; 597defm V_CMPSX_EQ_F64 : VOPCX_F64 <"v_cmpsx_eq_f64">; 598defm V_CMPSX_LE_F64 : VOPCX_F64 <"v_cmpsx_le_f64", "v_cmpsx_ge_f64">; 599defm V_CMPSX_GT_F64 : VOPCX_F64 <"v_cmpsx_gt_f64">; 600defm V_CMPSX_LG_F64 : VOPCX_F64 <"v_cmpsx_lg_f64">; 601defm V_CMPSX_GE_F64 : VOPCX_F64 <"v_cmpsx_ge_f64">; 602defm V_CMPSX_O_F64 : VOPCX_F64 <"v_cmpsx_o_f64">; 603defm V_CMPSX_U_F64 : VOPCX_F64 <"v_cmpsx_u_f64">; 604defm V_CMPSX_NGE_F64 : VOPCX_F64 <"v_cmpsx_nge_f64", "v_cmpsx_nle_f64">; 605defm V_CMPSX_NLG_F64 : VOPCX_F64 <"v_cmpsx_nlg_f64">; 606defm V_CMPSX_NGT_F64 : VOPCX_F64 <"v_cmpsx_ngt_f64", "v_cmpsx_nlt_f64">; 607defm V_CMPSX_NLE_F64 : VOPCX_F64 <"v_cmpsx_nle_f64">; 608defm V_CMPSX_NEQ_F64 : VOPCX_F64 <"v_cmpsx_neq_f64">; 609defm V_CMPSX_NLT_F64 : VOPCX_F64 <"v_cmpsx_nlt_f64">; 610defm V_CMPSX_TRU_F64 : VOPCX_F64 <"v_cmpsx_tru_f64">; 611 612} // End SubtargetPredicate = isGFX6GFX7 613 614let SubtargetPredicate = Has16BitInsts in { 615 616defm V_CMP_F_F16 : VOPC_F16 <"v_cmp_f_f16">; 617defm V_CMP_LT_F16 : VOPC_F16 <"v_cmp_lt_f16", COND_OLT, "v_cmp_gt_f16">; 618defm V_CMP_EQ_F16 : VOPC_F16 <"v_cmp_eq_f16", COND_OEQ>; 619defm V_CMP_LE_F16 : VOPC_F16 <"v_cmp_le_f16", COND_OLE, "v_cmp_ge_f16">; 620defm V_CMP_GT_F16 : VOPC_F16 <"v_cmp_gt_f16", COND_OGT>; 621defm V_CMP_LG_F16 : VOPC_F16 <"v_cmp_lg_f16", COND_ONE>; 622defm V_CMP_GE_F16 : VOPC_F16 <"v_cmp_ge_f16", COND_OGE>; 623defm V_CMP_O_F16 : VOPC_F16 <"v_cmp_o_f16", COND_O>; 624defm V_CMP_U_F16 : VOPC_F16 <"v_cmp_u_f16", COND_UO>; 625defm V_CMP_NGE_F16 : VOPC_F16 <"v_cmp_nge_f16", COND_ULT, "v_cmp_nle_f16">; 626defm V_CMP_NLG_F16 : VOPC_F16 <"v_cmp_nlg_f16", COND_UEQ>; 627defm V_CMP_NGT_F16 : VOPC_F16 <"v_cmp_ngt_f16", COND_ULE, "v_cmp_nlt_f16">; 628defm V_CMP_NLE_F16 : VOPC_F16 <"v_cmp_nle_f16", COND_UGT>; 629defm V_CMP_NEQ_F16 : VOPC_F16 <"v_cmp_neq_f16", COND_UNE>; 630defm V_CMP_NLT_F16 : VOPC_F16 <"v_cmp_nlt_f16", COND_UGE>; 631defm V_CMP_TRU_F16 : VOPC_F16 <"v_cmp_tru_f16">; 632 633defm V_CMPX_F_F16 : VOPCX_F16 <"v_cmpx_f_f16">; 634defm V_CMPX_LT_F16 : VOPCX_F16 <"v_cmpx_lt_f16", "v_cmpx_gt_f16">; 635defm V_CMPX_EQ_F16 : VOPCX_F16 <"v_cmpx_eq_f16">; 636defm V_CMPX_LE_F16 : VOPCX_F16 <"v_cmpx_le_f16", "v_cmpx_ge_f16">; 637defm V_CMPX_GT_F16 : VOPCX_F16 <"v_cmpx_gt_f16">; 638defm V_CMPX_LG_F16 : VOPCX_F16 <"v_cmpx_lg_f16">; 639defm V_CMPX_GE_F16 : VOPCX_F16 <"v_cmpx_ge_f16">; 640defm V_CMPX_O_F16 : VOPCX_F16 <"v_cmpx_o_f16">; 641defm V_CMPX_U_F16 : VOPCX_F16 <"v_cmpx_u_f16">; 642defm V_CMPX_NGE_F16 : VOPCX_F16 <"v_cmpx_nge_f16", "v_cmpx_nle_f16">; 643defm V_CMPX_NLG_F16 : VOPCX_F16 <"v_cmpx_nlg_f16">; 644defm V_CMPX_NGT_F16 : VOPCX_F16 <"v_cmpx_ngt_f16", "v_cmpx_nlt_f16">; 645defm V_CMPX_NLE_F16 : VOPCX_F16 <"v_cmpx_nle_f16">; 646defm V_CMPX_NEQ_F16 : VOPCX_F16 <"v_cmpx_neq_f16">; 647defm V_CMPX_NLT_F16 : VOPCX_F16 <"v_cmpx_nlt_f16">; 648defm V_CMPX_TRU_F16 : VOPCX_F16 <"v_cmpx_tru_f16">; 649 650defm V_CMP_F_I16 : VOPC_I16 <"v_cmp_f_i16">; 651defm V_CMP_LT_I16 : VOPC_I16 <"v_cmp_lt_i16", COND_SLT, "v_cmp_gt_i16">; 652defm V_CMP_EQ_I16 : VOPC_I16 <"v_cmp_eq_i16">; 653defm V_CMP_LE_I16 : VOPC_I16 <"v_cmp_le_i16", COND_SLE, "v_cmp_ge_i16">; 654defm V_CMP_GT_I16 : VOPC_I16 <"v_cmp_gt_i16", COND_SGT>; 655defm V_CMP_NE_I16 : VOPC_I16 <"v_cmp_ne_i16">; 656defm V_CMP_GE_I16 : VOPC_I16 <"v_cmp_ge_i16", COND_SGE>; 657defm V_CMP_T_I16 : VOPC_I16 <"v_cmp_t_i16">; 658 659defm V_CMP_F_U16 : VOPC_I16 <"v_cmp_f_u16">; 660defm V_CMP_LT_U16 : VOPC_I16 <"v_cmp_lt_u16", COND_ULT, "v_cmp_gt_u16">; 661defm V_CMP_EQ_U16 : VOPC_I16 <"v_cmp_eq_u16", COND_EQ>; 662defm V_CMP_LE_U16 : VOPC_I16 <"v_cmp_le_u16", COND_ULE, "v_cmp_ge_u16">; 663defm V_CMP_GT_U16 : VOPC_I16 <"v_cmp_gt_u16", COND_UGT>; 664defm V_CMP_NE_U16 : VOPC_I16 <"v_cmp_ne_u16", COND_NE>; 665defm V_CMP_GE_U16 : VOPC_I16 <"v_cmp_ge_u16", COND_UGE>; 666defm V_CMP_T_U16 : VOPC_I16 <"v_cmp_t_u16">; 667 668defm V_CMPX_F_I16 : VOPCX_I16 <"v_cmpx_f_i16">; 669defm V_CMPX_LT_I16 : VOPCX_I16 <"v_cmpx_lt_i16", "v_cmpx_gt_i16">; 670defm V_CMPX_EQ_I16 : VOPCX_I16 <"v_cmpx_eq_i16">; 671defm V_CMPX_LE_I16 : VOPCX_I16 <"v_cmpx_le_i16", "v_cmpx_ge_i16">; 672defm V_CMPX_GT_I16 : VOPCX_I16 <"v_cmpx_gt_i16">; 673defm V_CMPX_NE_I16 : VOPCX_I16 <"v_cmpx_ne_i16">; 674defm V_CMPX_GE_I16 : VOPCX_I16 <"v_cmpx_ge_i16">; 675defm V_CMPX_T_I16 : VOPCX_I16 <"v_cmpx_t_i16">; 676 677defm V_CMPX_F_U16 : VOPCX_I16 <"v_cmpx_f_u16">; 678defm V_CMPX_LT_U16 : VOPCX_I16 <"v_cmpx_lt_u16", "v_cmpx_gt_u16">; 679defm V_CMPX_EQ_U16 : VOPCX_I16 <"v_cmpx_eq_u16">; 680defm V_CMPX_LE_U16 : VOPCX_I16 <"v_cmpx_le_u16", "v_cmpx_ge_u16">; 681defm V_CMPX_GT_U16 : VOPCX_I16 <"v_cmpx_gt_u16">; 682defm V_CMPX_NE_U16 : VOPCX_I16 <"v_cmpx_ne_u16">; 683defm V_CMPX_GE_U16 : VOPCX_I16 <"v_cmpx_ge_u16">; 684defm V_CMPX_T_U16 : VOPCX_I16 <"v_cmpx_t_u16">; 685 686} // End SubtargetPredicate = Has16BitInsts 687 688defm V_CMP_F_I32 : VOPC_I32 <"v_cmp_f_i32">; 689defm V_CMP_LT_I32 : VOPC_I32 <"v_cmp_lt_i32", COND_SLT, "v_cmp_gt_i32">; 690defm V_CMP_EQ_I32 : VOPC_I32 <"v_cmp_eq_i32">; 691defm V_CMP_LE_I32 : VOPC_I32 <"v_cmp_le_i32", COND_SLE, "v_cmp_ge_i32">; 692defm V_CMP_GT_I32 : VOPC_I32 <"v_cmp_gt_i32", COND_SGT>; 693defm V_CMP_NE_I32 : VOPC_I32 <"v_cmp_ne_i32">; 694defm V_CMP_GE_I32 : VOPC_I32 <"v_cmp_ge_i32", COND_SGE>; 695defm V_CMP_T_I32 : VOPC_I32 <"v_cmp_t_i32">; 696 697defm V_CMPX_F_I32 : VOPCX_I32 <"v_cmpx_f_i32">; 698defm V_CMPX_LT_I32 : VOPCX_I32 <"v_cmpx_lt_i32", "v_cmpx_gt_i32">; 699defm V_CMPX_EQ_I32 : VOPCX_I32 <"v_cmpx_eq_i32">; 700defm V_CMPX_LE_I32 : VOPCX_I32 <"v_cmpx_le_i32", "v_cmpx_ge_i32">; 701defm V_CMPX_GT_I32 : VOPCX_I32 <"v_cmpx_gt_i32">; 702defm V_CMPX_NE_I32 : VOPCX_I32 <"v_cmpx_ne_i32">; 703defm V_CMPX_GE_I32 : VOPCX_I32 <"v_cmpx_ge_i32">; 704defm V_CMPX_T_I32 : VOPCX_I32 <"v_cmpx_t_i32">; 705 706defm V_CMP_F_I64 : VOPC_I64 <"v_cmp_f_i64">; 707defm V_CMP_LT_I64 : VOPC_I64 <"v_cmp_lt_i64", COND_SLT, "v_cmp_gt_i64">; 708defm V_CMP_EQ_I64 : VOPC_I64 <"v_cmp_eq_i64">; 709defm V_CMP_LE_I64 : VOPC_I64 <"v_cmp_le_i64", COND_SLE, "v_cmp_ge_i64">; 710defm V_CMP_GT_I64 : VOPC_I64 <"v_cmp_gt_i64", COND_SGT>; 711defm V_CMP_NE_I64 : VOPC_I64 <"v_cmp_ne_i64">; 712defm V_CMP_GE_I64 : VOPC_I64 <"v_cmp_ge_i64", COND_SGE>; 713defm V_CMP_T_I64 : VOPC_I64 <"v_cmp_t_i64">; 714 715defm V_CMPX_F_I64 : VOPCX_I64 <"v_cmpx_f_i64">; 716defm V_CMPX_LT_I64 : VOPCX_I64 <"v_cmpx_lt_i64", "v_cmpx_gt_i64">; 717defm V_CMPX_EQ_I64 : VOPCX_I64 <"v_cmpx_eq_i64">; 718defm V_CMPX_LE_I64 : VOPCX_I64 <"v_cmpx_le_i64", "v_cmpx_ge_i64">; 719defm V_CMPX_GT_I64 : VOPCX_I64 <"v_cmpx_gt_i64">; 720defm V_CMPX_NE_I64 : VOPCX_I64 <"v_cmpx_ne_i64">; 721defm V_CMPX_GE_I64 : VOPCX_I64 <"v_cmpx_ge_i64">; 722defm V_CMPX_T_I64 : VOPCX_I64 <"v_cmpx_t_i64">; 723 724defm V_CMP_F_U32 : VOPC_I32 <"v_cmp_f_u32">; 725defm V_CMP_LT_U32 : VOPC_I32 <"v_cmp_lt_u32", COND_ULT, "v_cmp_gt_u32">; 726defm V_CMP_EQ_U32 : VOPC_I32 <"v_cmp_eq_u32", COND_EQ>; 727defm V_CMP_LE_U32 : VOPC_I32 <"v_cmp_le_u32", COND_ULE, "v_cmp_ge_u32">; 728defm V_CMP_GT_U32 : VOPC_I32 <"v_cmp_gt_u32", COND_UGT>; 729defm V_CMP_NE_U32 : VOPC_I32 <"v_cmp_ne_u32", COND_NE>; 730defm V_CMP_GE_U32 : VOPC_I32 <"v_cmp_ge_u32", COND_UGE>; 731defm V_CMP_T_U32 : VOPC_I32 <"v_cmp_t_u32">; 732 733defm V_CMPX_F_U32 : VOPCX_I32 <"v_cmpx_f_u32">; 734defm V_CMPX_LT_U32 : VOPCX_I32 <"v_cmpx_lt_u32", "v_cmpx_gt_u32">; 735defm V_CMPX_EQ_U32 : VOPCX_I32 <"v_cmpx_eq_u32">; 736defm V_CMPX_LE_U32 : VOPCX_I32 <"v_cmpx_le_u32", "v_cmpx_le_u32">; 737defm V_CMPX_GT_U32 : VOPCX_I32 <"v_cmpx_gt_u32">; 738defm V_CMPX_NE_U32 : VOPCX_I32 <"v_cmpx_ne_u32">; 739defm V_CMPX_GE_U32 : VOPCX_I32 <"v_cmpx_ge_u32">; 740defm V_CMPX_T_U32 : VOPCX_I32 <"v_cmpx_t_u32">; 741 742defm V_CMP_F_U64 : VOPC_I64 <"v_cmp_f_u64">; 743defm V_CMP_LT_U64 : VOPC_I64 <"v_cmp_lt_u64", COND_ULT, "v_cmp_gt_u64">; 744defm V_CMP_EQ_U64 : VOPC_I64 <"v_cmp_eq_u64", COND_EQ>; 745defm V_CMP_LE_U64 : VOPC_I64 <"v_cmp_le_u64", COND_ULE, "v_cmp_ge_u64">; 746defm V_CMP_GT_U64 : VOPC_I64 <"v_cmp_gt_u64", COND_UGT>; 747defm V_CMP_NE_U64 : VOPC_I64 <"v_cmp_ne_u64", COND_NE>; 748defm V_CMP_GE_U64 : VOPC_I64 <"v_cmp_ge_u64", COND_UGE>; 749defm V_CMP_T_U64 : VOPC_I64 <"v_cmp_t_u64">; 750 751defm V_CMPX_F_U64 : VOPCX_I64 <"v_cmpx_f_u64">; 752defm V_CMPX_LT_U64 : VOPCX_I64 <"v_cmpx_lt_u64", "v_cmpx_gt_u64">; 753defm V_CMPX_EQ_U64 : VOPCX_I64 <"v_cmpx_eq_u64">; 754defm V_CMPX_LE_U64 : VOPCX_I64 <"v_cmpx_le_u64", "v_cmpx_ge_u64">; 755defm V_CMPX_GT_U64 : VOPCX_I64 <"v_cmpx_gt_u64">; 756defm V_CMPX_NE_U64 : VOPCX_I64 <"v_cmpx_ne_u64">; 757defm V_CMPX_GE_U64 : VOPCX_I64 <"v_cmpx_ge_u64">; 758defm V_CMPX_T_U64 : VOPCX_I64 <"v_cmpx_t_u64">; 759 760//===----------------------------------------------------------------------===// 761// Class instructions 762//===----------------------------------------------------------------------===// 763 764class VOPC_Class_Profile<list<SchedReadWrite> sched, ValueType src0VT, ValueType src1VT = i32> : 765 VOPC_Profile<sched, src0VT, src1VT> { 766 let AsmDPP = "$src0_modifiers, $src1 $dpp_ctrl$row_mask$bank_mask$bound_ctrl"; 767 let AsmDPP16 = AsmDPP#"$fi"; 768 let InsDPP = (ins Src0ModDPP:$src0_modifiers, Src0DPP:$src0, Src1DPP:$src1, dpp_ctrl:$dpp_ctrl, row_mask:$row_mask, bank_mask:$bank_mask, bound_ctrl:$bound_ctrl); 769 let InsDPP16 = !con(InsDPP, (ins FI:$fi)); 770 // DPP8 forbids modifiers and can inherit from VOPC_Profile 771 772 let Ins64 = (ins Src0Mod:$src0_modifiers, Src0RC64:$src0, Src1RC64:$src1); 773 dag InsPartVOP3DPP = (ins FPVRegInputMods:$src0_modifiers, VGPRSrc_32:$src0, VRegSrc_32:$src1); 774 let InsVOP3Base = !con(InsPartVOP3DPP, !if(HasOpSel, (ins op_sel0:$op_sel), 775 (ins))); 776 let AsmVOP3Base = "$sdst, $src0_modifiers, $src1"; 777 778 let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0, 779 Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1, 780 clampmod:$clamp, src0_sel:$src0_sel, src1_sel:$src1_sel); 781 782 let AsmSDWA = " vcc, $src0_modifiers, $src1_modifiers$clamp $src0_sel $src1_sel"; 783 let HasSrc1Mods = 0; 784 let HasClamp = 0; 785 let HasOMod = 0; 786} 787 788multiclass VOPC_Class_Profile_t16<list<SchedReadWrite> sched> { 789 def NAME : VOPC_Class_Profile<sched, f16>; 790 def _t16 : VOPC_Class_Profile<sched, f16, i16> { 791 let IsTrue16 = 1; 792 let Src1RC32 = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 793 let Src1RC64 = VSrc_b32; 794 let Src0DPP = getVregSrcForVT<Src0VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 795 let Src1DPP = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 796 let Src2DPP = getVregSrcForVT<Src2VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 797 let Src0ModDPP = getSrcModDPP_t16<Src0VT>.ret; 798 let Src1ModDPP = getSrcModDPP_t16<Src1VT>.ret; 799 let Src2ModDPP = getSrcModDPP_t16<Src2VT>.ret; 800 } 801} 802 803class VOPC_Class_NoSdst_Profile<list<SchedReadWrite> sched, ValueType src0VT, ValueType src1VT = i32> : 804 VOPC_Class_Profile<sched, src0VT, src1VT> { 805 let Outs64 = (outs ); 806 let OutsSDWA = (outs ); 807 let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0, 808 Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1, 809 src0_sel:$src0_sel, src1_sel:$src1_sel); 810 let AsmVOP3Base = "$src0_modifiers, $src1"; 811 let AsmSDWA9 = "$src0_modifiers, $src1_modifiers $src0_sel $src1_sel"; 812 let EmitDst = 0; 813} 814 815multiclass VOPC_Class_NoSdst_Profile_t16<list<SchedReadWrite> sched> { 816 def NAME : VOPC_Class_NoSdst_Profile<sched, f16>; 817 def _t16 : VOPC_Class_NoSdst_Profile<sched, f16, i16> { 818 let IsTrue16 = 1; 819 let Src1RC32 = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 820 let Src1RC64 = VSrc_b32; 821 let Src0DPP = getVregSrcForVT<Src0VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 822 let Src1DPP = getVregSrcForVT<Src1VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 823 let Src2DPP = getVregSrcForVT<Src2VT, 1/*IsTrue16*/, 1/*IsFake16*/>.ret; 824 let Src0ModDPP = getSrcModDPP_t16<Src0VT>.ret; 825 let Src1ModDPP = getSrcModDPP_t16<Src1VT>.ret; 826 let Src2ModDPP = getSrcModDPP_t16<Src2VT>.ret; 827 } 828} 829 830class getVOPCClassPat64 <VOPProfile P> { 831 list<dag> ret = 832 [(set i1:$sdst, 833 (AMDGPUfp_class 834 (P.Src0VT (VOP3ModsNonCanonicalizing P.Src0VT:$src0, i32:$src0_modifiers)), 835 i32:$src1))]; 836} 837 838 839// Special case for class instructions which only have modifiers on 840// the 1st source operand. 841multiclass VOPC_Class_Pseudos <string opName, VOPC_Profile p, bit DefExec, 842 bit DefVcc = 1> { 843 def _e32 : VOPC_Pseudo <opName, p>, 844 VCMPXNoSDstTable<1, opName#"_e32"> { 845 let Defs = !if(DefExec, !if(DefVcc, [VCC, EXEC], [EXEC]), 846 !if(DefVcc, [VCC], [])); 847 let SchedRW = p.Schedule; 848 let isConvergent = DefExec; 849 } 850 851 def _e64 : VOP3_Pseudo<opName, p, getVOPCClassPat64<p>.ret>, 852 VCMPXNoSDstTable<1, opName#"_e64"> { 853 let Defs = !if(DefExec, [EXEC], []); 854 let SchedRW = p.Schedule; 855 } 856 857 if p.HasExtSDWA then 858 def _sdwa : VOPC_SDWA_Pseudo <opName, p> { 859 let Defs = !if(DefExec, !if(DefVcc, [VCC, EXEC], [EXEC]), 860 !if(DefVcc, [VCC], [])); 861 let SchedRW = p.Schedule; 862 let isConvergent = DefExec; 863 } 864 865 let SubtargetPredicate = isGFX11Plus in { 866 if p.HasExtDPP then 867 def _e32_dpp : VOP_DPP_Pseudo<opName, p> { 868 let Defs = !if(DefExec, !if(DefVcc, [VCC, EXEC], [EXEC]), 869 !if(DefVcc, [VCC], [])); 870 let SchedRW = p.Schedule; 871 let isConvergent = DefExec; 872 let VOPC = 1; 873 let Constraints = ""; 874 } 875 if p.HasExtVOP3DPP then 876 def _e64_dpp : VOP3_DPP_Pseudo<opName, p> { 877 let Defs = !if(DefExec, [EXEC], []); 878 let SchedRW = p.Schedule; 879 let Constraints = ""; 880 } 881 } // end SubtargetPredicate = isGFX11Plus 882} 883 884let SubtargetPredicate = HasSdstCMPX in { 885multiclass VOPCX_Class_Pseudos <string opName, 886 VOPC_Profile P, 887 VOPC_Profile P_NoSDst> : 888 VOPC_Class_Pseudos <opName, P, 1, 1> { 889 890 def _nosdst_e32 : VOPC_Pseudo <opName#"_nosdst", P_NoSDst, [], 0>, 891 VCMPXNoSDstTable<0, opName#"_e32"> { 892 let Defs = [EXEC]; 893 let SchedRW = P_NoSDst.Schedule; 894 let isConvergent = 1; 895 let SubtargetPredicate = HasNoSdstCMPX; 896 } 897 898 def _nosdst_e64 : VOP3_Pseudo<opName#"_nosdst", P_NoSDst>, 899 VCMPXNoSDstTable<0, opName#"_e64"> { 900 let Defs = [EXEC]; 901 let SchedRW = P_NoSDst.Schedule; 902 let SubtargetPredicate = HasNoSdstCMPX; 903 } 904 905 if P_NoSDst.HasExtSDWA then 906 def _nosdst_sdwa : VOPC_SDWA_Pseudo <opName#"_nosdst", P_NoSDst> { 907 let Defs = [EXEC]; 908 let SchedRW = P_NoSDst.Schedule; 909 let isConvergent = 1; 910 let SubtargetPredicate = HasNoSdstCMPX; 911 } 912 913 let SubtargetPredicate = isGFX11Plus in { 914 if P.HasExtDPP then 915 def _nosdst_e32_dpp : VOP_DPP_Pseudo<opName#"_nosdst", P_NoSDst> { 916 let Defs = [EXEC]; 917 let SchedRW = P_NoSDst.Schedule; 918 let isConvergent = 1; 919 let VOPC = 1; 920 let Constraints = ""; 921 } 922 if P.HasExtVOP3DPP then 923 def _nosdst_e64_dpp : VOP3_DPP_Pseudo<opName#"_nosdst", P_NoSDst> { 924 let Defs = [EXEC]; 925 let SchedRW = P_NoSDst.Schedule; 926 let Constraints = ""; 927 } 928 } // end SubtargetPredicate = isGFX11Plus 929} 930} // End SubtargetPredicate = HasSdstCMPX 931 932defm VOPC_I1_F16_I16 : VOPC_Class_Profile_t16<[Write32Bit]>; 933def VOPC_I1_F32_I32 : VOPC_Class_Profile<[Write32Bit], f32>; 934def VOPC_I1_F64_I32 : VOPC_Class_Profile<[WriteDoubleAdd], f64>; 935 936defm VOPC_F16_I16 : VOPC_Class_NoSdst_Profile_t16<[Write32Bit]>; 937def VOPC_F32_I32 : VOPC_Class_NoSdst_Profile<[Write32Bit], f32>; 938def VOPC_F64_I32 : VOPC_Class_NoSdst_Profile<[Write64Bit], f64>; 939 940multiclass VOPC_CLASS_F16 <string opName> { 941 let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in { 942 defm NAME : VOPC_Class_Pseudos <opName, VOPC_I1_F16_I16, 0>; 943 } 944 let OtherPredicates = [HasTrue16BitInsts] in { 945 defm _t16 : VOPC_Class_Pseudos <opName#"_t16", VOPC_I1_F16_I16_t16, 0>; 946 } 947} 948 949multiclass VOPCX_CLASS_F16 <string opName> { 950 let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in { 951 defm NAME : VOPCX_Class_Pseudos <opName, VOPC_I1_F16_I16, VOPC_F16_I16>; 952 } 953 let OtherPredicates = [HasTrue16BitInsts] in { 954 defm _t16 : VOPCX_Class_Pseudos <opName#"_t16", VOPC_I1_F16_I16_t16, VOPC_F16_I16_t16>; 955 } 956} 957 958multiclass VOPC_CLASS_F32 <string opName> : 959 VOPC_Class_Pseudos <opName, VOPC_I1_F32_I32, 0>; 960 961multiclass VOPCX_CLASS_F32 <string opName> : 962 VOPCX_Class_Pseudos <opName, VOPC_I1_F32_I32, VOPC_F32_I32>; 963 964multiclass VOPC_CLASS_F64 <string opName> : 965 VOPC_Class_Pseudos <opName, VOPC_I1_F64_I32, 0>; 966 967multiclass VOPCX_CLASS_F64 <string opName> : 968 VOPCX_Class_Pseudos <opName, VOPC_I1_F64_I32, VOPC_F64_I32>; 969 970// cmp_class ignores the FP mode and faithfully reports the unmodified 971// source value. 972let ReadsModeReg = 0, mayRaiseFPException = 0 in { 973defm V_CMP_CLASS_F32 : VOPC_CLASS_F32 <"v_cmp_class_f32">; 974defm V_CMPX_CLASS_F32 : VOPCX_CLASS_F32 <"v_cmpx_class_f32">; 975defm V_CMP_CLASS_F64 : VOPC_CLASS_F64 <"v_cmp_class_f64">; 976defm V_CMPX_CLASS_F64 : VOPCX_CLASS_F64 <"v_cmpx_class_f64">; 977 978defm V_CMP_CLASS_F16 : VOPC_CLASS_F16 <"v_cmp_class_f16">; 979defm V_CMPX_CLASS_F16 : VOPCX_CLASS_F16 <"v_cmpx_class_f16">; 980} // End ReadsModeReg = 0, mayRaiseFPException = 0 981 982//===----------------------------------------------------------------------===// 983// V_ICMPIntrinsic Pattern. 984//===----------------------------------------------------------------------===// 985 986// We need to use COPY_TO_REGCLASS to w/a the problem when ReplaceAllUsesWith() 987// complaints it cannot replace i1 <-> i64/i32 if node was not morphed in place. 988multiclass ICMP_Pattern <PatFrags cond, Instruction inst, ValueType vt> { 989 let WaveSizePredicate = isWave64 in 990 def : GCNPat < 991 (i64 (AMDGPUsetcc vt:$src0, vt:$src1, cond)), 992 (i64 (COPY_TO_REGCLASS (inst $src0, $src1), SReg_64)) 993 >; 994 995 let WaveSizePredicate = isWave32 in { 996 def : GCNPat < 997 (i32 (AMDGPUsetcc vt:$src0, vt:$src1, cond)), 998 (i32 (COPY_TO_REGCLASS (inst $src0, $src1), SReg_32)) 999 >; 1000 1001 // Support codegen of i64 setcc in wave32 mode. 1002 def : GCNPat < 1003 (i64 (AMDGPUsetcc vt:$src0, vt:$src1, cond)), 1004 (i64 (REG_SEQUENCE SReg_64, (inst $src0, $src1), sub0, (S_MOV_B32 (i32 0)), sub1)) 1005 >; 1006 } 1007} 1008 1009defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U32_e64, i32>; 1010defm : ICMP_Pattern <COND_NE, V_CMP_NE_U32_e64, i32>; 1011defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U32_e64, i32>; 1012defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U32_e64, i32>; 1013defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U32_e64, i32>; 1014defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U32_e64, i32>; 1015defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I32_e64, i32>; 1016defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I32_e64, i32>; 1017defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I32_e64, i32>; 1018defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I32_e64, i32>; 1019 1020defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U64_e64, i64>; 1021defm : ICMP_Pattern <COND_NE, V_CMP_NE_U64_e64, i64>; 1022defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U64_e64, i64>; 1023defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U64_e64, i64>; 1024defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U64_e64, i64>; 1025defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U64_e64, i64>; 1026defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I64_e64, i64>; 1027defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I64_e64, i64>; 1028defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I64_e64, i64>; 1029defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I64_e64, i64>; 1030 1031let OtherPredicates = [HasTrue16BitInsts] in { 1032defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U16_t16_e64, i16>; 1033defm : ICMP_Pattern <COND_NE, V_CMP_NE_U16_t16_e64, i16>; 1034defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U16_t16_e64, i16>; 1035defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U16_t16_e64, i16>; 1036defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U16_t16_e64, i16>; 1037defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U16_t16_e64, i16>; 1038defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I16_t16_e64, i16>; 1039defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I16_t16_e64, i16>; 1040defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I16_t16_e64, i16>; 1041defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I16_t16_e64, i16>; 1042} // End OtherPredicates = [HasTrue16BitInsts] 1043 1044let OtherPredicates = [NotHasTrue16BitInsts] in { 1045defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U16_e64, i16>; 1046defm : ICMP_Pattern <COND_NE, V_CMP_NE_U16_e64, i16>; 1047defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U16_e64, i16>; 1048defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U16_e64, i16>; 1049defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U16_e64, i16>; 1050defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U16_e64, i16>; 1051defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I16_e64, i16>; 1052defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I16_e64, i16>; 1053defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I16_e64, i16>; 1054defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I16_e64, i16>; 1055} // End OtherPredicates = [NotHasTrue16BitInsts] 1056 1057multiclass FCMP_Pattern <PatFrags cond, Instruction inst, ValueType vt> { 1058 let WaveSizePredicate = isWave64 in 1059 def : GCNPat < 1060 (i64 (AMDGPUsetcc (vt (VOP3Mods vt:$src0, i32:$src0_modifiers)), 1061 (vt (VOP3Mods vt:$src1, i32:$src1_modifiers)), cond)), 1062 (i64 (COPY_TO_REGCLASS (inst $src0_modifiers, $src0, $src1_modifiers, $src1, 1063 DSTCLAMP.NONE), SReg_64)) 1064 >; 1065 1066 let WaveSizePredicate = isWave32 in { 1067 def : GCNPat < 1068 (i32 (AMDGPUsetcc (vt (VOP3Mods vt:$src0, i32:$src0_modifiers)), 1069 (vt (VOP3Mods vt:$src1, i32:$src1_modifiers)), cond)), 1070 (i32 (COPY_TO_REGCLASS (inst $src0_modifiers, $src0, $src1_modifiers, $src1, 1071 DSTCLAMP.NONE), SReg_32)) 1072 >; 1073 1074 def : GCNPat < 1075 (i64 (AMDGPUsetcc (vt (VOP3Mods vt:$src0, i32:$src0_modifiers)), 1076 (vt (VOP3Mods vt:$src1, i32:$src1_modifiers)), cond)), 1077 (i64 (REG_SEQUENCE SReg_64, (inst $src0_modifiers, $src0, $src1_modifiers, $src1, 1078 DSTCLAMP.NONE), sub0, 1079 (S_MOV_B32 (i32 0)), sub1)) 1080 >; 1081 } 1082} 1083 1084defm : FCMP_Pattern <COND_O, V_CMP_O_F32_e64, f32>; 1085defm : FCMP_Pattern <COND_UO, V_CMP_U_F32_e64, f32>; 1086defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F32_e64, f32>; 1087defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F32_e64, f32>; 1088defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F32_e64, f32>; 1089defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F32_e64, f32>; 1090defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F32_e64, f32>; 1091defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F32_e64, f32>; 1092 1093defm : FCMP_Pattern <COND_O, V_CMP_O_F64_e64, f64>; 1094defm : FCMP_Pattern <COND_UO, V_CMP_U_F64_e64, f64>; 1095defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F64_e64, f64>; 1096defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F64_e64, f64>; 1097defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F64_e64, f64>; 1098defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F64_e64, f64>; 1099defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F64_e64, f64>; 1100defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F64_e64, f64>; 1101 1102defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F32_e64, f32>; 1103defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F32_e64, f32>; 1104defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F32_e64, f32>; 1105defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F32_e64, f32>; 1106defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F32_e64, f32>; 1107defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F32_e64, f32>; 1108 1109defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F64_e64, f64>; 1110defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F64_e64, f64>; 1111defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F64_e64, f64>; 1112defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F64_e64, f64>; 1113defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F64_e64, f64>; 1114defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F64_e64, f64>; 1115 1116let OtherPredicates = [HasTrue16BitInsts] in { 1117defm : FCMP_Pattern <COND_O, V_CMP_O_F16_t16_e64, f16>; 1118defm : FCMP_Pattern <COND_UO, V_CMP_U_F16_t16_e64, f16>; 1119defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F16_t16_e64, f16>; 1120defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F16_t16_e64, f16>; 1121defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F16_t16_e64, f16>; 1122defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F16_t16_e64, f16>; 1123defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F16_t16_e64, f16>; 1124defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F16_t16_e64, f16>; 1125 1126defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F16_t16_e64, f16>; 1127defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F16_t16_e64, f16>; 1128defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F16_t16_e64, f16>; 1129defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F16_t16_e64, f16>; 1130defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F16_t16_e64, f16>; 1131defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F16_t16_e64, f16>; 1132} // End OtherPredicates = [HasTrue16BitInsts] 1133 1134let OtherPredicates = [NotHasTrue16BitInsts] in { 1135defm : FCMP_Pattern <COND_O, V_CMP_O_F16_e64, f16>; 1136defm : FCMP_Pattern <COND_UO, V_CMP_U_F16_e64, f16>; 1137defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F16_e64, f16>; 1138defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F16_e64, f16>; 1139defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F16_e64, f16>; 1140defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F16_e64, f16>; 1141defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F16_e64, f16>; 1142defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F16_e64, f16>; 1143 1144defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F16_e64, f16>; 1145defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F16_e64, f16>; 1146defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F16_e64, f16>; 1147defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F16_e64, f16>; 1148defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F16_e64, f16>; 1149defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F16_e64, f16>; 1150} // End OtherPredicates = [NotHasTrue16BitInsts] 1151 1152//===----------------------------------------------------------------------===// 1153// DPP Encodings 1154//===----------------------------------------------------------------------===// 1155 1156// VOPC32 1157 1158class VOPC_DPPe_Common<bits<8> op> : Enc64 { 1159 bits<8> src1; 1160 let Inst{16-9} = src1; 1161 let Inst{24-17} = op; 1162 let Inst{31-25} = 0x3e; 1163} 1164 1165class VOPC_DPP_Base<bits<8> op, string OpName, VOPProfile P> 1166 : VOP_DPP_Base<OpName, P, P.InsDPP16, " " #P.AsmDPP16>, 1167 VOPC_DPPe_Common<op> { 1168 bits<2> src0_modifiers; 1169 bits<8> src0; 1170 bits<2> src1_modifiers; 1171 bits<9> dpp_ctrl; 1172 bits<1> bound_ctrl; 1173 bits<4> bank_mask; 1174 bits<4> row_mask; 1175 bit fi; 1176 1177 let Inst{8-0} = 0xfa; 1178 1179 let Inst{39-32} = !if (P.HasSrc0, src0{7-0}, 0); 1180 let Inst{48-40} = dpp_ctrl; 1181 let Inst{50} = fi; 1182 let Inst{51} = bound_ctrl; 1183 let Inst{52} = !if (P.HasSrc0Mods, src0_modifiers{0}, 0); // src0_neg 1184 let Inst{53} = !if (P.HasSrc0Mods, src0_modifiers{1}, 0); // src0_abs 1185 let Inst{54} = !if (P.HasSrc1Mods, src1_modifiers{0}, 0); // src1_neg 1186 let Inst{55} = !if (P.HasSrc1Mods, src1_modifiers{1}, 0); // src1_abs 1187 let Inst{59-56} = bank_mask; 1188 let Inst{63-60} = row_mask; 1189 1190 let AsmMatchConverter = "cvtDPP"; 1191 let VOPC = 1; 1192} 1193 1194class VOPC_DPP8_Base<bits<8> op, string OpName, VOPProfile P> 1195 : VOP_DPP8_Base<OpName, P, P.InsDPP8, " " #P.AsmDPP8>, 1196 VOPC_DPPe_Common<op> { 1197 bits<8> src0; 1198 bits<24> dpp8; 1199 bits<9> fi; 1200 1201 let Inst{8-0} = fi; 1202 1203 let Inst{39-32} = !if (P.HasSrc0, src0{7-0}, 0); 1204 let Inst{63-40} = dpp8{23-0}; 1205 1206 let AsmMatchConverter = "cvtDPP8"; 1207 let VOPC = 1; 1208} 1209 1210class VOPC_DPP16<bits<8> op, VOP_DPP_Pseudo ps, string opName = ps.OpName> 1211 : VOPC_DPP_Base<op, opName, ps.Pfl> { 1212 let AssemblerPredicate = HasDPP16; 1213 let SubtargetPredicate = HasDPP16; 1214 let hasSideEffects = ps.hasSideEffects; 1215 let Defs = ps.Defs; 1216 let SchedRW = ps.SchedRW; 1217 let Uses = ps.Uses; 1218 let OtherPredicates = ps.OtherPredicates; 1219 let Constraints = ps.Constraints; 1220} 1221 1222class VOPC_DPP16_SIMC<bits<8> op, VOP_DPP_Pseudo ps, int subtarget, 1223 string opName = ps.OpName> 1224 : VOPC_DPP16<op, ps, opName>, SIMCInstr<ps.PseudoInstr, subtarget>; 1225 1226class VOPC_DPP8<bits<8> op, VOPC_Pseudo ps, string opName = ps.OpName> 1227 : VOPC_DPP8_Base<op, opName, ps.Pfl> { 1228 // Note ps is the non-dpp pseudo 1229 let hasSideEffects = ps.hasSideEffects; 1230 let Defs = ps.Defs; 1231 let SchedRW = ps.SchedRW; 1232 let Uses = ps.Uses; 1233 let OtherPredicates = ps.OtherPredicates; 1234 let Constraints = ""; 1235} 1236 1237// VOPC64 1238 1239class VOPC64_DPP_Base<bits<10> op, string OpName, VOPProfile P> 1240 : VOP3_DPP_Base<OpName, P, 1>, VOP3_DPPe_Common<op, P> { 1241 Instruction Opcode = !cast<Instruction>(NAME); 1242 1243 bits<8> src0; 1244 bits<9> dpp_ctrl; 1245 bits<1> bound_ctrl; 1246 bits<4> bank_mask; 1247 bits<4> row_mask; 1248 bit fi; 1249 1250 let Inst{40-32} = 0xfa; 1251 let Inst{71-64} = !if(P.HasSrc0, src0{7-0}, 0); 1252 let Inst{80-72} = dpp_ctrl; 1253 let Inst{82} = fi; 1254 let Inst{83} = bound_ctrl; 1255 // Inst{87-84} ignored by hw 1256 let Inst{91-88} = bank_mask; 1257 let Inst{95-92} = row_mask; 1258} 1259 1260class VOPC64_DPP16<bits<10> op, VOP_DPP_Pseudo ps, string opName = ps.OpName> 1261 : VOPC64_DPP_Base<op, opName, ps.Pfl> { 1262 let AssemblerPredicate = HasDPP16; 1263 let SubtargetPredicate = HasDPP16; 1264 let hasSideEffects = ps.hasSideEffects; 1265 let Defs = ps.Defs; 1266 let SchedRW = ps.SchedRW; 1267 let Uses = ps.Uses; 1268 let OtherPredicates = ps.OtherPredicates; 1269 let Constraints = ps.Constraints; 1270} 1271 1272class VOPC64_DPP16_Dst<bits<10> op, VOP_DPP_Pseudo ps, 1273 string opName = ps.OpName> 1274 : VOPC64_DPP16<op, ps, opName> { 1275 bits<8> sdst; 1276 let Inst{7-0} = sdst; 1277} 1278 1279class VOPC64_DPP16_NoDst<bits<10> op, VOP_DPP_Pseudo ps, 1280 string opName = ps.OpName> 1281 : VOPC64_DPP16<op, ps, opName> { 1282 let Inst{7-0} = ? ; 1283} 1284 1285class VOPC64_DPP8_Base<bits<10> op, string OpName, VOPProfile P> 1286 : VOP3_DPP8_Base<OpName, P>, VOP3_DPPe_Common<op, P> { 1287 Instruction Opcode = !cast<Instruction>(NAME); 1288 1289 bits<8> src0; 1290 bits<24> dpp8; 1291 bits<9> fi; 1292 1293 let Inst{40-32} = fi; 1294 let Inst{71-64} = !if(P.HasSrc0, src0{7-0}, 0); 1295 let Inst{95-72} = dpp8{23-0}; 1296} 1297 1298class VOPC64_DPP8<bits<10> op, VOP_Pseudo ps, string opName = ps.OpName> 1299 : VOPC64_DPP8_Base<op, opName, ps.Pfl> { 1300 // Note ps is the non-dpp pseudo 1301 let hasSideEffects = ps.hasSideEffects; 1302 let Defs = ps.Defs; 1303 let SchedRW = ps.SchedRW; 1304 let Uses = ps.Uses; 1305 let OtherPredicates = ps.OtherPredicates; 1306} 1307 1308class VOPC64_DPP8_Dst<bits<10> op, VOP_Pseudo ps, string opName = ps.OpName> 1309 : VOPC64_DPP8<op, ps, opName> { 1310 bits<8> sdst; 1311 let Inst{7-0} = sdst; 1312 let Constraints = ""; 1313} 1314 1315class VOPC64_DPP8_NoDst<bits<10> op, VOP_Pseudo ps, string opName = ps.OpName> 1316 : VOPC64_DPP8<op, ps, opName> { 1317 let Inst{7-0} = ? ; 1318 let Constraints = ""; 1319} 1320 1321//===----------------------------------------------------------------------===// 1322// Target-specific instruction encodings. 1323//===----------------------------------------------------------------------===// 1324 1325//===----------------------------------------------------------------------===// 1326// GFX11, GFX12 1327//===----------------------------------------------------------------------===// 1328 1329multiclass VOPC_Real_Base<GFXGen Gen, bits<9> op> { 1330 let AssemblerPredicate = Gen.AssemblerPredicate in { 1331 defvar ps32 = !cast<VOPC_Pseudo>(NAME#"_e32"); 1332 defvar ps64 = !cast<VOP3_Pseudo>(NAME#"_e64"); 1333 let DecoderNamespace = Gen.DecoderNamespace in { 1334 def _e32#Gen.Suffix : VOPC_Real<ps32, Gen.Subtarget>, 1335 VOPCe<op{7-0}>; 1336 def _e64#Gen.Suffix : VOP3_Real<ps64, Gen.Subtarget>, 1337 VOP3a_gfx11_gfx12<{0, op}, ps64.Pfl> { 1338 // Encoding used for VOPC instructions encoded as VOP3 differs from 1339 // VOP3e by destination name (sdst) as VOPC doesn't have vector dst. 1340 bits<8> sdst; 1341 let Inst{7-0} = sdst; 1342 } 1343 } // End DecoderNamespace = Gen.DecoderNamespace 1344 1345 defm : VOPCInstAliases<NAME, !substr(Gen.Suffix,1)>; 1346 1347 if ps32.Pfl.HasExtDPP then { 1348 defvar psDPP = !cast<VOP_DPP_Pseudo>(NAME #"_e32" #"_dpp"); 1349 defvar AsmDPP = ps32.Pfl.AsmDPP16; 1350 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1351 def _e32_dpp#Gen.Suffix : VOPC_DPP16_SIMC<op{7-0}, psDPP, Gen.Subtarget>; 1352 def _e32_dpp_w32#Gen.Suffix : VOPC_DPP16<op{7-0}, psDPP> { 1353 let AsmString = psDPP.OpName # " vcc_lo, " # AsmDPP; 1354 let isAsmParserOnly = 1; 1355 let WaveSizePredicate = isWave32; 1356 } 1357 def _e32_dpp_w64#Gen.Suffix : VOPC_DPP16<op{7-0}, psDPP> { 1358 let AsmString = psDPP.OpName # " vcc, " # AsmDPP; 1359 let isAsmParserOnly = 1; 1360 let WaveSizePredicate = isWave64; 1361 } 1362 } 1363 defvar AsmDPP8 = ps32.Pfl.AsmDPP8; 1364 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1365 def _e32_dpp8#Gen.Suffix : VOPC_DPP8<op{7-0}, ps32>; 1366 def _e32_dpp8_w32#Gen.Suffix : VOPC_DPP8<op{7-0}, ps32> { 1367 let AsmString = ps32.OpName # " vcc_lo, " # AsmDPP8; 1368 let isAsmParserOnly = 1; 1369 let WaveSizePredicate = isWave32; 1370 } 1371 def _e32_dpp8_w64#Gen.Suffix : VOPC_DPP8<op{7-0}, ps32> { 1372 let AsmString = ps32.OpName # " vcc, " # AsmDPP8; 1373 let isAsmParserOnly = 1; 1374 let WaveSizePredicate = isWave64; 1375 } 1376 } 1377 } 1378 if ps64.Pfl.HasExtVOP3DPP then { 1379 defvar psDPP = !cast<VOP_DPP_Pseudo>(NAME #"_e64" #"_dpp"); 1380 defvar AsmDPP = ps64.Pfl.AsmVOP3DPP16; 1381 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1382 def _e64_dpp#Gen.Suffix : VOPC64_DPP16_Dst<{0, op}, psDPP>, 1383 SIMCInstr<psDPP.PseudoInstr, Gen.Subtarget>; 1384 def _e64_dpp_w32#Gen.Suffix : VOPC64_DPP16_Dst<{0, op}, psDPP> { 1385 let AsmString = psDPP.OpName # " vcc_lo, " # AsmDPP; 1386 let isAsmParserOnly = 1; 1387 let WaveSizePredicate = isWave32; 1388 } 1389 def _e64_dpp_w64#Gen.Suffix : VOPC64_DPP16_Dst<{0, op}, psDPP> { 1390 let AsmString = psDPP.OpName # " vcc, " # AsmDPP; 1391 let isAsmParserOnly = 1; 1392 let WaveSizePredicate = isWave64; 1393 } 1394 } 1395 defvar AsmDPP8 = ps64.Pfl.AsmVOP3DPP8; 1396 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1397 def _e64_dpp8#Gen.Suffix : VOPC64_DPP8_Dst<{0, op}, ps64>; 1398 def _e64_dpp8_w32#Gen.Suffix : VOPC64_DPP8_Dst<{0, op}, ps64> { 1399 let AsmString = ps32.OpName # " vcc_lo, " # AsmDPP8; 1400 let isAsmParserOnly = 1; 1401 let WaveSizePredicate = isWave32; 1402 } 1403 def _e64_dpp8_w64#Gen.Suffix : VOPC64_DPP8_Dst<{0, op}, ps64> { 1404 let AsmString = ps32.OpName # " vcc, " # AsmDPP8; 1405 let isAsmParserOnly = 1; 1406 let WaveSizePredicate = isWave64; 1407 } 1408 } 1409 } 1410 } // AssemblerPredicate = Gen.AssemblerPredicate 1411} 1412 1413multiclass VOPC_Real_with_name<GFXGen Gen, bits<9> op, string OpName, 1414 string asm_name, string pseudo_mnemonic = ""> { 1415 let AssemblerPredicate = Gen.AssemblerPredicate in { 1416 defvar ps32 = !cast<VOPC_Pseudo>(OpName#"_e32"); 1417 defvar ps64 = !cast<VOP3_Pseudo>(OpName#"_e64"); 1418 let DecoderNamespace = Gen.DecoderNamespace in { 1419 def _e32#Gen.Suffix : 1420 // 32 and 64 bit forms of the instruction have _e32 and _e64 1421 // respectively appended to their assembly mnemonic. 1422 // _e64 is printed as part of the VOPDstS64orS32 operand, whereas 1423 // the destination-less 32bit forms add it to the asmString here. 1424 VOPC_Real<ps32, Gen.Subtarget, asm_name#"_e32">, 1425 VOPCe<op{7-0}>, 1426 MnemonicAlias<!if(!empty(pseudo_mnemonic), ps32.Mnemonic, 1427 pseudo_mnemonic), 1428 asm_name, ps32.AsmVariantName>, 1429 Requires<[Gen.AssemblerPredicate]>; 1430 def _e64#Gen.Suffix : 1431 VOP3_Real<ps64, Gen.Subtarget, asm_name>, 1432 VOP3a_gfx11_gfx12<{0, op}, ps64.Pfl>, 1433 MnemonicAlias<!if(!empty(pseudo_mnemonic), ps64.Mnemonic, 1434 pseudo_mnemonic), 1435 asm_name, ps64.AsmVariantName>, 1436 Requires<[Gen.AssemblerPredicate]> { 1437 // Encoding used for VOPC instructions encoded as VOP3 differs from 1438 // VOP3e by destination name (sdst) as VOPC doesn't have vector dst. 1439 bits<8> sdst; 1440 let Inst{7-0} = sdst; 1441 } 1442 } // End DecoderNamespace = Gen.DecoderNamespace 1443 1444 defm : VOPCInstAliases<OpName, !substr(Gen.Suffix, 1), NAME, asm_name>; 1445 1446 if ps32.Pfl.HasExtDPP then { 1447 defvar psDPP = !cast<VOP_DPP_Pseudo>(OpName #"_e32" #"_dpp"); 1448 defvar AsmDPP = ps32.Pfl.AsmDPP16; 1449 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1450 def _e32_dpp#Gen.Suffix : VOPC_DPP16_SIMC<op{7-0}, psDPP, 1451 Gen.Subtarget, asm_name>; 1452 def _e32_dpp_w32#Gen.Suffix 1453 : VOPC_DPP16<op{7-0}, psDPP, asm_name> { 1454 let AsmString = asm_name # " vcc_lo, " # AsmDPP; 1455 let isAsmParserOnly = 1; 1456 let WaveSizePredicate = isWave32; 1457 } 1458 def _e32_dpp_w64#Gen.Suffix 1459 : VOPC_DPP16<op{7-0}, psDPP, asm_name> { 1460 let AsmString = asm_name # " vcc, " # AsmDPP; 1461 let isAsmParserOnly = 1; 1462 let WaveSizePredicate = isWave64; 1463 } 1464 } 1465 defvar AsmDPP8 = ps32.Pfl.AsmDPP8; 1466 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1467 def _e32_dpp8#Gen.Suffix : VOPC_DPP8<op{7-0}, ps32, asm_name>; 1468 def _e32_dpp8_w32#Gen.Suffix 1469 : VOPC_DPP8<op{7-0}, ps32, asm_name> { 1470 let AsmString = asm_name # " vcc_lo, " # AsmDPP8; 1471 let isAsmParserOnly = 1; 1472 let WaveSizePredicate = isWave32; 1473 } 1474 def _e32_dpp8_w64#Gen.Suffix 1475 : VOPC_DPP8<op{7-0}, ps32, asm_name> { 1476 let AsmString = asm_name # " vcc, " # AsmDPP8; 1477 let isAsmParserOnly = 1; 1478 let WaveSizePredicate = isWave64; 1479 } 1480 } 1481 } 1482 1483 if ps64.Pfl.HasExtVOP3DPP then { 1484 defvar psDPP = !cast<VOP_DPP_Pseudo>(OpName #"_e64" #"_dpp"); 1485 defvar AsmDPP = ps64.Pfl.AsmVOP3DPP16; 1486 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1487 def _e64_dpp#Gen.Suffix : VOPC64_DPP16_Dst<{0, op}, psDPP, asm_name>, 1488 SIMCInstr<psDPP.PseudoInstr, Gen.Subtarget>; 1489 def _e64_dpp_w32#Gen.Suffix 1490 : VOPC64_DPP16_Dst<{0, op}, psDPP, asm_name> { 1491 let AsmString = asm_name # " vcc_lo, " # AsmDPP; 1492 let isAsmParserOnly = 1; 1493 let WaveSizePredicate = isWave32; 1494 } 1495 def _e64_dpp_w64#Gen.Suffix 1496 : VOPC64_DPP16_Dst<{0, op}, psDPP, asm_name> { 1497 let AsmString = asm_name # " vcc, " # AsmDPP; 1498 let isAsmParserOnly = 1; 1499 let WaveSizePredicate = isWave64; 1500 } 1501 } 1502 defvar AsmDPP8 = ps64.Pfl.AsmVOP3DPP8; 1503 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1504 def _e64_dpp8#Gen.Suffix : VOPC64_DPP8_Dst<{0, op}, ps64, asm_name>; 1505 def _e64_dpp8_w32#Gen.Suffix 1506 : VOPC64_DPP8_Dst<{0, op}, ps64, asm_name> { 1507 let AsmString = asm_name # " vcc_lo, " # AsmDPP8; 1508 let isAsmParserOnly = 1; 1509 let WaveSizePredicate = isWave32; 1510 } 1511 def _e64_dpp8_w64#Gen.Suffix 1512 : VOPC64_DPP8_Dst<{0, op}, ps64, asm_name> { 1513 let AsmString = asm_name # " vcc, " # AsmDPP8; 1514 let isAsmParserOnly = 1; 1515 let WaveSizePredicate = isWave64; 1516 } 1517 } 1518 } 1519 } // AssemblerPredicate = Gen.AssemblerPredicate 1520} 1521 1522multiclass VOPC_Real_t16<GFXGen Gen, bits<9> op, string asm_name, 1523 string OpName = NAME, string pseudo_mnemonic = ""> : 1524 VOPC_Real_with_name<Gen, op, OpName, asm_name, pseudo_mnemonic>; 1525 1526multiclass VOPCX_Real<GFXGen Gen, bits<9> op> { 1527 let AssemblerPredicate = Gen.AssemblerPredicate in { 1528 defvar ps32 = !cast<VOPC_Pseudo>(NAME#"_nosdst_e32"); 1529 defvar ps64 = !cast<VOP3_Pseudo>(NAME#"_nosdst_e64"); 1530 let DecoderNamespace = Gen.DecoderNamespace in { 1531 def _e32#Gen.Suffix : 1532 VOPC_Real<ps32, Gen.Subtarget>, 1533 VOPCe<op{7-0}> { 1534 let AsmString = !subst("_nosdst", "", ps32.PseudoInstr) 1535 # " " # ps32.AsmOperands; 1536 } 1537 def _e64#Gen.Suffix : 1538 VOP3_Real<ps64, Gen.Subtarget>, 1539 VOP3a_gfx11_gfx12<{0, op}, ps64.Pfl> { 1540 let Inst{7-0} = ?; // sdst 1541 let AsmString = !subst("_nosdst", "", ps64.Mnemonic) 1542 # "{_e64} " # ps64.AsmOperands; 1543 } 1544 } // End DecoderNamespace = Gen.DecoderNamespace 1545 1546 defm : VOPCXInstAliases<NAME, !substr(Gen.Suffix, 1)>; 1547 1548 if ps32.Pfl.HasExtDPP then { 1549 defvar psDPP = !cast<VOP_DPP_Pseudo>(NAME #"_nosdst_e32" #"_dpp"); 1550 defvar AsmDPP = ps32.Pfl.AsmDPP16; 1551 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1552 def _e32_dpp#Gen.Suffix 1553 : VOPC_DPP16_SIMC<op{7-0}, psDPP, Gen.Subtarget> { 1554 let AsmString = !subst("_nosdst", "", psDPP.OpName) # " " # AsmDPP; 1555 } 1556 } 1557 defvar AsmDPP8 = ps32.Pfl.AsmDPP8; 1558 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1559 def _e32_dpp8#Gen.Suffix : VOPC_DPP8<op{7-0}, ps32> { 1560 let AsmString = !subst("_nosdst", "", ps32.OpName) # " " # AsmDPP8; 1561 } 1562 } 1563 } 1564 1565 if ps64.Pfl.HasExtVOP3DPP then { 1566 defvar psDPP = !cast<VOP_DPP_Pseudo>(NAME #"_nosdst_e64" #"_dpp"); 1567 defvar AsmDPP = ps64.Pfl.AsmVOP3DPP16; 1568 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1569 def _e64_dpp#Gen.Suffix 1570 : VOPC64_DPP16_NoDst<{0, op}, psDPP>, 1571 SIMCInstr<psDPP.PseudoInstr, Gen.Subtarget> { 1572 let AsmString = !subst("_nosdst", "", psDPP.OpName) 1573 # "{_e64_dpp} " # AsmDPP; 1574 } 1575 } 1576 defvar AsmDPP8 = ps64.Pfl.AsmVOP3DPP8; 1577 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1578 def _e64_dpp8#Gen.Suffix : VOPC64_DPP8_NoDst<{0, op}, ps64> { 1579 let AsmString = !subst("_nosdst", "", ps64.OpName) 1580 # "{_e64_dpp} " # AsmDPP8; 1581 } 1582 } 1583 } 1584 } // AssemblerPredicate = Gen.AssemblerPredicate 1585} 1586 1587multiclass VOPCX_Real_with_name<GFXGen Gen, bits<9> op, string OpName, 1588 string asm_name, string pseudo_mnemonic = ""> { 1589 let AssemblerPredicate = Gen.AssemblerPredicate in { 1590 defvar ps32 = !cast<VOPC_Pseudo>(OpName#"_nosdst_e32"); 1591 defvar ps64 = !cast<VOP3_Pseudo>(OpName#"_nosdst_e64"); 1592 let DecoderNamespace = Gen.DecoderNamespace in { 1593 def _e32#Gen.Suffix 1594 : VOPC_Real<ps32, Gen.Subtarget, asm_name>, 1595 MnemonicAlias<!if(!empty(pseudo_mnemonic), !subst("_nosdst", "", ps32.Mnemonic), 1596 pseudo_mnemonic), 1597 asm_name, ps32.AsmVariantName>, 1598 Requires<[Gen.AssemblerPredicate]>, 1599 VOPCe<op{7-0}> { 1600 let AsmString = asm_name # "{_e32} " # ps32.AsmOperands; 1601 } 1602 def _e64#Gen.Suffix 1603 : VOP3_Real<ps64, Gen.Subtarget, asm_name>, 1604 MnemonicAlias<!if(!empty(pseudo_mnemonic), !subst("_nosdst", "", ps64.Mnemonic), 1605 pseudo_mnemonic), 1606 asm_name, ps64.AsmVariantName>, 1607 Requires<[Gen.AssemblerPredicate]>, 1608 VOP3a_gfx11_gfx12<{0, op}, ps64.Pfl> { 1609 let Inst{7-0} = ? ; // sdst 1610 let AsmString = asm_name # "{_e64} " # ps64.AsmOperands; 1611 } 1612 } // End DecoderNamespace = Gen.DecoderNamespace 1613 1614 defm : VOPCXInstAliases<OpName, !substr(Gen.Suffix, 1), NAME, asm_name>; 1615 1616 if ps32.Pfl.HasExtDPP then { 1617 defvar psDPP = !cast<VOP_DPP_Pseudo>(OpName#"_nosdst_e32"#"_dpp"); 1618 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1619 def _e32_dpp#Gen.Suffix : VOPC_DPP16_SIMC<op{7-0}, psDPP, 1620 Gen.Subtarget, asm_name>; 1621 } 1622 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1623 def _e32_dpp8#Gen.Suffix : VOPC_DPP8<op{7-0}, ps32, asm_name>; 1624 } 1625 } 1626 if ps64.Pfl.HasExtVOP3DPP then { 1627 defvar psDPP = !cast<VOP_DPP_Pseudo>(OpName#"_nosdst_e64"#"_dpp"); 1628 defvar AsmDPP = ps64.Pfl.AsmVOP3DPP16; 1629 let DecoderNamespace = "DPP"#Gen.DecoderNamespace in { 1630 def _e64_dpp#Gen.Suffix 1631 : VOPC64_DPP16_NoDst<{0, op}, psDPP, asm_name>, 1632 SIMCInstr<psDPP.PseudoInstr, Gen.Subtarget> { 1633 let AsmString = asm_name # "{_e64_dpp} " # AsmDPP; 1634 } 1635 } 1636 defvar AsmDPP8 = ps64.Pfl.AsmVOP3DPP8; 1637 let DecoderNamespace = "DPP8"#Gen.DecoderNamespace in { 1638 def _e64_dpp8#Gen.Suffix : VOPC64_DPP8_NoDst<{0, op}, ps64, asm_name> { 1639 let AsmString = asm_name # "{_e64_dpp} " # AsmDPP8; 1640 } 1641 } 1642 } 1643 } // AssemblerPredicate = Gen.AssemblerPredicate 1644} 1645 1646multiclass VOPCX_Real_t16<GFXGen Gen, bits<9> op, string asm_name, 1647 string OpName = NAME, string pseudo_mnemonic = ""> : 1648 VOPCX_Real_with_name<Gen, op, OpName, asm_name, pseudo_mnemonic>; 1649 1650multiclass VOPC_Real_gfx11<bits<9> op> : VOPC_Real_Base<GFX11Gen, op>; 1651 1652multiclass VOPC_Real_with_name_gfx11<bits<9> op, string OpName, string asm_name, 1653 string pseudo_mnemonic = ""> 1654 : VOPC_Real_with_name<GFX11Gen, op, OpName, asm_name, pseudo_mnemonic>; 1655 1656multiclass VOPCX_Real_gfx11<bits<9> op> : VOPCX_Real<GFX11Gen, op>; 1657 1658multiclass VOPCX_Real_with_name_gfx11<bits<9> op, string OpName, 1659 string asm_name, string pseudo_mnemonic = ""> : 1660 VOPCX_Real_with_name<GFX11Gen, op, OpName, asm_name, pseudo_mnemonic>; 1661 1662multiclass VOPC_Real_gfx11_gfx12<bits<9> op> : 1663 VOPC_Real_Base<GFX11Gen, op>, VOPC_Real_Base<GFX12Gen, op>; 1664 1665multiclass VOPCX_Real_gfx11_gfx12<bits<9> op> : 1666 VOPCX_Real<GFX11Gen, op>, VOPCX_Real<GFX12Gen, op>; 1667 1668multiclass VOPC_Real_t16_gfx11<bits <9> op, string asm_name, 1669 string OpName = NAME, string pseudo_mnemonic = ""> : 1670 VOPC_Real_t16<GFX11Gen, op, asm_name, OpName, pseudo_mnemonic>; 1671 1672multiclass VOPC_Real_t16_gfx11_gfx12<bits <9> op, string asm_name, 1673 string OpName = NAME, string pseudo_mnemonic = ""> : 1674 VOPC_Real_t16<GFX11Gen, op, asm_name, OpName, pseudo_mnemonic>, 1675 VOPC_Real_t16<GFX12Gen, op, asm_name, OpName, pseudo_mnemonic>; 1676 1677multiclass VOPCX_Real_t16_gfx11<bits<9> op, string asm_name, 1678 string OpName = NAME, string pseudo_mnemonic = ""> : 1679 VOPCX_Real_t16<GFX11Gen, op, asm_name, OpName, pseudo_mnemonic>; 1680 1681multiclass VOPCX_Real_t16_gfx11_gfx12<bits<9> op, string asm_name, 1682 string OpName = NAME, string pseudo_mnemonic = ""> : 1683 VOPCX_Real_t16<GFX11Gen, op, asm_name, OpName, pseudo_mnemonic>, 1684 VOPCX_Real_t16<GFX12Gen, op, asm_name, OpName, pseudo_mnemonic>; 1685 1686defm V_CMP_F_F16_t16 : VOPC_Real_t16_gfx11<0x000, "v_cmp_f_f16">; 1687defm V_CMP_LT_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x001, "v_cmp_lt_f16">; 1688defm V_CMP_EQ_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x002, "v_cmp_eq_f16">; 1689defm V_CMP_LE_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x003, "v_cmp_le_f16">; 1690defm V_CMP_GT_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x004, "v_cmp_gt_f16">; 1691defm V_CMP_LG_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x005, "v_cmp_lg_f16">; 1692defm V_CMP_GE_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x006, "v_cmp_ge_f16">; 1693defm V_CMP_O_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x007, "v_cmp_o_f16">; 1694defm V_CMP_U_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x008, "v_cmp_u_f16">; 1695defm V_CMP_NGE_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x009, "v_cmp_nge_f16">; 1696defm V_CMP_NLG_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x00a, "v_cmp_nlg_f16">; 1697defm V_CMP_NGT_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x00b, "v_cmp_ngt_f16">; 1698defm V_CMP_NLE_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x00c, "v_cmp_nle_f16">; 1699defm V_CMP_NEQ_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x00d, "v_cmp_neq_f16">; 1700defm V_CMP_NLT_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x00e, "v_cmp_nlt_f16">; 1701defm V_CMP_T_F16_t16 : VOPC_Real_with_name_gfx11<0x00f, "V_CMP_TRU_F16_t16", "v_cmp_t_f16", "v_cmp_tru_f16">; 1702defm V_CMP_F_F32 : VOPC_Real_gfx11<0x010>; 1703defm V_CMP_LT_F32 : VOPC_Real_gfx11_gfx12<0x011>; 1704defm V_CMP_EQ_F32 : VOPC_Real_gfx11_gfx12<0x012>; 1705defm V_CMP_LE_F32 : VOPC_Real_gfx11_gfx12<0x013>; 1706defm V_CMP_GT_F32 : VOPC_Real_gfx11_gfx12<0x014>; 1707defm V_CMP_LG_F32 : VOPC_Real_gfx11_gfx12<0x015>; 1708defm V_CMP_GE_F32 : VOPC_Real_gfx11_gfx12<0x016>; 1709defm V_CMP_O_F32 : VOPC_Real_gfx11_gfx12<0x017>; 1710defm V_CMP_U_F32 : VOPC_Real_gfx11_gfx12<0x018>; 1711defm V_CMP_NGE_F32 : VOPC_Real_gfx11_gfx12<0x019>; 1712defm V_CMP_NLG_F32 : VOPC_Real_gfx11_gfx12<0x01a>; 1713defm V_CMP_NGT_F32 : VOPC_Real_gfx11_gfx12<0x01b>; 1714defm V_CMP_NLE_F32 : VOPC_Real_gfx11_gfx12<0x01c>; 1715defm V_CMP_NEQ_F32 : VOPC_Real_gfx11_gfx12<0x01d>; 1716defm V_CMP_NLT_F32 : VOPC_Real_gfx11_gfx12<0x01e>; 1717defm V_CMP_T_F32 : VOPC_Real_with_name_gfx11<0x01f, "V_CMP_TRU_F32", "v_cmp_t_f32">; 1718defm V_CMP_T_F64 : VOPC_Real_with_name_gfx11<0x02f, "V_CMP_TRU_F64", "v_cmp_t_f64">; 1719defm V_CMP_LT_I16_t16 : VOPC_Real_t16_gfx11_gfx12<0x031, "v_cmp_lt_i16">; 1720defm V_CMP_EQ_I16_t16 : VOPC_Real_t16_gfx11_gfx12<0x032, "v_cmp_eq_i16">; 1721defm V_CMP_LE_I16_t16 : VOPC_Real_t16_gfx11_gfx12<0x033, "v_cmp_le_i16">; 1722defm V_CMP_GT_I16_t16 : VOPC_Real_t16_gfx11_gfx12<0x034, "v_cmp_gt_i16">; 1723defm V_CMP_NE_I16_t16 : VOPC_Real_t16_gfx11_gfx12<0x035, "v_cmp_ne_i16">; 1724defm V_CMP_GE_I16_t16 : VOPC_Real_t16_gfx11_gfx12<0x036, "v_cmp_ge_i16">; 1725defm V_CMP_LT_U16_t16 : VOPC_Real_t16_gfx11_gfx12<0x039, "v_cmp_lt_u16">; 1726defm V_CMP_EQ_U16_t16 : VOPC_Real_t16_gfx11_gfx12<0x03a, "v_cmp_eq_u16">; 1727defm V_CMP_LE_U16_t16 : VOPC_Real_t16_gfx11_gfx12<0x03b, "v_cmp_le_u16">; 1728defm V_CMP_GT_U16_t16 : VOPC_Real_t16_gfx11_gfx12<0x03c, "v_cmp_gt_u16">; 1729defm V_CMP_NE_U16_t16 : VOPC_Real_t16_gfx11_gfx12<0x03d, "v_cmp_ne_u16">; 1730defm V_CMP_GE_U16_t16 : VOPC_Real_t16_gfx11_gfx12<0x03e, "v_cmp_ge_u16">; 1731defm V_CMP_F_I32 : VOPC_Real_gfx11<0x040>; 1732defm V_CMP_LT_I32 : VOPC_Real_gfx11_gfx12<0x041>; 1733defm V_CMP_EQ_I32 : VOPC_Real_gfx11_gfx12<0x042>; 1734defm V_CMP_LE_I32 : VOPC_Real_gfx11_gfx12<0x043>; 1735defm V_CMP_GT_I32 : VOPC_Real_gfx11_gfx12<0x044>; 1736defm V_CMP_NE_I32 : VOPC_Real_gfx11_gfx12<0x045>; 1737defm V_CMP_GE_I32 : VOPC_Real_gfx11_gfx12<0x046>; 1738defm V_CMP_T_I32 : VOPC_Real_gfx11<0x047>; 1739defm V_CMP_F_U32 : VOPC_Real_gfx11<0x048>; 1740defm V_CMP_LT_U32 : VOPC_Real_gfx11_gfx12<0x049>; 1741defm V_CMP_EQ_U32 : VOPC_Real_gfx11_gfx12<0x04a>; 1742defm V_CMP_LE_U32 : VOPC_Real_gfx11_gfx12<0x04b>; 1743defm V_CMP_GT_U32 : VOPC_Real_gfx11_gfx12<0x04c>; 1744defm V_CMP_NE_U32 : VOPC_Real_gfx11_gfx12<0x04d>; 1745defm V_CMP_GE_U32 : VOPC_Real_gfx11_gfx12<0x04e>; 1746defm V_CMP_T_U32 : VOPC_Real_gfx11<0x04f>; 1747 1748defm V_CMP_F_I64 : VOPC_Real_gfx11<0x050>; 1749defm V_CMP_LT_I64 : VOPC_Real_gfx11_gfx12<0x051>; 1750defm V_CMP_EQ_I64 : VOPC_Real_gfx11_gfx12<0x052>; 1751defm V_CMP_LE_I64 : VOPC_Real_gfx11_gfx12<0x053>; 1752defm V_CMP_GT_I64 : VOPC_Real_gfx11_gfx12<0x054>; 1753defm V_CMP_NE_I64 : VOPC_Real_gfx11_gfx12<0x055>; 1754defm V_CMP_GE_I64 : VOPC_Real_gfx11_gfx12<0x056>; 1755defm V_CMP_T_I64 : VOPC_Real_gfx11<0x057>; 1756defm V_CMP_F_U64 : VOPC_Real_gfx11<0x058>; 1757defm V_CMP_LT_U64 : VOPC_Real_gfx11_gfx12<0x059>; 1758defm V_CMP_EQ_U64 : VOPC_Real_gfx11_gfx12<0x05a>; 1759defm V_CMP_LE_U64 : VOPC_Real_gfx11_gfx12<0x05b>; 1760defm V_CMP_GT_U64 : VOPC_Real_gfx11_gfx12<0x05c>; 1761defm V_CMP_NE_U64 : VOPC_Real_gfx11_gfx12<0x05d>; 1762defm V_CMP_GE_U64 : VOPC_Real_gfx11_gfx12<0x05e>; 1763defm V_CMP_T_U64 : VOPC_Real_gfx11<0x05f>; 1764 1765defm V_CMP_CLASS_F16_t16 : VOPC_Real_t16_gfx11_gfx12<0x07d, "v_cmp_class_f16">; 1766defm V_CMP_CLASS_F32 : VOPC_Real_gfx11_gfx12<0x07e>; 1767defm V_CMP_CLASS_F64 : VOPC_Real_gfx11_gfx12<0x07f>; 1768 1769defm V_CMPX_F_F16_t16 : VOPCX_Real_t16_gfx11<0x080, "v_cmpx_f_f16">; 1770defm V_CMPX_LT_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x081, "v_cmpx_lt_f16">; 1771defm V_CMPX_EQ_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x082, "v_cmpx_eq_f16">; 1772defm V_CMPX_LE_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x083, "v_cmpx_le_f16">; 1773defm V_CMPX_GT_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x084, "v_cmpx_gt_f16">; 1774defm V_CMPX_LG_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x085, "v_cmpx_lg_f16">; 1775defm V_CMPX_GE_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x086, "v_cmpx_ge_f16">; 1776defm V_CMPX_O_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x087, "v_cmpx_o_f16">; 1777defm V_CMPX_U_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x088, "v_cmpx_u_f16">; 1778defm V_CMPX_NGE_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x089, "v_cmpx_nge_f16">; 1779defm V_CMPX_NLG_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x08a, "v_cmpx_nlg_f16">; 1780defm V_CMPX_NGT_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x08b, "v_cmpx_ngt_f16">; 1781defm V_CMPX_NLE_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x08c, "v_cmpx_nle_f16">; 1782defm V_CMPX_NEQ_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x08d, "v_cmpx_neq_f16">; 1783defm V_CMPX_NLT_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x08e, "v_cmpx_nlt_f16">; 1784defm V_CMPX_T_F16_t16 : VOPCX_Real_with_name_gfx11<0x08f, "V_CMPX_TRU_F16_t16", "v_cmpx_t_f16", "v_cmpx_tru_f16">; 1785defm V_CMPX_F_F32 : VOPCX_Real_gfx11<0x090>; 1786defm V_CMPX_LT_F32 : VOPCX_Real_gfx11_gfx12<0x091>; 1787defm V_CMPX_EQ_F32 : VOPCX_Real_gfx11_gfx12<0x092>; 1788defm V_CMPX_LE_F32 : VOPCX_Real_gfx11_gfx12<0x093>; 1789defm V_CMPX_GT_F32 : VOPCX_Real_gfx11_gfx12<0x094>; 1790defm V_CMPX_LG_F32 : VOPCX_Real_gfx11_gfx12<0x095>; 1791defm V_CMPX_GE_F32 : VOPCX_Real_gfx11_gfx12<0x096>; 1792defm V_CMPX_O_F32 : VOPCX_Real_gfx11_gfx12<0x097>; 1793defm V_CMPX_U_F32 : VOPCX_Real_gfx11_gfx12<0x098>; 1794defm V_CMPX_NGE_F32 : VOPCX_Real_gfx11_gfx12<0x099>; 1795defm V_CMPX_NLG_F32 : VOPCX_Real_gfx11_gfx12<0x09a>; 1796defm V_CMPX_NGT_F32 : VOPCX_Real_gfx11_gfx12<0x09b>; 1797defm V_CMPX_NLE_F32 : VOPCX_Real_gfx11_gfx12<0x09c>; 1798defm V_CMPX_NEQ_F32 : VOPCX_Real_gfx11_gfx12<0x09d>; 1799defm V_CMPX_NLT_F32 : VOPCX_Real_gfx11_gfx12<0x09e>; 1800defm V_CMPX_T_F32 : VOPCX_Real_with_name_gfx11<0x09f, "V_CMPX_TRU_F32", "v_cmpx_t_f32">; 1801 1802defm V_CMPX_F_F64 : VOPCX_Real_gfx11<0x0a0>; 1803defm V_CMPX_LT_F64 : VOPCX_Real_gfx11_gfx12<0x0a1>; 1804defm V_CMPX_EQ_F64 : VOPCX_Real_gfx11_gfx12<0x0a2>; 1805defm V_CMPX_LE_F64 : VOPCX_Real_gfx11_gfx12<0x0a3>; 1806defm V_CMPX_GT_F64 : VOPCX_Real_gfx11_gfx12<0x0a4>; 1807defm V_CMPX_LG_F64 : VOPCX_Real_gfx11_gfx12<0x0a5>; 1808defm V_CMPX_GE_F64 : VOPCX_Real_gfx11_gfx12<0x0a6>; 1809defm V_CMPX_O_F64 : VOPCX_Real_gfx11_gfx12<0x0a7>; 1810defm V_CMPX_U_F64 : VOPCX_Real_gfx11_gfx12<0x0a8>; 1811defm V_CMPX_NGE_F64 : VOPCX_Real_gfx11_gfx12<0x0a9>; 1812defm V_CMPX_NLG_F64 : VOPCX_Real_gfx11_gfx12<0x0aa>; 1813defm V_CMPX_NGT_F64 : VOPCX_Real_gfx11_gfx12<0x0ab>; 1814defm V_CMPX_NLE_F64 : VOPCX_Real_gfx11_gfx12<0x0ac>; 1815defm V_CMPX_NEQ_F64 : VOPCX_Real_gfx11_gfx12<0x0ad>; 1816defm V_CMPX_NLT_F64 : VOPCX_Real_gfx11_gfx12<0x0ae>; 1817defm V_CMPX_T_F64 : VOPCX_Real_with_name_gfx11<0x0af, "V_CMPX_TRU_F64", "v_cmpx_t_f64">; 1818 1819defm V_CMPX_LT_I16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b1, "v_cmpx_lt_i16">; 1820defm V_CMPX_EQ_I16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b2, "v_cmpx_eq_i16">; 1821defm V_CMPX_LE_I16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b3, "v_cmpx_le_i16">; 1822defm V_CMPX_GT_I16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b4, "v_cmpx_gt_i16">; 1823defm V_CMPX_NE_I16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b5, "v_cmpx_ne_i16">; 1824defm V_CMPX_GE_I16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b6, "v_cmpx_ge_i16">; 1825defm V_CMPX_LT_U16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0b9, "v_cmpx_lt_u16">; 1826defm V_CMPX_EQ_U16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0ba, "v_cmpx_eq_u16">; 1827defm V_CMPX_LE_U16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0bb, "v_cmpx_le_u16">; 1828defm V_CMPX_GT_U16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0bc, "v_cmpx_gt_u16">; 1829defm V_CMPX_NE_U16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0bd, "v_cmpx_ne_u16">; 1830defm V_CMPX_GE_U16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0be, "v_cmpx_ge_u16">; 1831defm V_CMPX_F_I32 : VOPCX_Real_gfx11<0x0c0>; 1832defm V_CMPX_LT_I32 : VOPCX_Real_gfx11_gfx12<0x0c1>; 1833defm V_CMPX_EQ_I32 : VOPCX_Real_gfx11_gfx12<0x0c2>; 1834defm V_CMPX_LE_I32 : VOPCX_Real_gfx11_gfx12<0x0c3>; 1835defm V_CMPX_GT_I32 : VOPCX_Real_gfx11_gfx12<0x0c4>; 1836defm V_CMPX_NE_I32 : VOPCX_Real_gfx11_gfx12<0x0c5>; 1837defm V_CMPX_GE_I32 : VOPCX_Real_gfx11_gfx12<0x0c6>; 1838defm V_CMPX_T_I32 : VOPCX_Real_gfx11<0x0c7>; 1839defm V_CMPX_F_U32 : VOPCX_Real_gfx11<0x0c8>; 1840defm V_CMPX_LT_U32 : VOPCX_Real_gfx11_gfx12<0x0c9>; 1841defm V_CMPX_EQ_U32 : VOPCX_Real_gfx11_gfx12<0x0ca>; 1842defm V_CMPX_LE_U32 : VOPCX_Real_gfx11_gfx12<0x0cb>; 1843defm V_CMPX_GT_U32 : VOPCX_Real_gfx11_gfx12<0x0cc>; 1844defm V_CMPX_NE_U32 : VOPCX_Real_gfx11_gfx12<0x0cd>; 1845defm V_CMPX_GE_U32 : VOPCX_Real_gfx11_gfx12<0x0ce>; 1846defm V_CMPX_T_U32 : VOPCX_Real_gfx11<0x0cf>; 1847 1848defm V_CMPX_F_I64 : VOPCX_Real_gfx11<0x0d0>; 1849defm V_CMPX_LT_I64 : VOPCX_Real_gfx11_gfx12<0x0d1>; 1850defm V_CMPX_EQ_I64 : VOPCX_Real_gfx11_gfx12<0x0d2>; 1851defm V_CMPX_LE_I64 : VOPCX_Real_gfx11_gfx12<0x0d3>; 1852defm V_CMPX_GT_I64 : VOPCX_Real_gfx11_gfx12<0x0d4>; 1853defm V_CMPX_NE_I64 : VOPCX_Real_gfx11_gfx12<0x0d5>; 1854defm V_CMPX_GE_I64 : VOPCX_Real_gfx11_gfx12<0x0d6>; 1855defm V_CMPX_T_I64 : VOPCX_Real_gfx11<0x0d7>; 1856defm V_CMPX_F_U64 : VOPCX_Real_gfx11<0x0d8>; 1857defm V_CMPX_LT_U64 : VOPCX_Real_gfx11_gfx12<0x0d9>; 1858defm V_CMPX_EQ_U64 : VOPCX_Real_gfx11_gfx12<0x0da>; 1859defm V_CMPX_LE_U64 : VOPCX_Real_gfx11_gfx12<0x0db>; 1860defm V_CMPX_GT_U64 : VOPCX_Real_gfx11_gfx12<0x0dc>; 1861defm V_CMPX_NE_U64 : VOPCX_Real_gfx11_gfx12<0x0dd>; 1862defm V_CMPX_GE_U64 : VOPCX_Real_gfx11_gfx12<0x0de>; 1863defm V_CMPX_T_U64 : VOPCX_Real_gfx11<0x0df>; 1864defm V_CMPX_CLASS_F16_t16 : VOPCX_Real_t16_gfx11_gfx12<0x0fd, "v_cmpx_class_f16">; 1865defm V_CMPX_CLASS_F32 : VOPCX_Real_gfx11_gfx12<0x0fe>; 1866defm V_CMPX_CLASS_F64 : VOPCX_Real_gfx11_gfx12<0x0ff>; 1867 1868//===----------------------------------------------------------------------===// 1869// GFX10. 1870//===----------------------------------------------------------------------===// 1871 1872let AssemblerPredicate = isGFX10Only in { 1873 multiclass VOPC_Real_gfx10<bits<9> op> { 1874 let DecoderNamespace = "GFX10" in { 1875 def _e32_gfx10 : 1876 VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.GFX10>, 1877 VOPCe<op{7-0}>; 1878 def _e64_gfx10 : 1879 VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.GFX10>, 1880 VOP3a_gfx10<{0, op}, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> { 1881 // Encoding used for VOPC instructions encoded as VOP3 differs from 1882 // VOP3e by destination name (sdst) as VOPC doesn't have vector dst. 1883 bits<8> sdst; 1884 let Inst{7-0} = sdst; 1885 } 1886 } // End DecoderNamespace = "GFX10" 1887 1888 if !cast<VOPC_Pseudo>(NAME#"_e32").Pfl.HasExtSDWA9 then 1889 def _sdwa_gfx10 : 1890 VOP_SDWA10_Real<!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>, 1891 VOPC_SDWA9e<op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>; 1892 1893 defm : VOPCInstAliases<NAME, "gfx10">; 1894 } 1895 1896 multiclass VOPCX_Real_gfx10<bits<9> op> { 1897 let DecoderNamespace = "GFX10" in { 1898 def _e32_gfx10 : 1899 VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_nosdst_e32"), SIEncodingFamily.GFX10>, 1900 VOPCe<op{7-0}> { 1901 let AsmString = !subst("_nosdst", "", !cast<VOPC_Pseudo>(NAME#"_nosdst_e32").PseudoInstr) 1902 # " " # !cast<VOPC_Pseudo>(NAME#"_nosdst_e32").AsmOperands; 1903 } 1904 1905 def _e64_gfx10 : 1906 VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_nosdst_e64"), SIEncodingFamily.GFX10>, 1907 VOP3a_gfx10<{0, op}, !cast<VOP3_Pseudo>(NAME#"_nosdst_e64").Pfl> { 1908 let Inst{7-0} = ?; // sdst 1909 let AsmString = !subst("_nosdst", "", !cast<VOP3_Pseudo>(NAME#"_nosdst_e64").Mnemonic) 1910 # "{_e64} " # !cast<VOP3_Pseudo>(NAME#"_nosdst_e64").AsmOperands; 1911 } 1912 } // End DecoderNamespace = "GFX10" 1913 1914 if !cast<VOPC_Pseudo>(NAME#"_nosdst_e32").Pfl.HasExtSDWA9 then 1915 def _sdwa_gfx10 : 1916 VOP_SDWA10_Real<!cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa")>, 1917 VOPC_SDWA9e<op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa").Pfl> { 1918 let AsmString = !subst("_nosdst", "", !cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa").Mnemonic) 1919 # "{_sdwa} " # !cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa").AsmOperands9; 1920 } 1921 1922 defm : VOPCXInstAliases<NAME, "gfx10">; 1923 } 1924} // End AssemblerPredicate = isGFX10Only 1925 1926defm V_CMP_LT_I16 : VOPC_Real_gfx10<0x089>; 1927defm V_CMP_EQ_I16 : VOPC_Real_gfx10<0x08a>; 1928defm V_CMP_LE_I16 : VOPC_Real_gfx10<0x08b>; 1929defm V_CMP_GT_I16 : VOPC_Real_gfx10<0x08c>; 1930defm V_CMP_NE_I16 : VOPC_Real_gfx10<0x08d>; 1931defm V_CMP_GE_I16 : VOPC_Real_gfx10<0x08e>; 1932defm V_CMP_CLASS_F16 : VOPC_Real_gfx10<0x08f>; 1933defm V_CMPX_LT_I16 : VOPCX_Real_gfx10<0x099>; 1934defm V_CMPX_EQ_I16 : VOPCX_Real_gfx10<0x09a>; 1935defm V_CMPX_LE_I16 : VOPCX_Real_gfx10<0x09b>; 1936defm V_CMPX_GT_I16 : VOPCX_Real_gfx10<0x09c>; 1937defm V_CMPX_NE_I16 : VOPCX_Real_gfx10<0x09d>; 1938defm V_CMPX_GE_I16 : VOPCX_Real_gfx10<0x09e>; 1939defm V_CMPX_CLASS_F16 : VOPCX_Real_gfx10<0x09f>; 1940defm V_CMP_LT_U16 : VOPC_Real_gfx10<0x0a9>; 1941defm V_CMP_EQ_U16 : VOPC_Real_gfx10<0x0aa>; 1942defm V_CMP_LE_U16 : VOPC_Real_gfx10<0x0ab>; 1943defm V_CMP_GT_U16 : VOPC_Real_gfx10<0x0ac>; 1944defm V_CMP_NE_U16 : VOPC_Real_gfx10<0x0ad>; 1945defm V_CMP_GE_U16 : VOPC_Real_gfx10<0x0ae>; 1946defm V_CMPX_LT_U16 : VOPCX_Real_gfx10<0x0b9>; 1947defm V_CMPX_EQ_U16 : VOPCX_Real_gfx10<0x0ba>; 1948defm V_CMPX_LE_U16 : VOPCX_Real_gfx10<0x0bb>; 1949defm V_CMPX_GT_U16 : VOPCX_Real_gfx10<0x0bc>; 1950defm V_CMPX_NE_U16 : VOPCX_Real_gfx10<0x0bd>; 1951defm V_CMPX_GE_U16 : VOPCX_Real_gfx10<0x0be>; 1952defm V_CMP_F_F16 : VOPC_Real_gfx10<0x0c8>; 1953defm V_CMP_LT_F16 : VOPC_Real_gfx10<0x0c9>; 1954defm V_CMP_EQ_F16 : VOPC_Real_gfx10<0x0ca>; 1955defm V_CMP_LE_F16 : VOPC_Real_gfx10<0x0cb>; 1956defm V_CMP_GT_F16 : VOPC_Real_gfx10<0x0cc>; 1957defm V_CMP_LG_F16 : VOPC_Real_gfx10<0x0cd>; 1958defm V_CMP_GE_F16 : VOPC_Real_gfx10<0x0ce>; 1959defm V_CMP_O_F16 : VOPC_Real_gfx10<0x0cf>; 1960defm V_CMPX_F_F16 : VOPCX_Real_gfx10<0x0d8>; 1961defm V_CMPX_LT_F16 : VOPCX_Real_gfx10<0x0d9>; 1962defm V_CMPX_EQ_F16 : VOPCX_Real_gfx10<0x0da>; 1963defm V_CMPX_LE_F16 : VOPCX_Real_gfx10<0x0db>; 1964defm V_CMPX_GT_F16 : VOPCX_Real_gfx10<0x0dc>; 1965defm V_CMPX_LG_F16 : VOPCX_Real_gfx10<0x0dd>; 1966defm V_CMPX_GE_F16 : VOPCX_Real_gfx10<0x0de>; 1967defm V_CMPX_O_F16 : VOPCX_Real_gfx10<0x0df>; 1968defm V_CMP_U_F16 : VOPC_Real_gfx10<0x0e8>; 1969defm V_CMP_NGE_F16 : VOPC_Real_gfx10<0x0e9>; 1970defm V_CMP_NLG_F16 : VOPC_Real_gfx10<0x0ea>; 1971defm V_CMP_NGT_F16 : VOPC_Real_gfx10<0x0eb>; 1972defm V_CMP_NLE_F16 : VOPC_Real_gfx10<0x0ec>; 1973defm V_CMP_NEQ_F16 : VOPC_Real_gfx10<0x0ed>; 1974defm V_CMP_NLT_F16 : VOPC_Real_gfx10<0x0ee>; 1975defm V_CMP_TRU_F16 : VOPC_Real_gfx10<0x0ef>; 1976defm V_CMPX_U_F16 : VOPCX_Real_gfx10<0x0f8>; 1977defm V_CMPX_NGE_F16 : VOPCX_Real_gfx10<0x0f9>; 1978defm V_CMPX_NLG_F16 : VOPCX_Real_gfx10<0x0fa>; 1979defm V_CMPX_NGT_F16 : VOPCX_Real_gfx10<0x0fb>; 1980defm V_CMPX_NLE_F16 : VOPCX_Real_gfx10<0x0fc>; 1981defm V_CMPX_NEQ_F16 : VOPCX_Real_gfx10<0x0fd>; 1982defm V_CMPX_NLT_F16 : VOPCX_Real_gfx10<0x0fe>; 1983defm V_CMPX_TRU_F16 : VOPCX_Real_gfx10<0x0ff>; 1984 1985//===----------------------------------------------------------------------===// 1986// GFX6, GFX7, GFX10. 1987//===----------------------------------------------------------------------===// 1988 1989let AssemblerPredicate = isGFX6GFX7 in { 1990 multiclass VOPC_Real_gfx6_gfx7<bits<9> op> { 1991 let DecoderNamespace = "GFX6GFX7" in { 1992 def _e32_gfx6_gfx7 : 1993 VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.SI>, 1994 VOPCe<op{7-0}>; 1995 def _e64_gfx6_gfx7 : 1996 VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.SI>, 1997 VOP3a_gfx6_gfx7<op, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> { 1998 // Encoding used for VOPC instructions encoded as VOP3 differs from 1999 // VOP3e by destination name (sdst) as VOPC doesn't have vector dst. 2000 bits<8> sdst; 2001 let Inst{7-0} = sdst; 2002 } 2003 } // End DecoderNamespace = "GFX6GFX7" 2004 2005 defm : VOPCInstAliases<NAME, "gfx6_gfx7">; 2006 } 2007} // End AssemblerPredicate = isGFX6GFX7 2008 2009multiclass VOPC_Real_gfx6_gfx7_gfx10<bits<9> op> : 2010 VOPC_Real_gfx6_gfx7<op>, VOPC_Real_gfx10<op>; 2011 2012multiclass VOPCX_Real_gfx6_gfx7<bits<9> op> : 2013 VOPC_Real_gfx6_gfx7<op>; 2014 2015multiclass VOPCX_Real_gfx6_gfx7_gfx10 <bits<9> op> : 2016 VOPC_Real_gfx6_gfx7<op>, VOPCX_Real_gfx10<op>; 2017 2018multiclass VOPC_Real_gfx6_gfx7_gfx10_gfx11<bits<9> op> : 2019 VOPC_Real_gfx6_gfx7_gfx10<op>, VOPC_Real_Base<GFX11Gen, op>; 2020 2021multiclass VOPCX_Real_gfx6_gfx7_gfx10_gfx11<bits<9> op> : 2022 VOPCX_Real_gfx6_gfx7_gfx10<op>, VOPCX_Real<GFX11Gen, op>; 2023 2024multiclass VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<bits<9> op> : 2025 VOPC_Real_gfx6_gfx7_gfx10_gfx11<op>, VOPC_Real_Base<GFX12Gen, op>; 2026 2027defm V_CMP_F_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x000>; 2028defm V_CMP_LT_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x001>; 2029defm V_CMP_EQ_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x002>; 2030defm V_CMP_LE_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x003>; 2031defm V_CMP_GT_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x004>; 2032defm V_CMP_LG_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x005>; 2033defm V_CMP_GE_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x006>; 2034defm V_CMP_O_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x007>; 2035defm V_CMP_U_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x008>; 2036defm V_CMP_NGE_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x009>; 2037defm V_CMP_NLG_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x00a>; 2038defm V_CMP_NGT_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x00b>; 2039defm V_CMP_NLE_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x00c>; 2040defm V_CMP_NEQ_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x00d>; 2041defm V_CMP_NLT_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x00e>; 2042defm V_CMP_TRU_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x00f>; 2043defm V_CMPX_F_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x010>; 2044defm V_CMPX_LT_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x011>; 2045defm V_CMPX_EQ_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x012>; 2046defm V_CMPX_LE_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x013>; 2047defm V_CMPX_GT_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x014>; 2048defm V_CMPX_LG_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x015>; 2049defm V_CMPX_GE_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x016>; 2050defm V_CMPX_O_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x017>; 2051defm V_CMPX_U_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x018>; 2052defm V_CMPX_NGE_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x019>; 2053defm V_CMPX_NLG_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x01a>; 2054defm V_CMPX_NGT_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x01b>; 2055defm V_CMPX_NLE_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x01c>; 2056defm V_CMPX_NEQ_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x01d>; 2057defm V_CMPX_NLT_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x01e>; 2058defm V_CMPX_TRU_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x01f>; 2059defm V_CMP_F_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11<0x020>; 2060defm V_CMP_LT_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x021>; 2061defm V_CMP_EQ_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x022>; 2062defm V_CMP_LE_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x023>; 2063defm V_CMP_GT_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x024>; 2064defm V_CMP_LG_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x025>; 2065defm V_CMP_GE_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x026>; 2066defm V_CMP_O_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x027>; 2067defm V_CMP_U_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x028>; 2068defm V_CMP_NGE_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x029>; 2069defm V_CMP_NLG_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x02a>; 2070defm V_CMP_NGT_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x02b>; 2071defm V_CMP_NLE_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x02c>; 2072defm V_CMP_NEQ_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x02d>; 2073defm V_CMP_NLT_F64 : VOPC_Real_gfx6_gfx7_gfx10_gfx11_gfx12<0x02e>; 2074defm V_CMP_TRU_F64 : VOPC_Real_gfx6_gfx7_gfx10<0x02f>; 2075defm V_CMPX_F_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x030>; 2076defm V_CMPX_LT_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x031>; 2077defm V_CMPX_EQ_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x032>; 2078defm V_CMPX_LE_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x033>; 2079defm V_CMPX_GT_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x034>; 2080defm V_CMPX_LG_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x035>; 2081defm V_CMPX_GE_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x036>; 2082defm V_CMPX_O_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x037>; 2083defm V_CMPX_U_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x038>; 2084defm V_CMPX_NGE_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x039>; 2085defm V_CMPX_NLG_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x03a>; 2086defm V_CMPX_NGT_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x03b>; 2087defm V_CMPX_NLE_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x03c>; 2088defm V_CMPX_NEQ_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x03d>; 2089defm V_CMPX_NLT_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x03e>; 2090defm V_CMPX_TRU_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x03f>; 2091defm V_CMPS_F_F32 : VOPC_Real_gfx6_gfx7<0x040>; 2092defm V_CMPS_LT_F32 : VOPC_Real_gfx6_gfx7<0x041>; 2093defm V_CMPS_EQ_F32 : VOPC_Real_gfx6_gfx7<0x042>; 2094defm V_CMPS_LE_F32 : VOPC_Real_gfx6_gfx7<0x043>; 2095defm V_CMPS_GT_F32 : VOPC_Real_gfx6_gfx7<0x044>; 2096defm V_CMPS_LG_F32 : VOPC_Real_gfx6_gfx7<0x045>; 2097defm V_CMPS_GE_F32 : VOPC_Real_gfx6_gfx7<0x046>; 2098defm V_CMPS_O_F32 : VOPC_Real_gfx6_gfx7<0x047>; 2099defm V_CMPS_U_F32 : VOPC_Real_gfx6_gfx7<0x048>; 2100defm V_CMPS_NGE_F32 : VOPC_Real_gfx6_gfx7<0x049>; 2101defm V_CMPS_NLG_F32 : VOPC_Real_gfx6_gfx7<0x04a>; 2102defm V_CMPS_NGT_F32 : VOPC_Real_gfx6_gfx7<0x04b>; 2103defm V_CMPS_NLE_F32 : VOPC_Real_gfx6_gfx7<0x04c>; 2104defm V_CMPS_NEQ_F32 : VOPC_Real_gfx6_gfx7<0x04d>; 2105defm V_CMPS_NLT_F32 : VOPC_Real_gfx6_gfx7<0x04e>; 2106defm V_CMPS_TRU_F32 : VOPC_Real_gfx6_gfx7<0x04f>; 2107defm V_CMPSX_F_F32 : VOPCX_Real_gfx6_gfx7<0x050>; 2108defm V_CMPSX_LT_F32 : VOPCX_Real_gfx6_gfx7<0x051>; 2109defm V_CMPSX_EQ_F32 : VOPCX_Real_gfx6_gfx7<0x052>; 2110defm V_CMPSX_LE_F32 : VOPCX_Real_gfx6_gfx7<0x053>; 2111defm V_CMPSX_GT_F32 : VOPCX_Real_gfx6_gfx7<0x054>; 2112defm V_CMPSX_LG_F32 : VOPCX_Real_gfx6_gfx7<0x055>; 2113defm V_CMPSX_GE_F32 : VOPCX_Real_gfx6_gfx7<0x056>; 2114defm V_CMPSX_O_F32 : VOPCX_Real_gfx6_gfx7<0x057>; 2115defm V_CMPSX_U_F32 : VOPCX_Real_gfx6_gfx7<0x058>; 2116defm V_CMPSX_NGE_F32 : VOPCX_Real_gfx6_gfx7<0x059>; 2117defm V_CMPSX_NLG_F32 : VOPCX_Real_gfx6_gfx7<0x05a>; 2118defm V_CMPSX_NGT_F32 : VOPCX_Real_gfx6_gfx7<0x05b>; 2119defm V_CMPSX_NLE_F32 : VOPCX_Real_gfx6_gfx7<0x05c>; 2120defm V_CMPSX_NEQ_F32 : VOPCX_Real_gfx6_gfx7<0x05d>; 2121defm V_CMPSX_NLT_F32 : VOPCX_Real_gfx6_gfx7<0x05e>; 2122defm V_CMPSX_TRU_F32 : VOPCX_Real_gfx6_gfx7<0x05f>; 2123defm V_CMPS_F_F64 : VOPC_Real_gfx6_gfx7<0x060>; 2124defm V_CMPS_LT_F64 : VOPC_Real_gfx6_gfx7<0x061>; 2125defm V_CMPS_EQ_F64 : VOPC_Real_gfx6_gfx7<0x062>; 2126defm V_CMPS_LE_F64 : VOPC_Real_gfx6_gfx7<0x063>; 2127defm V_CMPS_GT_F64 : VOPC_Real_gfx6_gfx7<0x064>; 2128defm V_CMPS_LG_F64 : VOPC_Real_gfx6_gfx7<0x065>; 2129defm V_CMPS_GE_F64 : VOPC_Real_gfx6_gfx7<0x066>; 2130defm V_CMPS_O_F64 : VOPC_Real_gfx6_gfx7<0x067>; 2131defm V_CMPS_U_F64 : VOPC_Real_gfx6_gfx7<0x068>; 2132defm V_CMPS_NGE_F64 : VOPC_Real_gfx6_gfx7<0x069>; 2133defm V_CMPS_NLG_F64 : VOPC_Real_gfx6_gfx7<0x06a>; 2134defm V_CMPS_NGT_F64 : VOPC_Real_gfx6_gfx7<0x06b>; 2135defm V_CMPS_NLE_F64 : VOPC_Real_gfx6_gfx7<0x06c>; 2136defm V_CMPS_NEQ_F64 : VOPC_Real_gfx6_gfx7<0x06d>; 2137defm V_CMPS_NLT_F64 : VOPC_Real_gfx6_gfx7<0x06e>; 2138defm V_CMPS_TRU_F64 : VOPC_Real_gfx6_gfx7<0x06f>; 2139defm V_CMPSX_F_F64 : VOPCX_Real_gfx6_gfx7<0x070>; 2140defm V_CMPSX_LT_F64 : VOPCX_Real_gfx6_gfx7<0x071>; 2141defm V_CMPSX_EQ_F64 : VOPCX_Real_gfx6_gfx7<0x072>; 2142defm V_CMPSX_LE_F64 : VOPCX_Real_gfx6_gfx7<0x073>; 2143defm V_CMPSX_GT_F64 : VOPCX_Real_gfx6_gfx7<0x074>; 2144defm V_CMPSX_LG_F64 : VOPCX_Real_gfx6_gfx7<0x075>; 2145defm V_CMPSX_GE_F64 : VOPCX_Real_gfx6_gfx7<0x076>; 2146defm V_CMPSX_O_F64 : VOPCX_Real_gfx6_gfx7<0x077>; 2147defm V_CMPSX_U_F64 : VOPCX_Real_gfx6_gfx7<0x078>; 2148defm V_CMPSX_NGE_F64 : VOPCX_Real_gfx6_gfx7<0x079>; 2149defm V_CMPSX_NLG_F64 : VOPCX_Real_gfx6_gfx7<0x07a>; 2150defm V_CMPSX_NGT_F64 : VOPCX_Real_gfx6_gfx7<0x07b>; 2151defm V_CMPSX_NLE_F64 : VOPCX_Real_gfx6_gfx7<0x07c>; 2152defm V_CMPSX_NEQ_F64 : VOPCX_Real_gfx6_gfx7<0x07d>; 2153defm V_CMPSX_NLT_F64 : VOPCX_Real_gfx6_gfx7<0x07e>; 2154defm V_CMPSX_TRU_F64 : VOPCX_Real_gfx6_gfx7<0x07f>; 2155defm V_CMP_F_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x080>; 2156defm V_CMP_LT_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x081>; 2157defm V_CMP_EQ_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x082>; 2158defm V_CMP_LE_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x083>; 2159defm V_CMP_GT_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x084>; 2160defm V_CMP_NE_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x085>; 2161defm V_CMP_GE_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x086>; 2162defm V_CMP_T_I32 : VOPC_Real_gfx6_gfx7_gfx10<0x087>; 2163defm V_CMP_CLASS_F32 : VOPC_Real_gfx6_gfx7_gfx10<0x088>; 2164defm V_CMPX_F_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x090>; 2165defm V_CMPX_LT_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x091>; 2166defm V_CMPX_EQ_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x092>; 2167defm V_CMPX_LE_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x093>; 2168defm V_CMPX_GT_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x094>; 2169defm V_CMPX_NE_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x095>; 2170defm V_CMPX_GE_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x096>; 2171defm V_CMPX_T_I32 : VOPCX_Real_gfx6_gfx7_gfx10<0x097>; 2172defm V_CMPX_CLASS_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x098>; 2173defm V_CMP_F_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a0>; 2174defm V_CMP_LT_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a1>; 2175defm V_CMP_EQ_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a2>; 2176defm V_CMP_LE_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a3>; 2177defm V_CMP_GT_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a4>; 2178defm V_CMP_NE_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a5>; 2179defm V_CMP_GE_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a6>; 2180defm V_CMP_T_I64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a7>; 2181defm V_CMP_CLASS_F64 : VOPC_Real_gfx6_gfx7_gfx10<0x0a8>; 2182defm V_CMPX_F_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b0>; 2183defm V_CMPX_LT_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b1>; 2184defm V_CMPX_EQ_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b2>; 2185defm V_CMPX_LE_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b3>; 2186defm V_CMPX_GT_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b4>; 2187defm V_CMPX_NE_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b5>; 2188defm V_CMPX_GE_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b6>; 2189defm V_CMPX_T_I64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b7>; 2190defm V_CMPX_CLASS_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b8>; 2191defm V_CMP_F_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c0>; 2192defm V_CMP_LT_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c1>; 2193defm V_CMP_EQ_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c2>; 2194defm V_CMP_LE_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c3>; 2195defm V_CMP_GT_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c4>; 2196defm V_CMP_NE_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c5>; 2197defm V_CMP_GE_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c6>; 2198defm V_CMP_T_U32 : VOPC_Real_gfx6_gfx7_gfx10<0x0c7>; 2199defm V_CMPX_F_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d0>; 2200defm V_CMPX_LT_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d1>; 2201defm V_CMPX_EQ_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d2>; 2202defm V_CMPX_LE_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d3>; 2203defm V_CMPX_GT_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d4>; 2204defm V_CMPX_NE_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d5>; 2205defm V_CMPX_GE_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d6>; 2206defm V_CMPX_T_U32 : VOPCX_Real_gfx6_gfx7_gfx10<0x0d7>; 2207defm V_CMP_F_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e0>; 2208defm V_CMP_LT_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e1>; 2209defm V_CMP_EQ_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e2>; 2210defm V_CMP_LE_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e3>; 2211defm V_CMP_GT_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e4>; 2212defm V_CMP_NE_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e5>; 2213defm V_CMP_GE_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e6>; 2214defm V_CMP_T_U64 : VOPC_Real_gfx6_gfx7_gfx10<0x0e7>; 2215defm V_CMPX_F_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f0>; 2216defm V_CMPX_LT_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f1>; 2217defm V_CMPX_EQ_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f2>; 2218defm V_CMPX_LE_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f3>; 2219defm V_CMPX_GT_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f4>; 2220defm V_CMPX_NE_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f5>; 2221defm V_CMPX_GE_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f6>; 2222defm V_CMPX_T_U64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0f7>; 2223 2224//===----------------------------------------------------------------------===// 2225// GFX8, GFX9 (VI). 2226//===----------------------------------------------------------------------===// 2227 2228multiclass VOPC_Real_vi <bits<10> op> { 2229 let AssemblerPredicate = isGFX8GFX9, DecoderNamespace = "GFX8" in { 2230 def _e32_vi : 2231 VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.VI>, 2232 VOPCe<op{7-0}>; 2233 2234 def _e64_vi : 2235 VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.VI>, 2236 VOP3a_vi <op, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> { 2237 // Encoding used for VOPC instructions encoded as VOP3 2238 // Differs from VOP3e by destination name (sdst) as VOPC doesn't have vector dst 2239 bits<8> sdst; 2240 let Inst{7-0} = sdst; 2241 } 2242 } 2243 2244 if !cast<VOPC_Pseudo>(NAME#"_e32").Pfl.HasExtSDWA then 2245 def _sdwa_vi : 2246 VOP_SDWA_Real <!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>, 2247 VOPC_SDWAe <op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>; 2248 2249 if !cast<VOPC_Pseudo>(NAME#"_e32").Pfl.HasExtSDWA9 then 2250 def _sdwa_gfx9 : 2251 VOP_SDWA9_Real <!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>, 2252 VOPC_SDWA9e <op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>; 2253 2254 let AssemblerPredicate = isGFX8GFX9 in { 2255 defm : VOPCInstAliases<NAME, "vi">; 2256 } 2257} 2258 2259defm V_CMP_CLASS_F32 : VOPC_Real_vi <0x10>; 2260defm V_CMPX_CLASS_F32 : VOPC_Real_vi <0x11>; 2261defm V_CMP_CLASS_F64 : VOPC_Real_vi <0x12>; 2262defm V_CMPX_CLASS_F64 : VOPC_Real_vi <0x13>; 2263defm V_CMP_CLASS_F16 : VOPC_Real_vi <0x14>; 2264defm V_CMPX_CLASS_F16 : VOPC_Real_vi <0x15>; 2265 2266defm V_CMP_F_F16 : VOPC_Real_vi <0x20>; 2267defm V_CMP_LT_F16 : VOPC_Real_vi <0x21>; 2268defm V_CMP_EQ_F16 : VOPC_Real_vi <0x22>; 2269defm V_CMP_LE_F16 : VOPC_Real_vi <0x23>; 2270defm V_CMP_GT_F16 : VOPC_Real_vi <0x24>; 2271defm V_CMP_LG_F16 : VOPC_Real_vi <0x25>; 2272defm V_CMP_GE_F16 : VOPC_Real_vi <0x26>; 2273defm V_CMP_O_F16 : VOPC_Real_vi <0x27>; 2274defm V_CMP_U_F16 : VOPC_Real_vi <0x28>; 2275defm V_CMP_NGE_F16 : VOPC_Real_vi <0x29>; 2276defm V_CMP_NLG_F16 : VOPC_Real_vi <0x2a>; 2277defm V_CMP_NGT_F16 : VOPC_Real_vi <0x2b>; 2278defm V_CMP_NLE_F16 : VOPC_Real_vi <0x2c>; 2279defm V_CMP_NEQ_F16 : VOPC_Real_vi <0x2d>; 2280defm V_CMP_NLT_F16 : VOPC_Real_vi <0x2e>; 2281defm V_CMP_TRU_F16 : VOPC_Real_vi <0x2f>; 2282 2283defm V_CMPX_F_F16 : VOPC_Real_vi <0x30>; 2284defm V_CMPX_LT_F16 : VOPC_Real_vi <0x31>; 2285defm V_CMPX_EQ_F16 : VOPC_Real_vi <0x32>; 2286defm V_CMPX_LE_F16 : VOPC_Real_vi <0x33>; 2287defm V_CMPX_GT_F16 : VOPC_Real_vi <0x34>; 2288defm V_CMPX_LG_F16 : VOPC_Real_vi <0x35>; 2289defm V_CMPX_GE_F16 : VOPC_Real_vi <0x36>; 2290defm V_CMPX_O_F16 : VOPC_Real_vi <0x37>; 2291defm V_CMPX_U_F16 : VOPC_Real_vi <0x38>; 2292defm V_CMPX_NGE_F16 : VOPC_Real_vi <0x39>; 2293defm V_CMPX_NLG_F16 : VOPC_Real_vi <0x3a>; 2294defm V_CMPX_NGT_F16 : VOPC_Real_vi <0x3b>; 2295defm V_CMPX_NLE_F16 : VOPC_Real_vi <0x3c>; 2296defm V_CMPX_NEQ_F16 : VOPC_Real_vi <0x3d>; 2297defm V_CMPX_NLT_F16 : VOPC_Real_vi <0x3e>; 2298defm V_CMPX_TRU_F16 : VOPC_Real_vi <0x3f>; 2299 2300defm V_CMP_F_F32 : VOPC_Real_vi <0x40>; 2301defm V_CMP_LT_F32 : VOPC_Real_vi <0x41>; 2302defm V_CMP_EQ_F32 : VOPC_Real_vi <0x42>; 2303defm V_CMP_LE_F32 : VOPC_Real_vi <0x43>; 2304defm V_CMP_GT_F32 : VOPC_Real_vi <0x44>; 2305defm V_CMP_LG_F32 : VOPC_Real_vi <0x45>; 2306defm V_CMP_GE_F32 : VOPC_Real_vi <0x46>; 2307defm V_CMP_O_F32 : VOPC_Real_vi <0x47>; 2308defm V_CMP_U_F32 : VOPC_Real_vi <0x48>; 2309defm V_CMP_NGE_F32 : VOPC_Real_vi <0x49>; 2310defm V_CMP_NLG_F32 : VOPC_Real_vi <0x4a>; 2311defm V_CMP_NGT_F32 : VOPC_Real_vi <0x4b>; 2312defm V_CMP_NLE_F32 : VOPC_Real_vi <0x4c>; 2313defm V_CMP_NEQ_F32 : VOPC_Real_vi <0x4d>; 2314defm V_CMP_NLT_F32 : VOPC_Real_vi <0x4e>; 2315defm V_CMP_TRU_F32 : VOPC_Real_vi <0x4f>; 2316 2317defm V_CMPX_F_F32 : VOPC_Real_vi <0x50>; 2318defm V_CMPX_LT_F32 : VOPC_Real_vi <0x51>; 2319defm V_CMPX_EQ_F32 : VOPC_Real_vi <0x52>; 2320defm V_CMPX_LE_F32 : VOPC_Real_vi <0x53>; 2321defm V_CMPX_GT_F32 : VOPC_Real_vi <0x54>; 2322defm V_CMPX_LG_F32 : VOPC_Real_vi <0x55>; 2323defm V_CMPX_GE_F32 : VOPC_Real_vi <0x56>; 2324defm V_CMPX_O_F32 : VOPC_Real_vi <0x57>; 2325defm V_CMPX_U_F32 : VOPC_Real_vi <0x58>; 2326defm V_CMPX_NGE_F32 : VOPC_Real_vi <0x59>; 2327defm V_CMPX_NLG_F32 : VOPC_Real_vi <0x5a>; 2328defm V_CMPX_NGT_F32 : VOPC_Real_vi <0x5b>; 2329defm V_CMPX_NLE_F32 : VOPC_Real_vi <0x5c>; 2330defm V_CMPX_NEQ_F32 : VOPC_Real_vi <0x5d>; 2331defm V_CMPX_NLT_F32 : VOPC_Real_vi <0x5e>; 2332defm V_CMPX_TRU_F32 : VOPC_Real_vi <0x5f>; 2333 2334defm V_CMP_F_F64 : VOPC_Real_vi <0x60>; 2335defm V_CMP_LT_F64 : VOPC_Real_vi <0x61>; 2336defm V_CMP_EQ_F64 : VOPC_Real_vi <0x62>; 2337defm V_CMP_LE_F64 : VOPC_Real_vi <0x63>; 2338defm V_CMP_GT_F64 : VOPC_Real_vi <0x64>; 2339defm V_CMP_LG_F64 : VOPC_Real_vi <0x65>; 2340defm V_CMP_GE_F64 : VOPC_Real_vi <0x66>; 2341defm V_CMP_O_F64 : VOPC_Real_vi <0x67>; 2342defm V_CMP_U_F64 : VOPC_Real_vi <0x68>; 2343defm V_CMP_NGE_F64 : VOPC_Real_vi <0x69>; 2344defm V_CMP_NLG_F64 : VOPC_Real_vi <0x6a>; 2345defm V_CMP_NGT_F64 : VOPC_Real_vi <0x6b>; 2346defm V_CMP_NLE_F64 : VOPC_Real_vi <0x6c>; 2347defm V_CMP_NEQ_F64 : VOPC_Real_vi <0x6d>; 2348defm V_CMP_NLT_F64 : VOPC_Real_vi <0x6e>; 2349defm V_CMP_TRU_F64 : VOPC_Real_vi <0x6f>; 2350 2351defm V_CMPX_F_F64 : VOPC_Real_vi <0x70>; 2352defm V_CMPX_LT_F64 : VOPC_Real_vi <0x71>; 2353defm V_CMPX_EQ_F64 : VOPC_Real_vi <0x72>; 2354defm V_CMPX_LE_F64 : VOPC_Real_vi <0x73>; 2355defm V_CMPX_GT_F64 : VOPC_Real_vi <0x74>; 2356defm V_CMPX_LG_F64 : VOPC_Real_vi <0x75>; 2357defm V_CMPX_GE_F64 : VOPC_Real_vi <0x76>; 2358defm V_CMPX_O_F64 : VOPC_Real_vi <0x77>; 2359defm V_CMPX_U_F64 : VOPC_Real_vi <0x78>; 2360defm V_CMPX_NGE_F64 : VOPC_Real_vi <0x79>; 2361defm V_CMPX_NLG_F64 : VOPC_Real_vi <0x7a>; 2362defm V_CMPX_NGT_F64 : VOPC_Real_vi <0x7b>; 2363defm V_CMPX_NLE_F64 : VOPC_Real_vi <0x7c>; 2364defm V_CMPX_NEQ_F64 : VOPC_Real_vi <0x7d>; 2365defm V_CMPX_NLT_F64 : VOPC_Real_vi <0x7e>; 2366defm V_CMPX_TRU_F64 : VOPC_Real_vi <0x7f>; 2367 2368defm V_CMP_F_I16 : VOPC_Real_vi <0xa0>; 2369defm V_CMP_LT_I16 : VOPC_Real_vi <0xa1>; 2370defm V_CMP_EQ_I16 : VOPC_Real_vi <0xa2>; 2371defm V_CMP_LE_I16 : VOPC_Real_vi <0xa3>; 2372defm V_CMP_GT_I16 : VOPC_Real_vi <0xa4>; 2373defm V_CMP_NE_I16 : VOPC_Real_vi <0xa5>; 2374defm V_CMP_GE_I16 : VOPC_Real_vi <0xa6>; 2375defm V_CMP_T_I16 : VOPC_Real_vi <0xa7>; 2376 2377defm V_CMP_F_U16 : VOPC_Real_vi <0xa8>; 2378defm V_CMP_LT_U16 : VOPC_Real_vi <0xa9>; 2379defm V_CMP_EQ_U16 : VOPC_Real_vi <0xaa>; 2380defm V_CMP_LE_U16 : VOPC_Real_vi <0xab>; 2381defm V_CMP_GT_U16 : VOPC_Real_vi <0xac>; 2382defm V_CMP_NE_U16 : VOPC_Real_vi <0xad>; 2383defm V_CMP_GE_U16 : VOPC_Real_vi <0xae>; 2384defm V_CMP_T_U16 : VOPC_Real_vi <0xaf>; 2385 2386defm V_CMPX_F_I16 : VOPC_Real_vi <0xb0>; 2387defm V_CMPX_LT_I16 : VOPC_Real_vi <0xb1>; 2388defm V_CMPX_EQ_I16 : VOPC_Real_vi <0xb2>; 2389defm V_CMPX_LE_I16 : VOPC_Real_vi <0xb3>; 2390defm V_CMPX_GT_I16 : VOPC_Real_vi <0xb4>; 2391defm V_CMPX_NE_I16 : VOPC_Real_vi <0xb5>; 2392defm V_CMPX_GE_I16 : VOPC_Real_vi <0xb6>; 2393defm V_CMPX_T_I16 : VOPC_Real_vi <0xb7>; 2394 2395defm V_CMPX_F_U16 : VOPC_Real_vi <0xb8>; 2396defm V_CMPX_LT_U16 : VOPC_Real_vi <0xb9>; 2397defm V_CMPX_EQ_U16 : VOPC_Real_vi <0xba>; 2398defm V_CMPX_LE_U16 : VOPC_Real_vi <0xbb>; 2399defm V_CMPX_GT_U16 : VOPC_Real_vi <0xbc>; 2400defm V_CMPX_NE_U16 : VOPC_Real_vi <0xbd>; 2401defm V_CMPX_GE_U16 : VOPC_Real_vi <0xbe>; 2402defm V_CMPX_T_U16 : VOPC_Real_vi <0xbf>; 2403 2404defm V_CMP_F_I32 : VOPC_Real_vi <0xc0>; 2405defm V_CMP_LT_I32 : VOPC_Real_vi <0xc1>; 2406defm V_CMP_EQ_I32 : VOPC_Real_vi <0xc2>; 2407defm V_CMP_LE_I32 : VOPC_Real_vi <0xc3>; 2408defm V_CMP_GT_I32 : VOPC_Real_vi <0xc4>; 2409defm V_CMP_NE_I32 : VOPC_Real_vi <0xc5>; 2410defm V_CMP_GE_I32 : VOPC_Real_vi <0xc6>; 2411defm V_CMP_T_I32 : VOPC_Real_vi <0xc7>; 2412 2413defm V_CMPX_F_I32 : VOPC_Real_vi <0xd0>; 2414defm V_CMPX_LT_I32 : VOPC_Real_vi <0xd1>; 2415defm V_CMPX_EQ_I32 : VOPC_Real_vi <0xd2>; 2416defm V_CMPX_LE_I32 : VOPC_Real_vi <0xd3>; 2417defm V_CMPX_GT_I32 : VOPC_Real_vi <0xd4>; 2418defm V_CMPX_NE_I32 : VOPC_Real_vi <0xd5>; 2419defm V_CMPX_GE_I32 : VOPC_Real_vi <0xd6>; 2420defm V_CMPX_T_I32 : VOPC_Real_vi <0xd7>; 2421 2422defm V_CMP_F_I64 : VOPC_Real_vi <0xe0>; 2423defm V_CMP_LT_I64 : VOPC_Real_vi <0xe1>; 2424defm V_CMP_EQ_I64 : VOPC_Real_vi <0xe2>; 2425defm V_CMP_LE_I64 : VOPC_Real_vi <0xe3>; 2426defm V_CMP_GT_I64 : VOPC_Real_vi <0xe4>; 2427defm V_CMP_NE_I64 : VOPC_Real_vi <0xe5>; 2428defm V_CMP_GE_I64 : VOPC_Real_vi <0xe6>; 2429defm V_CMP_T_I64 : VOPC_Real_vi <0xe7>; 2430 2431defm V_CMPX_F_I64 : VOPC_Real_vi <0xf0>; 2432defm V_CMPX_LT_I64 : VOPC_Real_vi <0xf1>; 2433defm V_CMPX_EQ_I64 : VOPC_Real_vi <0xf2>; 2434defm V_CMPX_LE_I64 : VOPC_Real_vi <0xf3>; 2435defm V_CMPX_GT_I64 : VOPC_Real_vi <0xf4>; 2436defm V_CMPX_NE_I64 : VOPC_Real_vi <0xf5>; 2437defm V_CMPX_GE_I64 : VOPC_Real_vi <0xf6>; 2438defm V_CMPX_T_I64 : VOPC_Real_vi <0xf7>; 2439 2440defm V_CMP_F_U32 : VOPC_Real_vi <0xc8>; 2441defm V_CMP_LT_U32 : VOPC_Real_vi <0xc9>; 2442defm V_CMP_EQ_U32 : VOPC_Real_vi <0xca>; 2443defm V_CMP_LE_U32 : VOPC_Real_vi <0xcb>; 2444defm V_CMP_GT_U32 : VOPC_Real_vi <0xcc>; 2445defm V_CMP_NE_U32 : VOPC_Real_vi <0xcd>; 2446defm V_CMP_GE_U32 : VOPC_Real_vi <0xce>; 2447defm V_CMP_T_U32 : VOPC_Real_vi <0xcf>; 2448 2449defm V_CMPX_F_U32 : VOPC_Real_vi <0xd8>; 2450defm V_CMPX_LT_U32 : VOPC_Real_vi <0xd9>; 2451defm V_CMPX_EQ_U32 : VOPC_Real_vi <0xda>; 2452defm V_CMPX_LE_U32 : VOPC_Real_vi <0xdb>; 2453defm V_CMPX_GT_U32 : VOPC_Real_vi <0xdc>; 2454defm V_CMPX_NE_U32 : VOPC_Real_vi <0xdd>; 2455defm V_CMPX_GE_U32 : VOPC_Real_vi <0xde>; 2456defm V_CMPX_T_U32 : VOPC_Real_vi <0xdf>; 2457 2458defm V_CMP_F_U64 : VOPC_Real_vi <0xe8>; 2459defm V_CMP_LT_U64 : VOPC_Real_vi <0xe9>; 2460defm V_CMP_EQ_U64 : VOPC_Real_vi <0xea>; 2461defm V_CMP_LE_U64 : VOPC_Real_vi <0xeb>; 2462defm V_CMP_GT_U64 : VOPC_Real_vi <0xec>; 2463defm V_CMP_NE_U64 : VOPC_Real_vi <0xed>; 2464defm V_CMP_GE_U64 : VOPC_Real_vi <0xee>; 2465defm V_CMP_T_U64 : VOPC_Real_vi <0xef>; 2466 2467defm V_CMPX_F_U64 : VOPC_Real_vi <0xf8>; 2468defm V_CMPX_LT_U64 : VOPC_Real_vi <0xf9>; 2469defm V_CMPX_EQ_U64 : VOPC_Real_vi <0xfa>; 2470defm V_CMPX_LE_U64 : VOPC_Real_vi <0xfb>; 2471defm V_CMPX_GT_U64 : VOPC_Real_vi <0xfc>; 2472defm V_CMPX_NE_U64 : VOPC_Real_vi <0xfd>; 2473defm V_CMPX_GE_U64 : VOPC_Real_vi <0xfe>; 2474defm V_CMPX_T_U64 : VOPC_Real_vi <0xff>; 2475