[Codegen] Alter the default promotion for saturating adds and subs
[llvm-complete.git] / lib / Target / AMDGPU / VOPCInstructions.td
blobe011b0a447edd3a20a8c7b540837792d6924a5bf
1 //===-- VOPCInstructions.td - Vector Instruction Defintions ---------------===//
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 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
10 // Encodings
11 //===----------------------------------------------------------------------===//
13 class VOPCe <bits<8> op> : Enc32 {
14   bits<9> src0;
15   bits<8> src1;
17   let Inst{8-0} = src0;
18   let Inst{16-9} = src1;
19   let Inst{24-17} = op;
20   let Inst{31-25} = 0x3e;
23 class VOPC_SDWAe <bits<8> op, VOPProfile P> : VOP_SDWAe <P> {
24   bits<8> src1;
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
31   // VOPC disallows dst_sel and dst_unused as they have no effect on destination
32   let Inst{42-40} = 0;
33   let Inst{44-43} = 0;
36 class VOPC_SDWA9e <bits<8> op, VOPProfile P> : VOP_SDWA9Be <P> {
37   bits<9> src1;
39   let Inst{8-0}   = 0xf9; // sdwa
40   let Inst{16-9}  = !if(P.HasSrc1, src1{7-0}, 0);
41   let Inst{24-17} = op;
42   let Inst{31-25} = 0x3e; // encoding
43   let Inst{63}    = !if(P.HasSrc1, src1{8}, 0); // src1_sgpr
47 //===----------------------------------------------------------------------===//
48 // VOPC classes
49 //===----------------------------------------------------------------------===//
51 // VOPC instructions are a special case because for the 32-bit
52 // encoding, we want to display the implicit vcc write as if it were
53 // an explicit $dst.
54 class VOPC_Profile<list<SchedReadWrite> sched, ValueType vt0, ValueType vt1 = vt0> :
55   VOPProfile <[i1, vt0, vt1, untyped]> {
56   let Asm32 = "$src0, $src1";
57   // The destination for 32-bit encoding is implicit.
58   let HasDst32 = 0;
59   let Outs64 = (outs VOPDstS64orS32:$sdst);
60   list<SchedReadWrite> Schedule = sched;
63 class VOPC_NoSdst_Profile<list<SchedReadWrite> sched, ValueType vt0,
64                           ValueType vt1 = vt0> :
65   VOPC_Profile<sched, vt0, vt1> {
66   let Outs64 = (outs );
67   let OutsSDWA = (outs );
68   let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0,
69                      Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1,
70                      src0_sel:$src0_sel, src1_sel:$src1_sel);
71   let Asm64 = !if(isFloatType<Src0VT>.ret, "$src0_modifiers, $src1_modifiers$clamp",
72                                            "$src0, $src1");
73   let AsmSDWA9 = "$src0_modifiers, $src1_modifiers $src0_sel $src1_sel";
74   let EmitDst = 0;
77 class VOPC_Pseudo <string opName, VOPC_Profile P, list<dag> pattern=[],
78                    bit DefVcc = 1> :
79   InstSI<(outs), P.Ins32, "", pattern>,
80   VOP <opName>,
81   SIMCInstr<opName#"_e32", SIEncodingFamily.NONE> {
83   let isPseudo = 1;
84   let isCodeGenOnly = 1;
85   let UseNamedOperandTable = 1;
87   string Mnemonic = opName;
88   string AsmOperands = P.Asm32;
90   let Size = 4;
91   let mayLoad = 0;
92   let mayStore = 0;
93   let hasSideEffects = 0;
95   let VALU = 1;
96   let VOPC = 1;
97   let Uses = [EXEC];
98   let Defs = !if(DefVcc, [VCC], []);
100   VOPProfile Pfl = P;
103 class VOPC_Real <VOPC_Pseudo ps, int EncodingFamily> :
104   InstSI <ps.OutOperandList, ps.InOperandList, ps.PseudoInstr # " " # ps.AsmOperands, []>,
105   SIMCInstr <ps.PseudoInstr, EncodingFamily> {
107   let isPseudo = 0;
108   let isCodeGenOnly = 0;
110   let Constraints     = ps.Constraints;
111   let DisableEncoding = ps.DisableEncoding;
113   // copy relevant pseudo op flags
114   let SubtargetPredicate = ps.SubtargetPredicate;
115   let AsmMatchConverter  = ps.AsmMatchConverter;
116   let Constraints        = ps.Constraints;
117   let DisableEncoding    = ps.DisableEncoding;
118   let TSFlags            = ps.TSFlags;
119   let UseNamedOperandTable = ps.UseNamedOperandTable;
120   let Uses                 = ps.Uses;
121   let Defs                 = ps.Defs;
124 class VOPC_SDWA_Pseudo <string OpName, VOPProfile P, list<dag> pattern=[]> :
125   VOP_SDWA_Pseudo <OpName, P, pattern> {
126   let AsmMatchConverter = "cvtSdwaVOPC";
129 // This class is used only with VOPC instructions. Use $sdst for out operand
130 class VOPCInstAlias <VOP3_Pseudo ps, Instruction inst,
131                      string Asm32 = ps.Pfl.Asm32, VOPProfile p = ps.Pfl> :
132   InstAlias <ps.OpName#" "#Asm32, (inst)>, PredicateControl {
134   field bit isCompare;
135   field bit isCommutable;
137   let ResultInst =
138     !if (p.HasDst32,
139       !if (!eq(p.NumSrcArgs, 0),
140         // 1 dst, 0 src
141         (inst p.DstRC:$sdst),
142       !if (!eq(p.NumSrcArgs, 1),
143         // 1 dst, 1 src
144         (inst p.DstRC:$sdst, p.Src0RC32:$src0),
145       !if (!eq(p.NumSrcArgs, 2),
146         // 1 dst, 2 src
147         (inst p.DstRC:$sdst, p.Src0RC32:$src0, p.Src1RC32:$src1),
148       // else - unreachable
149         (inst)))),
150     // else
151       !if (!eq(p.NumSrcArgs, 2),
152         // 0 dst, 2 src
153         (inst p.Src0RC32:$src0, p.Src1RC32:$src1),
154       !if (!eq(p.NumSrcArgs, 1),
155         // 0 dst, 1 src
156         (inst p.Src0RC32:$src1),
157       // else
158         // 0 dst, 0 src
159         (inst))));
161   let AsmVariantName = AMDGPUAsmVariants.Default;
162   let SubtargetPredicate = AssemblerPredicate;
165 multiclass VOPCInstAliases <string OpName, string Arch> {
166   def : VOPCInstAlias <!cast<VOP3_Pseudo>(OpName#"_e64"),
167                        !cast<Instruction>(OpName#"_e32_"#Arch)>;
168   let WaveSizePredicate = isWave32 in {
169     def : VOPCInstAlias <!cast<VOP3_Pseudo>(OpName#"_e64"),
170                          !cast<Instruction>(OpName#"_e32_"#Arch),
171                          "vcc_lo, "#!cast<VOP3_Pseudo>(OpName#"_e64").Pfl.Asm32>;
172   }
173   let WaveSizePredicate = isWave64 in {
174     def : VOPCInstAlias <!cast<VOP3_Pseudo>(OpName#"_e64"),
175                          !cast<Instruction>(OpName#"_e32_"#Arch),
176                          "vcc, "#!cast<VOP3_Pseudo>(OpName#"_e64").Pfl.Asm32>;
177   }
180 multiclass VOPCXInstAliases <string OpName, string Arch> {
181   def : VOPCInstAlias <!cast<VOP3_Pseudo>(OpName#"_e64"),
182                        !cast<Instruction>(OpName#"_e32_"#Arch)>;
186 class getVOPCPat64 <SDPatternOperator cond, VOPProfile P> : LetDummies {
187   list<dag> ret = !if(P.HasModifiers,
188       [(set i1:$sdst,
189         (setcc (P.Src0VT
190                   !if(P.HasOMod,
191                     (VOP3Mods0 P.Src0VT:$src0, i32:$src0_modifiers, i1:$clamp, i32:$omod),
192                     (VOP3Mods0 P.Src0VT:$src0, i32:$src0_modifiers, i1:$clamp))),
193                (P.Src1VT (VOP3Mods P.Src1VT:$src1, i32:$src1_modifiers)),
194                cond))],
195       [(set i1:$sdst, (setcc P.Src0VT:$src0, P.Src1VT:$src1, cond))]);
198 class VCMPXNoSDstTable <bit has_sdst, string Name> {
199   bit HasSDst = has_sdst;
200   string NoSDstOp = Name;
203 multiclass VOPC_Pseudos <string opName,
204                          VOPC_Profile P,
205                          SDPatternOperator cond = COND_NULL,
206                          string revOp = opName,
207                          bit DefExec = 0> {
209   def _e32 : VOPC_Pseudo <opName, P>,
210              Commutable_REV<revOp#"_e32", !eq(revOp, opName)>,
211              VCMPXNoSDstTable<1, opName#"_e32"> {
212     let Defs = !if(DefExec, [VCC, EXEC], [VCC]);
213     let SchedRW = P.Schedule;
214     let isConvergent = DefExec;
215     let isCompare = 1;
216     let isCommutable = 1;
217   }
219   def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret>,
220     Commutable_REV<revOp#"_e64", !eq(revOp, opName)>,
221     VCMPXNoSDstTable<1, opName#"_e64"> {
222     let Defs = !if(DefExec, [EXEC], []);
223     let SchedRW = P.Schedule;
224     let isCompare = 1;
225     let isCommutable = 1;
226   }
228   def _sdwa : VOPC_SDWA_Pseudo <opName, P> {
229     let Defs = !if(DefExec, [VCC, EXEC], [VCC]);
230     let SchedRW = P.Schedule;
231     let isConvergent = DefExec;
232     let isCompare = 1;
233   }
236 let SubtargetPredicate = HasSdstCMPX in {
237 multiclass VOPCX_Pseudos <string opName,
238                           VOPC_Profile P, VOPC_Profile P_NoSDst,
239                           SDPatternOperator cond = COND_NULL,
240                           string revOp = opName> :
241            VOPC_Pseudos <opName, P, cond, revOp, 1> {
243   def _nosdst_e32 : VOPC_Pseudo <opName#"_nosdst", P_NoSDst, [], 0>,
244              Commutable_REV<revOp#"_nosdst_e32", !eq(revOp, opName)>,
245              VCMPXNoSDstTable<0, opName#"_e32"> {
246     let Defs = [EXEC];
247     let SchedRW = P_NoSDst.Schedule;
248     let isConvergent = 1;
249     let isCompare = 1;
250     let isCommutable = 1;
251     let SubtargetPredicate = HasNoSdstCMPX;
252   }
254   def _nosdst_e64 : VOP3_Pseudo<opName#"_nosdst", P_NoSDst>,
255     Commutable_REV<revOp#"_nosdst_e64", !eq(revOp, opName)>,
256     VCMPXNoSDstTable<0, opName#"_e64"> {
257     let Defs = [EXEC];
258     let SchedRW = P_NoSDst.Schedule;
259     let isCompare = 1;
260     let isCommutable = 1;
261     let SubtargetPredicate = HasNoSdstCMPX;
262   }
264   def _nosdst_sdwa : VOPC_SDWA_Pseudo <opName#"_nosdst", P_NoSDst> {
265     let Defs = [EXEC];
266     let SchedRW = P_NoSDst.Schedule;
267     let isConvergent = 1;
268     let isCompare = 1;
269     let SubtargetPredicate = HasNoSdstCMPX;
270   }
272 } // End SubtargetPredicate = HasSdstCMPX
274 def VOPC_I1_F16_F16 : VOPC_Profile<[Write32Bit], f16>;
275 def VOPC_I1_F32_F32 : VOPC_Profile<[Write32Bit], f32>;
276 def VOPC_I1_F64_F64 : VOPC_Profile<[WriteDoubleAdd], f64>;
277 def VOPC_I1_I16_I16 : VOPC_Profile<[Write32Bit], i16>;
278 def VOPC_I1_I32_I32 : VOPC_Profile<[Write32Bit], i32>;
279 def VOPC_I1_I64_I64 : VOPC_Profile<[Write64Bit], i64>;
281 def VOPC_F16_F16 : VOPC_NoSdst_Profile<[Write32Bit], f16>;
282 def VOPC_F32_F32 : VOPC_NoSdst_Profile<[Write32Bit], f32>;
283 def VOPC_F64_F64 : VOPC_NoSdst_Profile<[Write64Bit], f64>;
284 def VOPC_I16_I16 : VOPC_NoSdst_Profile<[Write32Bit], i16>;
285 def VOPC_I32_I32 : VOPC_NoSdst_Profile<[Write32Bit], i32>;
286 def VOPC_I64_I64 : VOPC_NoSdst_Profile<[Write64Bit], i64>;
288 multiclass VOPC_F16 <string opName, SDPatternOperator cond = COND_NULL,
289                      string revOp = opName> :
290   VOPC_Pseudos <opName, VOPC_I1_F16_F16, cond, revOp, 0>;
292 multiclass VOPC_F32 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> :
293   VOPC_Pseudos <opName, VOPC_I1_F32_F32, cond, revOp, 0>;
295 multiclass VOPC_F64 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> :
296   VOPC_Pseudos <opName, VOPC_I1_F64_F64, cond, revOp, 0>;
298 multiclass VOPC_I16 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> :
299   VOPC_Pseudos <opName, VOPC_I1_I16_I16, cond, revOp, 0>;
301 multiclass VOPC_I32 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> :
302   VOPC_Pseudos <opName, VOPC_I1_I32_I32, cond, revOp, 0>;
304 multiclass VOPC_I64 <string opName, SDPatternOperator cond = COND_NULL, string revOp = opName> :
305   VOPC_Pseudos <opName, VOPC_I1_I64_I64, cond, revOp, 0>;
307 multiclass VOPCX_F16 <string opName, string revOp = opName> :
308   VOPCX_Pseudos <opName, VOPC_I1_F16_F16, VOPC_F16_F16, COND_NULL, revOp>;
310 multiclass VOPCX_F32 <string opName, string revOp = opName> :
311   VOPCX_Pseudos <opName, VOPC_I1_F32_F32, VOPC_F32_F32, COND_NULL, revOp>;
313 multiclass VOPCX_F64 <string opName, string revOp = opName> :
314   VOPCX_Pseudos <opName, VOPC_I1_F64_F64, VOPC_F64_F64, COND_NULL, revOp>;
316 multiclass VOPCX_I16 <string opName, string revOp = opName> :
317   VOPCX_Pseudos <opName, VOPC_I1_I16_I16, VOPC_I16_I16, COND_NULL, revOp>;
319 multiclass VOPCX_I32 <string opName, string revOp = opName> :
320   VOPCX_Pseudos <opName, VOPC_I1_I32_I32, VOPC_I32_I32, COND_NULL, revOp>;
322 multiclass VOPCX_I64 <string opName, string revOp = opName> :
323   VOPCX_Pseudos <opName, VOPC_I1_I64_I64, VOPC_I64_I64, COND_NULL, revOp>;
326 //===----------------------------------------------------------------------===//
327 // Compare instructions
328 //===----------------------------------------------------------------------===//
330 defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">;
331 defm V_CMP_LT_F32 : VOPC_F32 <"v_cmp_lt_f32", COND_OLT, "v_cmp_gt_f32">;
332 defm V_CMP_EQ_F32 : VOPC_F32 <"v_cmp_eq_f32", COND_OEQ>;
333 defm V_CMP_LE_F32 : VOPC_F32 <"v_cmp_le_f32", COND_OLE, "v_cmp_ge_f32">;
334 defm V_CMP_GT_F32 : VOPC_F32 <"v_cmp_gt_f32", COND_OGT>;
335 defm V_CMP_LG_F32 : VOPC_F32 <"v_cmp_lg_f32", COND_ONE>;
336 defm V_CMP_GE_F32 : VOPC_F32 <"v_cmp_ge_f32", COND_OGE>;
337 defm V_CMP_O_F32 : VOPC_F32 <"v_cmp_o_f32", COND_O>;
338 defm V_CMP_U_F32 : VOPC_F32 <"v_cmp_u_f32", COND_UO>;
339 defm V_CMP_NGE_F32 : VOPC_F32 <"v_cmp_nge_f32",  COND_ULT, "v_cmp_nle_f32">;
340 defm V_CMP_NLG_F32 : VOPC_F32 <"v_cmp_nlg_f32", COND_UEQ>;
341 defm V_CMP_NGT_F32 : VOPC_F32 <"v_cmp_ngt_f32", COND_ULE, "v_cmp_nlt_f32">;
342 defm V_CMP_NLE_F32 : VOPC_F32 <"v_cmp_nle_f32", COND_UGT>;
343 defm V_CMP_NEQ_F32 : VOPC_F32 <"v_cmp_neq_f32", COND_UNE>;
344 defm V_CMP_NLT_F32 : VOPC_F32 <"v_cmp_nlt_f32", COND_UGE>;
345 defm V_CMP_TRU_F32 : VOPC_F32 <"v_cmp_tru_f32">;
347 defm V_CMPX_F_F32 : VOPCX_F32 <"v_cmpx_f_f32">;
348 defm V_CMPX_LT_F32 : VOPCX_F32 <"v_cmpx_lt_f32", "v_cmpx_gt_f32">;
349 defm V_CMPX_EQ_F32 : VOPCX_F32 <"v_cmpx_eq_f32">;
350 defm V_CMPX_LE_F32 : VOPCX_F32 <"v_cmpx_le_f32", "v_cmpx_ge_f32">;
351 defm V_CMPX_GT_F32 : VOPCX_F32 <"v_cmpx_gt_f32">;
352 defm V_CMPX_LG_F32 : VOPCX_F32 <"v_cmpx_lg_f32">;
353 defm V_CMPX_GE_F32 : VOPCX_F32 <"v_cmpx_ge_f32">;
354 defm V_CMPX_O_F32 : VOPCX_F32 <"v_cmpx_o_f32">;
355 defm V_CMPX_U_F32 : VOPCX_F32 <"v_cmpx_u_f32">;
356 defm V_CMPX_NGE_F32 : VOPCX_F32 <"v_cmpx_nge_f32", "v_cmpx_nle_f32">;
357 defm V_CMPX_NLG_F32 : VOPCX_F32 <"v_cmpx_nlg_f32">;
358 defm V_CMPX_NGT_F32 : VOPCX_F32 <"v_cmpx_ngt_f32", "v_cmpx_nlt_f32">;
359 defm V_CMPX_NLE_F32 : VOPCX_F32 <"v_cmpx_nle_f32">;
360 defm V_CMPX_NEQ_F32 : VOPCX_F32 <"v_cmpx_neq_f32">;
361 defm V_CMPX_NLT_F32 : VOPCX_F32 <"v_cmpx_nlt_f32">;
362 defm V_CMPX_TRU_F32 : VOPCX_F32 <"v_cmpx_tru_f32">;
364 defm V_CMP_F_F64 : VOPC_F64 <"v_cmp_f_f64">;
365 defm V_CMP_LT_F64 : VOPC_F64 <"v_cmp_lt_f64", COND_OLT, "v_cmp_gt_f64">;
366 defm V_CMP_EQ_F64 : VOPC_F64 <"v_cmp_eq_f64", COND_OEQ>;
367 defm V_CMP_LE_F64 : VOPC_F64 <"v_cmp_le_f64", COND_OLE, "v_cmp_ge_f64">;
368 defm V_CMP_GT_F64 : VOPC_F64 <"v_cmp_gt_f64", COND_OGT>;
369 defm V_CMP_LG_F64 : VOPC_F64 <"v_cmp_lg_f64", COND_ONE>;
370 defm V_CMP_GE_F64 : VOPC_F64 <"v_cmp_ge_f64", COND_OGE>;
371 defm V_CMP_O_F64 : VOPC_F64 <"v_cmp_o_f64", COND_O>;
372 defm V_CMP_U_F64 : VOPC_F64 <"v_cmp_u_f64", COND_UO>;
373 defm V_CMP_NGE_F64 : VOPC_F64 <"v_cmp_nge_f64", COND_ULT, "v_cmp_nle_f64">;
374 defm V_CMP_NLG_F64 : VOPC_F64 <"v_cmp_nlg_f64", COND_UEQ>;
375 defm V_CMP_NGT_F64 : VOPC_F64 <"v_cmp_ngt_f64", COND_ULE, "v_cmp_nlt_f64">;
376 defm V_CMP_NLE_F64 : VOPC_F64 <"v_cmp_nle_f64", COND_UGT>;
377 defm V_CMP_NEQ_F64 : VOPC_F64 <"v_cmp_neq_f64", COND_UNE>;
378 defm V_CMP_NLT_F64 : VOPC_F64 <"v_cmp_nlt_f64", COND_UGE>;
379 defm V_CMP_TRU_F64 : VOPC_F64 <"v_cmp_tru_f64">;
381 defm V_CMPX_F_F64 : VOPCX_F64 <"v_cmpx_f_f64">;
382 defm V_CMPX_LT_F64 : VOPCX_F64 <"v_cmpx_lt_f64", "v_cmpx_gt_f64">;
383 defm V_CMPX_EQ_F64 : VOPCX_F64 <"v_cmpx_eq_f64">;
384 defm V_CMPX_LE_F64 : VOPCX_F64 <"v_cmpx_le_f64", "v_cmpx_ge_f64">;
385 defm V_CMPX_GT_F64 : VOPCX_F64 <"v_cmpx_gt_f64">;
386 defm V_CMPX_LG_F64 : VOPCX_F64 <"v_cmpx_lg_f64">;
387 defm V_CMPX_GE_F64 : VOPCX_F64 <"v_cmpx_ge_f64">;
388 defm V_CMPX_O_F64 : VOPCX_F64 <"v_cmpx_o_f64">;
389 defm V_CMPX_U_F64 : VOPCX_F64 <"v_cmpx_u_f64">;
390 defm V_CMPX_NGE_F64 : VOPCX_F64 <"v_cmpx_nge_f64", "v_cmpx_nle_f64">;
391 defm V_CMPX_NLG_F64 : VOPCX_F64 <"v_cmpx_nlg_f64">;
392 defm V_CMPX_NGT_F64 : VOPCX_F64 <"v_cmpx_ngt_f64", "v_cmpx_nlt_f64">;
393 defm V_CMPX_NLE_F64 : VOPCX_F64 <"v_cmpx_nle_f64">;
394 defm V_CMPX_NEQ_F64 : VOPCX_F64 <"v_cmpx_neq_f64">;
395 defm V_CMPX_NLT_F64 : VOPCX_F64 <"v_cmpx_nlt_f64">;
396 defm V_CMPX_TRU_F64 : VOPCX_F64 <"v_cmpx_tru_f64">;
398 let SubtargetPredicate = isGFX6GFX7 in {
400 defm V_CMPS_F_F32 : VOPC_F32 <"v_cmps_f_f32">;
401 defm V_CMPS_LT_F32 : VOPC_F32 <"v_cmps_lt_f32", COND_NULL, "v_cmps_gt_f32">;
402 defm V_CMPS_EQ_F32 : VOPC_F32 <"v_cmps_eq_f32">;
403 defm V_CMPS_LE_F32 : VOPC_F32 <"v_cmps_le_f32", COND_NULL, "v_cmps_ge_f32">;
404 defm V_CMPS_GT_F32 : VOPC_F32 <"v_cmps_gt_f32">;
405 defm V_CMPS_LG_F32 : VOPC_F32 <"v_cmps_lg_f32">;
406 defm V_CMPS_GE_F32 : VOPC_F32 <"v_cmps_ge_f32">;
407 defm V_CMPS_O_F32 : VOPC_F32 <"v_cmps_o_f32">;
408 defm V_CMPS_U_F32 : VOPC_F32 <"v_cmps_u_f32">;
409 defm V_CMPS_NGE_F32 : VOPC_F32 <"v_cmps_nge_f32", COND_NULL, "v_cmps_nle_f32">;
410 defm V_CMPS_NLG_F32 : VOPC_F32 <"v_cmps_nlg_f32">;
411 defm V_CMPS_NGT_F32 : VOPC_F32 <"v_cmps_ngt_f32", COND_NULL, "v_cmps_nlt_f32">;
412 defm V_CMPS_NLE_F32 : VOPC_F32 <"v_cmps_nle_f32">;
413 defm V_CMPS_NEQ_F32 : VOPC_F32 <"v_cmps_neq_f32">;
414 defm V_CMPS_NLT_F32 : VOPC_F32 <"v_cmps_nlt_f32">;
415 defm V_CMPS_TRU_F32 : VOPC_F32 <"v_cmps_tru_f32">;
417 defm V_CMPSX_F_F32 : VOPCX_F32 <"v_cmpsx_f_f32">;
418 defm V_CMPSX_LT_F32 : VOPCX_F32 <"v_cmpsx_lt_f32", "v_cmpsx_gt_f32">;
419 defm V_CMPSX_EQ_F32 : VOPCX_F32 <"v_cmpsx_eq_f32">;
420 defm V_CMPSX_LE_F32 : VOPCX_F32 <"v_cmpsx_le_f32", "v_cmpsx_ge_f32">;
421 defm V_CMPSX_GT_F32 : VOPCX_F32 <"v_cmpsx_gt_f32">;
422 defm V_CMPSX_LG_F32 : VOPCX_F32 <"v_cmpsx_lg_f32">;
423 defm V_CMPSX_GE_F32 : VOPCX_F32 <"v_cmpsx_ge_f32">;
424 defm V_CMPSX_O_F32 : VOPCX_F32 <"v_cmpsx_o_f32">;
425 defm V_CMPSX_U_F32 : VOPCX_F32 <"v_cmpsx_u_f32">;
426 defm V_CMPSX_NGE_F32 : VOPCX_F32 <"v_cmpsx_nge_f32", "v_cmpsx_nle_f32">;
427 defm V_CMPSX_NLG_F32 : VOPCX_F32 <"v_cmpsx_nlg_f32">;
428 defm V_CMPSX_NGT_F32 : VOPCX_F32 <"v_cmpsx_ngt_f32", "v_cmpsx_nlt_f32">;
429 defm V_CMPSX_NLE_F32 : VOPCX_F32 <"v_cmpsx_nle_f32">;
430 defm V_CMPSX_NEQ_F32 : VOPCX_F32 <"v_cmpsx_neq_f32">;
431 defm V_CMPSX_NLT_F32 : VOPCX_F32 <"v_cmpsx_nlt_f32">;
432 defm V_CMPSX_TRU_F32 : VOPCX_F32 <"v_cmpsx_tru_f32">;
434 defm V_CMPS_F_F64 : VOPC_F64 <"v_cmps_f_f64">;
435 defm V_CMPS_LT_F64 : VOPC_F64 <"v_cmps_lt_f64", COND_NULL, "v_cmps_gt_f64">;
436 defm V_CMPS_EQ_F64 : VOPC_F64 <"v_cmps_eq_f64">;
437 defm V_CMPS_LE_F64 : VOPC_F64 <"v_cmps_le_f64", COND_NULL, "v_cmps_ge_f64">;
438 defm V_CMPS_GT_F64 : VOPC_F64 <"v_cmps_gt_f64">;
439 defm V_CMPS_LG_F64 : VOPC_F64 <"v_cmps_lg_f64">;
440 defm V_CMPS_GE_F64 : VOPC_F64 <"v_cmps_ge_f64">;
441 defm V_CMPS_O_F64 : VOPC_F64 <"v_cmps_o_f64">;
442 defm V_CMPS_U_F64 : VOPC_F64 <"v_cmps_u_f64">;
443 defm V_CMPS_NGE_F64 : VOPC_F64 <"v_cmps_nge_f64", COND_NULL, "v_cmps_nle_f64">;
444 defm V_CMPS_NLG_F64 : VOPC_F64 <"v_cmps_nlg_f64">;
445 defm V_CMPS_NGT_F64 : VOPC_F64 <"v_cmps_ngt_f64", COND_NULL, "v_cmps_nlt_f64">;
446 defm V_CMPS_NLE_F64 : VOPC_F64 <"v_cmps_nle_f64">;
447 defm V_CMPS_NEQ_F64 : VOPC_F64 <"v_cmps_neq_f64">;
448 defm V_CMPS_NLT_F64 : VOPC_F64 <"v_cmps_nlt_f64">;
449 defm V_CMPS_TRU_F64 : VOPC_F64 <"v_cmps_tru_f64">;
451 defm V_CMPSX_F_F64 : VOPCX_F64 <"v_cmpsx_f_f64">;
452 defm V_CMPSX_LT_F64 : VOPCX_F64 <"v_cmpsx_lt_f64", "v_cmpsx_gt_f64">;
453 defm V_CMPSX_EQ_F64 : VOPCX_F64 <"v_cmpsx_eq_f64">;
454 defm V_CMPSX_LE_F64 : VOPCX_F64 <"v_cmpsx_le_f64", "v_cmpsx_ge_f64">;
455 defm V_CMPSX_GT_F64 : VOPCX_F64 <"v_cmpsx_gt_f64">;
456 defm V_CMPSX_LG_F64 : VOPCX_F64 <"v_cmpsx_lg_f64">;
457 defm V_CMPSX_GE_F64 : VOPCX_F64 <"v_cmpsx_ge_f64">;
458 defm V_CMPSX_O_F64 : VOPCX_F64 <"v_cmpsx_o_f64">;
459 defm V_CMPSX_U_F64 : VOPCX_F64 <"v_cmpsx_u_f64">;
460 defm V_CMPSX_NGE_F64 : VOPCX_F64 <"v_cmpsx_nge_f64", "v_cmpsx_nle_f64">;
461 defm V_CMPSX_NLG_F64 : VOPCX_F64 <"v_cmpsx_nlg_f64">;
462 defm V_CMPSX_NGT_F64 : VOPCX_F64 <"v_cmpsx_ngt_f64", "v_cmpsx_nlt_f64">;
463 defm V_CMPSX_NLE_F64 : VOPCX_F64 <"v_cmpsx_nle_f64">;
464 defm V_CMPSX_NEQ_F64 : VOPCX_F64 <"v_cmpsx_neq_f64">;
465 defm V_CMPSX_NLT_F64 : VOPCX_F64 <"v_cmpsx_nlt_f64">;
466 defm V_CMPSX_TRU_F64 : VOPCX_F64 <"v_cmpsx_tru_f64">;
468 } // End SubtargetPredicate = isGFX6GFX7
470 let SubtargetPredicate = Has16BitInsts in {
472 defm V_CMP_F_F16    : VOPC_F16 <"v_cmp_f_f16">;
473 defm V_CMP_LT_F16   : VOPC_F16 <"v_cmp_lt_f16", COND_OLT, "v_cmp_gt_f16">;
474 defm V_CMP_EQ_F16   : VOPC_F16 <"v_cmp_eq_f16", COND_OEQ>;
475 defm V_CMP_LE_F16   : VOPC_F16 <"v_cmp_le_f16", COND_OLE, "v_cmp_ge_f16">;
476 defm V_CMP_GT_F16   : VOPC_F16 <"v_cmp_gt_f16", COND_OGT>;
477 defm V_CMP_LG_F16   : VOPC_F16 <"v_cmp_lg_f16", COND_ONE>;
478 defm V_CMP_GE_F16   : VOPC_F16 <"v_cmp_ge_f16", COND_OGE>;
479 defm V_CMP_O_F16    : VOPC_F16 <"v_cmp_o_f16", COND_O>;
480 defm V_CMP_U_F16    : VOPC_F16 <"v_cmp_u_f16", COND_UO>;
481 defm V_CMP_NGE_F16  : VOPC_F16 <"v_cmp_nge_f16", COND_ULT, "v_cmp_nle_f16">;
482 defm V_CMP_NLG_F16  : VOPC_F16 <"v_cmp_nlg_f16", COND_UEQ>;
483 defm V_CMP_NGT_F16  : VOPC_F16 <"v_cmp_ngt_f16", COND_ULE, "v_cmp_nlt_f16">;
484 defm V_CMP_NLE_F16  : VOPC_F16 <"v_cmp_nle_f16", COND_UGT>;
485 defm V_CMP_NEQ_F16  : VOPC_F16 <"v_cmp_neq_f16", COND_UNE>;
486 defm V_CMP_NLT_F16  : VOPC_F16 <"v_cmp_nlt_f16", COND_UGE>;
487 defm V_CMP_TRU_F16  : VOPC_F16 <"v_cmp_tru_f16">;
489 defm V_CMPX_F_F16   : VOPCX_F16 <"v_cmpx_f_f16">;
490 defm V_CMPX_LT_F16  : VOPCX_F16 <"v_cmpx_lt_f16", "v_cmpx_gt_f16">;
491 defm V_CMPX_EQ_F16  : VOPCX_F16 <"v_cmpx_eq_f16">;
492 defm V_CMPX_LE_F16  : VOPCX_F16 <"v_cmpx_le_f16", "v_cmpx_ge_f16">;
493 defm V_CMPX_GT_F16  : VOPCX_F16 <"v_cmpx_gt_f16">;
494 defm V_CMPX_LG_F16  : VOPCX_F16 <"v_cmpx_lg_f16">;
495 defm V_CMPX_GE_F16  : VOPCX_F16 <"v_cmpx_ge_f16">;
496 defm V_CMPX_O_F16   : VOPCX_F16 <"v_cmpx_o_f16">;
497 defm V_CMPX_U_F16   : VOPCX_F16 <"v_cmpx_u_f16">;
498 defm V_CMPX_NGE_F16 : VOPCX_F16 <"v_cmpx_nge_f16", "v_cmpx_nle_f16">;
499 defm V_CMPX_NLG_F16 : VOPCX_F16 <"v_cmpx_nlg_f16">;
500 defm V_CMPX_NGT_F16 : VOPCX_F16 <"v_cmpx_ngt_f16", "v_cmpx_nlt_f16">;
501 defm V_CMPX_NLE_F16 : VOPCX_F16 <"v_cmpx_nle_f16">;
502 defm V_CMPX_NEQ_F16 : VOPCX_F16 <"v_cmpx_neq_f16">;
503 defm V_CMPX_NLT_F16 : VOPCX_F16 <"v_cmpx_nlt_f16">;
504 defm V_CMPX_TRU_F16 : VOPCX_F16 <"v_cmpx_tru_f16">;
506 defm V_CMP_F_I16 : VOPC_I16 <"v_cmp_f_i16">;
507 defm V_CMP_LT_I16 : VOPC_I16 <"v_cmp_lt_i16", COND_SLT, "v_cmp_gt_i16">;
508 defm V_CMP_EQ_I16 : VOPC_I16 <"v_cmp_eq_i16">;
509 defm V_CMP_LE_I16 : VOPC_I16 <"v_cmp_le_i16", COND_SLE, "v_cmp_ge_i16">;
510 defm V_CMP_GT_I16 : VOPC_I16 <"v_cmp_gt_i16", COND_SGT>;
511 defm V_CMP_NE_I16 : VOPC_I16 <"v_cmp_ne_i16">;
512 defm V_CMP_GE_I16 : VOPC_I16 <"v_cmp_ge_i16", COND_SGE>;
513 defm V_CMP_T_I16 : VOPC_I16 <"v_cmp_t_i16">;
515 defm V_CMP_F_U16 : VOPC_I16 <"v_cmp_f_u16">;
516 defm V_CMP_LT_U16 : VOPC_I16 <"v_cmp_lt_u16", COND_ULT, "v_cmp_gt_u16">;
517 defm V_CMP_EQ_U16 : VOPC_I16 <"v_cmp_eq_u16", COND_EQ>;
518 defm V_CMP_LE_U16 : VOPC_I16 <"v_cmp_le_u16", COND_ULE, "v_cmp_ge_u16">;
519 defm V_CMP_GT_U16 : VOPC_I16 <"v_cmp_gt_u16", COND_UGT>;
520 defm V_CMP_NE_U16 : VOPC_I16 <"v_cmp_ne_u16", COND_NE>;
521 defm V_CMP_GE_U16 : VOPC_I16 <"v_cmp_ge_u16", COND_UGE>;
522 defm V_CMP_T_U16 : VOPC_I16 <"v_cmp_t_u16">;
524 defm V_CMPX_F_I16 : VOPCX_I16 <"v_cmpx_f_i16">;
525 defm V_CMPX_LT_I16 : VOPCX_I16 <"v_cmpx_lt_i16", "v_cmpx_gt_i16">;
526 defm V_CMPX_EQ_I16 : VOPCX_I16 <"v_cmpx_eq_i16">;
527 defm V_CMPX_LE_I16 : VOPCX_I16 <"v_cmpx_le_i16", "v_cmpx_ge_i16">;
528 defm V_CMPX_GT_I16 : VOPCX_I16 <"v_cmpx_gt_i16">;
529 defm V_CMPX_NE_I16 : VOPCX_I16 <"v_cmpx_ne_i16">;
530 defm V_CMPX_GE_I16 : VOPCX_I16 <"v_cmpx_ge_i16">;
531 defm V_CMPX_T_I16 : VOPCX_I16 <"v_cmpx_t_i16">;
532 defm V_CMPX_F_U16 : VOPCX_I16 <"v_cmpx_f_u16">;
534 defm V_CMPX_LT_U16 : VOPCX_I16 <"v_cmpx_lt_u16", "v_cmpx_gt_u16">;
535 defm V_CMPX_EQ_U16 : VOPCX_I16 <"v_cmpx_eq_u16">;
536 defm V_CMPX_LE_U16 : VOPCX_I16 <"v_cmpx_le_u16", "v_cmpx_ge_u16">;
537 defm V_CMPX_GT_U16 : VOPCX_I16 <"v_cmpx_gt_u16">;
538 defm V_CMPX_NE_U16 : VOPCX_I16 <"v_cmpx_ne_u16">;
539 defm V_CMPX_GE_U16 : VOPCX_I16 <"v_cmpx_ge_u16">;
540 defm V_CMPX_T_U16 : VOPCX_I16 <"v_cmpx_t_u16">;
542 } // End SubtargetPredicate = Has16BitInsts
544 defm V_CMP_F_I32 : VOPC_I32 <"v_cmp_f_i32">;
545 defm V_CMP_LT_I32 : VOPC_I32 <"v_cmp_lt_i32", COND_SLT, "v_cmp_gt_i32">;
546 defm V_CMP_EQ_I32 : VOPC_I32 <"v_cmp_eq_i32">;
547 defm V_CMP_LE_I32 : VOPC_I32 <"v_cmp_le_i32", COND_SLE, "v_cmp_ge_i32">;
548 defm V_CMP_GT_I32 : VOPC_I32 <"v_cmp_gt_i32", COND_SGT>;
549 defm V_CMP_NE_I32 : VOPC_I32 <"v_cmp_ne_i32">;
550 defm V_CMP_GE_I32 : VOPC_I32 <"v_cmp_ge_i32", COND_SGE>;
551 defm V_CMP_T_I32 : VOPC_I32 <"v_cmp_t_i32">;
553 defm V_CMPX_F_I32 : VOPCX_I32 <"v_cmpx_f_i32">;
554 defm V_CMPX_LT_I32 : VOPCX_I32 <"v_cmpx_lt_i32", "v_cmpx_gt_i32">;
555 defm V_CMPX_EQ_I32 : VOPCX_I32 <"v_cmpx_eq_i32">;
556 defm V_CMPX_LE_I32 : VOPCX_I32 <"v_cmpx_le_i32", "v_cmpx_ge_i32">;
557 defm V_CMPX_GT_I32 : VOPCX_I32 <"v_cmpx_gt_i32">;
558 defm V_CMPX_NE_I32 : VOPCX_I32 <"v_cmpx_ne_i32">;
559 defm V_CMPX_GE_I32 : VOPCX_I32 <"v_cmpx_ge_i32">;
560 defm V_CMPX_T_I32 : VOPCX_I32 <"v_cmpx_t_i32">;
562 defm V_CMP_F_I64 : VOPC_I64 <"v_cmp_f_i64">;
563 defm V_CMP_LT_I64 : VOPC_I64 <"v_cmp_lt_i64", COND_SLT, "v_cmp_gt_i64">;
564 defm V_CMP_EQ_I64 : VOPC_I64 <"v_cmp_eq_i64">;
565 defm V_CMP_LE_I64 : VOPC_I64 <"v_cmp_le_i64", COND_SLE, "v_cmp_ge_i64">;
566 defm V_CMP_GT_I64 : VOPC_I64 <"v_cmp_gt_i64", COND_SGT>;
567 defm V_CMP_NE_I64 : VOPC_I64 <"v_cmp_ne_i64">;
568 defm V_CMP_GE_I64 : VOPC_I64 <"v_cmp_ge_i64", COND_SGE>;
569 defm V_CMP_T_I64 : VOPC_I64 <"v_cmp_t_i64">;
571 defm V_CMPX_F_I64 : VOPCX_I64 <"v_cmpx_f_i64">;
572 defm V_CMPX_LT_I64 : VOPCX_I64 <"v_cmpx_lt_i64", "v_cmpx_gt_i64">;
573 defm V_CMPX_EQ_I64 : VOPCX_I64 <"v_cmpx_eq_i64">;
574 defm V_CMPX_LE_I64 : VOPCX_I64 <"v_cmpx_le_i64", "v_cmpx_ge_i64">;
575 defm V_CMPX_GT_I64 : VOPCX_I64 <"v_cmpx_gt_i64">;
576 defm V_CMPX_NE_I64 : VOPCX_I64 <"v_cmpx_ne_i64">;
577 defm V_CMPX_GE_I64 : VOPCX_I64 <"v_cmpx_ge_i64">;
578 defm V_CMPX_T_I64 : VOPCX_I64 <"v_cmpx_t_i64">;
580 defm V_CMP_F_U32 : VOPC_I32 <"v_cmp_f_u32">;
581 defm V_CMP_LT_U32 : VOPC_I32 <"v_cmp_lt_u32", COND_ULT, "v_cmp_gt_u32">;
582 defm V_CMP_EQ_U32 : VOPC_I32 <"v_cmp_eq_u32", COND_EQ>;
583 defm V_CMP_LE_U32 : VOPC_I32 <"v_cmp_le_u32", COND_ULE, "v_cmp_ge_u32">;
584 defm V_CMP_GT_U32 : VOPC_I32 <"v_cmp_gt_u32", COND_UGT>;
585 defm V_CMP_NE_U32 : VOPC_I32 <"v_cmp_ne_u32", COND_NE>;
586 defm V_CMP_GE_U32 : VOPC_I32 <"v_cmp_ge_u32", COND_UGE>;
587 defm V_CMP_T_U32 : VOPC_I32 <"v_cmp_t_u32">;
589 defm V_CMPX_F_U32 : VOPCX_I32 <"v_cmpx_f_u32">;
590 defm V_CMPX_LT_U32 : VOPCX_I32 <"v_cmpx_lt_u32", "v_cmpx_gt_u32">;
591 defm V_CMPX_EQ_U32 : VOPCX_I32 <"v_cmpx_eq_u32">;
592 defm V_CMPX_LE_U32 : VOPCX_I32 <"v_cmpx_le_u32", "v_cmpx_le_u32">;
593 defm V_CMPX_GT_U32 : VOPCX_I32 <"v_cmpx_gt_u32">;
594 defm V_CMPX_NE_U32 : VOPCX_I32 <"v_cmpx_ne_u32">;
595 defm V_CMPX_GE_U32 : VOPCX_I32 <"v_cmpx_ge_u32">;
596 defm V_CMPX_T_U32 : VOPCX_I32 <"v_cmpx_t_u32">;
598 defm V_CMP_F_U64 : VOPC_I64 <"v_cmp_f_u64">;
599 defm V_CMP_LT_U64 : VOPC_I64 <"v_cmp_lt_u64", COND_ULT, "v_cmp_gt_u64">;
600 defm V_CMP_EQ_U64 : VOPC_I64 <"v_cmp_eq_u64", COND_EQ>;
601 defm V_CMP_LE_U64 : VOPC_I64 <"v_cmp_le_u64", COND_ULE, "v_cmp_ge_u64">;
602 defm V_CMP_GT_U64 : VOPC_I64 <"v_cmp_gt_u64", COND_UGT>;
603 defm V_CMP_NE_U64 : VOPC_I64 <"v_cmp_ne_u64", COND_NE>;
604 defm V_CMP_GE_U64 : VOPC_I64 <"v_cmp_ge_u64", COND_UGE>;
605 defm V_CMP_T_U64 : VOPC_I64 <"v_cmp_t_u64">;
607 defm V_CMPX_F_U64 : VOPCX_I64 <"v_cmpx_f_u64">;
608 defm V_CMPX_LT_U64 : VOPCX_I64 <"v_cmpx_lt_u64", "v_cmpx_gt_u64">;
609 defm V_CMPX_EQ_U64 : VOPCX_I64 <"v_cmpx_eq_u64">;
610 defm V_CMPX_LE_U64 : VOPCX_I64 <"v_cmpx_le_u64", "v_cmpx_ge_u64">;
611 defm V_CMPX_GT_U64 : VOPCX_I64 <"v_cmpx_gt_u64">;
612 defm V_CMPX_NE_U64 : VOPCX_I64 <"v_cmpx_ne_u64">;
613 defm V_CMPX_GE_U64 : VOPCX_I64 <"v_cmpx_ge_u64">;
614 defm V_CMPX_T_U64 : VOPCX_I64 <"v_cmpx_t_u64">;
616 //===----------------------------------------------------------------------===//
617 // Class instructions
618 //===----------------------------------------------------------------------===//
620 class VOPC_Class_Profile<list<SchedReadWrite> sched, ValueType vt> :
621   VOPC_Profile<sched, vt, i32> {
622   let Ins64 = (ins Src0Mod:$src0_modifiers, Src0RC64:$src0, Src1RC64:$src1);
623   let Asm64 = "$sdst, $src0_modifiers, $src1";
625   let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0,
626                      Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1,
627                      clampmod:$clamp, src0_sel:$src0_sel, src1_sel:$src1_sel);
629   let AsmSDWA = " vcc, $src0_modifiers, $src1_modifiers$clamp $src0_sel $src1_sel";
630   let HasSrc1Mods = 0;
631   let HasClamp = 0;
632   let HasOMod = 0;
635 class VOPC_Class_NoSdst_Profile<list<SchedReadWrite> sched, ValueType vt> :
636   VOPC_Class_Profile<sched, vt> {
637   let Outs64 = (outs );
638   let OutsSDWA = (outs );
639   let InsSDWA = (ins Src0ModSDWA:$src0_modifiers, Src0SDWA:$src0,
640                      Src1ModSDWA:$src1_modifiers, Src1SDWA:$src1,
641                      src0_sel:$src0_sel, src1_sel:$src1_sel);
642   let Asm64 = "$src0_modifiers, $src1";
643   let AsmSDWA9 = "$src0_modifiers, $src1_modifiers $src0_sel $src1_sel";
644   let EmitDst = 0;
647 class getVOPCClassPat64 <VOPProfile P> {
648   list<dag> ret =
649     [(set i1:$sdst,
650       (AMDGPUfp_class
651         (P.Src0VT (VOP3Mods0Clamp0OMod P.Src0VT:$src0, i32:$src0_modifiers)),
652         P.Src1VT:$src1))];
655 // Special case for class instructions which only have modifiers on
656 // the 1st source operand.
657 multiclass VOPC_Class_Pseudos <string opName, VOPC_Profile p, bit DefExec,
658                                bit DefVcc = 1> {
659   def _e32 : VOPC_Pseudo <opName, p>,
660              VCMPXNoSDstTable<1, opName#"_e32"> {
661     let Defs = !if(DefExec, !if(DefVcc, [VCC, EXEC], [EXEC]),
662                             !if(DefVcc, [VCC], []));
663     let SchedRW = p.Schedule;
664     let isConvergent = DefExec;
665   }
667   def _e64 : VOP3_Pseudo<opName, p, getVOPCClassPat64<p>.ret>,
668              VCMPXNoSDstTable<1, opName#"_e64"> {
669     let Defs = !if(DefExec, [EXEC], []);
670     let SchedRW = p.Schedule;
671   }
673   def _sdwa : VOPC_SDWA_Pseudo <opName, p> {
674     let Defs = !if(DefExec, !if(DefVcc, [VCC, EXEC], [EXEC]),
675                             !if(DefVcc, [VCC], []));
676     let SchedRW = p.Schedule;
677     let isConvergent = DefExec;
678   }
681 let SubtargetPredicate = HasSdstCMPX in {
682 multiclass VOPCX_Class_Pseudos <string opName,
683                                 VOPC_Profile P,
684                                 VOPC_Profile P_NoSDst> :
685            VOPC_Class_Pseudos <opName, P, 1, 1> {
687   def _nosdst_e32 : VOPC_Pseudo <opName#"_nosdst", P_NoSDst, [], 0>,
688                     VCMPXNoSDstTable<0, opName#"_e32"> {
689     let Defs = [EXEC];
690     let SchedRW = P_NoSDst.Schedule;
691     let isConvergent = 1;
692     let SubtargetPredicate = HasNoSdstCMPX;
693   }
695   def _nosdst_e64 : VOP3_Pseudo<opName#"_nosdst", P_NoSDst>,
696                     VCMPXNoSDstTable<0, opName#"_e64"> {
697     let Defs = [EXEC];
698     let SchedRW = P_NoSDst.Schedule;
699     let SubtargetPredicate = HasNoSdstCMPX;
700   }
702   def _nosdst_sdwa : VOPC_SDWA_Pseudo <opName#"_nosdst", P_NoSDst> {
703     let Defs = [EXEC];
704     let SchedRW = P_NoSDst.Schedule;
705     let isConvergent = 1;
706     let SubtargetPredicate = HasNoSdstCMPX;
707   }
709 } // End SubtargetPredicate = HasSdstCMPX
711 def VOPC_I1_F16_I32 : VOPC_Class_Profile<[Write32Bit], f16>;
712 def VOPC_I1_F32_I32 : VOPC_Class_Profile<[Write32Bit], f32>;
713 def VOPC_I1_F64_I32 : VOPC_Class_Profile<[WriteDoubleAdd], f64>;
715 def VOPC_F16_I32 : VOPC_Class_NoSdst_Profile<[Write32Bit], f16>;
716 def VOPC_F32_I32 : VOPC_Class_NoSdst_Profile<[Write32Bit], f32>;
717 def VOPC_F64_I32 : VOPC_Class_NoSdst_Profile<[Write64Bit], f64>;
719 multiclass VOPC_CLASS_F16 <string opName> :
720   VOPC_Class_Pseudos <opName, VOPC_I1_F16_I32, 0>;
722 multiclass VOPCX_CLASS_F16 <string opName> :
723   VOPCX_Class_Pseudos <opName, VOPC_I1_F16_I32, VOPC_F16_I32>;
725 multiclass VOPC_CLASS_F32 <string opName> :
726   VOPC_Class_Pseudos <opName, VOPC_I1_F32_I32, 0>;
728 multiclass VOPCX_CLASS_F32 <string opName> :
729   VOPCX_Class_Pseudos <opName, VOPC_I1_F32_I32, VOPC_F32_I32>;
731 multiclass VOPC_CLASS_F64 <string opName> :
732   VOPC_Class_Pseudos <opName, VOPC_I1_F64_I32, 0>;
734 multiclass VOPCX_CLASS_F64 <string opName> :
735   VOPCX_Class_Pseudos <opName, VOPC_I1_F64_I32, VOPC_F64_I32>;
737 defm V_CMP_CLASS_F32 : VOPC_CLASS_F32 <"v_cmp_class_f32">;
738 defm V_CMPX_CLASS_F32 : VOPCX_CLASS_F32 <"v_cmpx_class_f32">;
739 defm V_CMP_CLASS_F64 : VOPC_CLASS_F64 <"v_cmp_class_f64">;
740 defm V_CMPX_CLASS_F64 : VOPCX_CLASS_F64 <"v_cmpx_class_f64">;
742 let SubtargetPredicate = Has16BitInsts in {
743 defm V_CMP_CLASS_F16  : VOPC_CLASS_F16 <"v_cmp_class_f16">;
744 defm V_CMPX_CLASS_F16 : VOPCX_CLASS_F16 <"v_cmpx_class_f16">;
747 //===----------------------------------------------------------------------===//
748 // V_ICMPIntrinsic Pattern.
749 //===----------------------------------------------------------------------===//
751 // We need to use COPY_TO_REGCLASS to w/a the problem when ReplaceAllUsesWith()
752 // complaints it cannot replace i1 <-> i64/i32 if node was not morphed in place.
753 multiclass ICMP_Pattern <PatLeaf cond, Instruction inst, ValueType vt> {
754   let WaveSizePredicate = isWave64 in
755   def : GCNPat <
756     (i64 (AMDGPUsetcc vt:$src0, vt:$src1, cond)),
757     (i64 (COPY_TO_REGCLASS (inst $src0, $src1), SReg_64))
758   >;
760   let WaveSizePredicate = isWave32 in
761   def : GCNPat <
762     (i32 (AMDGPUsetcc vt:$src0, vt:$src1, cond)),
763     (i32 (COPY_TO_REGCLASS (inst $src0, $src1), SReg_32))
764   >;
767 defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U32_e64, i32>;
768 defm : ICMP_Pattern <COND_NE, V_CMP_NE_U32_e64, i32>;
769 defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U32_e64, i32>;
770 defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U32_e64, i32>;
771 defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U32_e64, i32>;
772 defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U32_e64, i32>;
773 defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I32_e64, i32>;
774 defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I32_e64, i32>;
775 defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I32_e64, i32>;
776 defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I32_e64, i32>;
778 defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U64_e64, i64>;
779 defm : ICMP_Pattern <COND_NE, V_CMP_NE_U64_e64, i64>;
780 defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U64_e64, i64>;
781 defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U64_e64, i64>;
782 defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U64_e64, i64>;
783 defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U64_e64, i64>;
784 defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I64_e64, i64>;
785 defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I64_e64, i64>;
786 defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I64_e64, i64>;
787 defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I64_e64, i64>;
789 defm : ICMP_Pattern <COND_EQ, V_CMP_EQ_U16_e64, i16>;
790 defm : ICMP_Pattern <COND_NE, V_CMP_NE_U16_e64, i16>;
791 defm : ICMP_Pattern <COND_UGT, V_CMP_GT_U16_e64, i16>;
792 defm : ICMP_Pattern <COND_UGE, V_CMP_GE_U16_e64, i16>;
793 defm : ICMP_Pattern <COND_ULT, V_CMP_LT_U16_e64, i16>;
794 defm : ICMP_Pattern <COND_ULE, V_CMP_LE_U16_e64, i16>;
795 defm : ICMP_Pattern <COND_SGT, V_CMP_GT_I16_e64, i16>;
796 defm : ICMP_Pattern <COND_SGE, V_CMP_GE_I16_e64, i16>;
797 defm : ICMP_Pattern <COND_SLT, V_CMP_LT_I16_e64, i16>;
798 defm : ICMP_Pattern <COND_SLE, V_CMP_LE_I16_e64, i16>;
800 multiclass FCMP_Pattern <PatLeaf cond, Instruction inst, ValueType vt> {
801   let WaveSizePredicate = isWave64 in
802   def : GCNPat <
803     (i64 (AMDGPUsetcc (vt (VOP3Mods vt:$src0, i32:$src0_modifiers)),
804                  (vt (VOP3Mods vt:$src1, i32:$src1_modifiers)), cond)),
805     (i64 (COPY_TO_REGCLASS (inst $src0_modifiers, $src0, $src1_modifiers, $src1,
806                            DSTCLAMP.NONE), SReg_64))
807   >;
809   let WaveSizePredicate = isWave32 in
810   def : GCNPat <
811     (i32 (AMDGPUsetcc (vt (VOP3Mods vt:$src0, i32:$src0_modifiers)),
812                  (vt (VOP3Mods vt:$src1, i32:$src1_modifiers)), cond)),
813     (i32 (COPY_TO_REGCLASS (inst $src0_modifiers, $src0, $src1_modifiers, $src1,
814                            DSTCLAMP.NONE), SReg_32))
815   >;
818 defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F32_e64, f32>;
819 defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F32_e64, f32>;
820 defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F32_e64, f32>;
821 defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F32_e64, f32>;
822 defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F32_e64, f32>;
823 defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F32_e64, f32>;
825 defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F64_e64, f64>;
826 defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F64_e64, f64>;
827 defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F64_e64, f64>;
828 defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F64_e64, f64>;
829 defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F64_e64, f64>;
830 defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F64_e64, f64>;
832 defm : FCMP_Pattern <COND_OEQ, V_CMP_EQ_F16_e64, f16>;
833 defm : FCMP_Pattern <COND_ONE, V_CMP_NEQ_F16_e64, f16>;
834 defm : FCMP_Pattern <COND_OGT, V_CMP_GT_F16_e64, f16>;
835 defm : FCMP_Pattern <COND_OGE, V_CMP_GE_F16_e64, f16>;
836 defm : FCMP_Pattern <COND_OLT, V_CMP_LT_F16_e64, f16>;
837 defm : FCMP_Pattern <COND_OLE, V_CMP_LE_F16_e64, f16>;
840 defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F32_e64, f32>;
841 defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F32_e64, f32>;
842 defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F32_e64, f32>;
843 defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F32_e64, f32>;
844 defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F32_e64, f32>;
845 defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F32_e64, f32>;
847 defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F64_e64, f64>;
848 defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F64_e64, f64>;
849 defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F64_e64, f64>;
850 defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F64_e64, f64>;
851 defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F64_e64, f64>;
852 defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F64_e64, f64>;
854 defm : FCMP_Pattern <COND_UEQ, V_CMP_NLG_F16_e64, f16>;
855 defm : FCMP_Pattern <COND_UNE, V_CMP_NEQ_F16_e64, f16>;
856 defm : FCMP_Pattern <COND_UGT, V_CMP_NLE_F16_e64, f16>;
857 defm : FCMP_Pattern <COND_UGE, V_CMP_NLT_F16_e64, f16>;
858 defm : FCMP_Pattern <COND_ULT, V_CMP_NGE_F16_e64, f16>;
859 defm : FCMP_Pattern <COND_ULE, V_CMP_NGT_F16_e64, f16>;
861 //===----------------------------------------------------------------------===//
862 // Target-specific instruction encodings.
863 //===----------------------------------------------------------------------===//
865 //===----------------------------------------------------------------------===//
866 // GFX10.
867 //===----------------------------------------------------------------------===//
869 let AssemblerPredicate = isGFX10Plus in {
870   multiclass VOPC_Real_gfx10<bits<9> op> {
871     let DecoderNamespace = "GFX10" in {
872       def _e32_gfx10 :
873         VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.GFX10>,
874         VOPCe<op{7-0}>;
875       def _e64_gfx10 :
876         VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.GFX10>,
877         VOP3a_gfx10<{0, op}, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> {
878         // Encoding used for VOPC instructions encoded as VOP3 differs from
879         // VOP3e by destination name (sdst) as VOPC doesn't have vector dst.
880         bits<8> sdst;
881         let Inst{7-0} = sdst;
882       }
883     } // End DecoderNamespace = "GFX10"
885     def _sdwa_gfx10 :
886       VOP_SDWA10_Real<!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>,
887       VOPC_SDWA9e<op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>;
889     defm : VOPCInstAliases<NAME, "gfx10">;
890   }
892   multiclass VOPCX_Real_gfx10<bits<9> op> {
893     let DecoderNamespace = "GFX10" in {
894       def _e32_gfx10 :
895         VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_nosdst_e32"), SIEncodingFamily.GFX10>,
896         VOPCe<op{7-0}> {
897           let AsmString = !subst("_nosdst", "", !cast<VOPC_Pseudo>(NAME#"_nosdst_e32").PseudoInstr)
898                           # " " # !cast<VOPC_Pseudo>(NAME#"_nosdst_e32").AsmOperands;
899         }
901       def _e64_gfx10 :
902         VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_nosdst_e64"), SIEncodingFamily.GFX10>,
903         VOP3a_gfx10<{0, op}, !cast<VOP3_Pseudo>(NAME#"_nosdst_e64").Pfl> {
904           let Inst{7-0} = ?; // sdst
905           let AsmString = !subst("_nosdst", "", !cast<VOP3_Pseudo>(NAME#"_nosdst_e64").Mnemonic)
906                           # "{_e64} " # !cast<VOP3_Pseudo>(NAME#"_nosdst_e64").AsmOperands;
907         }
908     } // End DecoderNamespace = "GFX10"
910     def _sdwa_gfx10 :
911       VOP_SDWA10_Real<!cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa")>,
912       VOPC_SDWA9e<op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa").Pfl> {
913         let AsmString = !subst("_nosdst", "", !cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa").Mnemonic)
914                         # "{_sdwa} " # !cast<VOPC_SDWA_Pseudo>(NAME#"_nosdst_sdwa").AsmOperands9;
915       }
917     defm : VOPCXInstAliases<NAME, "gfx10">;
918   }
919 } // End AssemblerPredicate = isGFX10Plus
921 defm V_CMP_LT_I16     : VOPC_Real_gfx10<0x089>;
922 defm V_CMP_EQ_I16     : VOPC_Real_gfx10<0x08a>;
923 defm V_CMP_LE_I16     : VOPC_Real_gfx10<0x08b>;
924 defm V_CMP_GT_I16     : VOPC_Real_gfx10<0x08c>;
925 defm V_CMP_NE_I16     : VOPC_Real_gfx10<0x08d>;
926 defm V_CMP_GE_I16     : VOPC_Real_gfx10<0x08e>;
927 defm V_CMP_CLASS_F16  : VOPC_Real_gfx10<0x08f>;
928 defm V_CMPX_LT_I16    : VOPCX_Real_gfx10<0x099>;
929 defm V_CMPX_EQ_I16    : VOPCX_Real_gfx10<0x09a>;
930 defm V_CMPX_LE_I16    : VOPCX_Real_gfx10<0x09b>;
931 defm V_CMPX_GT_I16    : VOPCX_Real_gfx10<0x09c>;
932 defm V_CMPX_NE_I16    : VOPCX_Real_gfx10<0x09d>;
933 defm V_CMPX_GE_I16    : VOPCX_Real_gfx10<0x09e>;
934 defm V_CMPX_CLASS_F16 : VOPCX_Real_gfx10<0x09f>;
935 defm V_CMP_LT_U16     : VOPC_Real_gfx10<0x0a9>;
936 defm V_CMP_EQ_U16     : VOPC_Real_gfx10<0x0aa>;
937 defm V_CMP_LE_U16     : VOPC_Real_gfx10<0x0ab>;
938 defm V_CMP_GT_U16     : VOPC_Real_gfx10<0x0ac>;
939 defm V_CMP_NE_U16     : VOPC_Real_gfx10<0x0ad>;
940 defm V_CMP_GE_U16     : VOPC_Real_gfx10<0x0ae>;
941 defm V_CMPX_LT_U16    : VOPCX_Real_gfx10<0x0b9>;
942 defm V_CMPX_EQ_U16    : VOPCX_Real_gfx10<0x0ba>;
943 defm V_CMPX_LE_U16    : VOPCX_Real_gfx10<0x0bb>;
944 defm V_CMPX_GT_U16    : VOPCX_Real_gfx10<0x0bc>;
945 defm V_CMPX_NE_U16    : VOPCX_Real_gfx10<0x0bd>;
946 defm V_CMPX_GE_U16    : VOPCX_Real_gfx10<0x0be>;
947 defm V_CMP_F_F16      : VOPC_Real_gfx10<0x0c8>;
948 defm V_CMP_LT_F16     : VOPC_Real_gfx10<0x0c9>;
949 defm V_CMP_EQ_F16     : VOPC_Real_gfx10<0x0ca>;
950 defm V_CMP_LE_F16     : VOPC_Real_gfx10<0x0cb>;
951 defm V_CMP_GT_F16     : VOPC_Real_gfx10<0x0cc>;
952 defm V_CMP_LG_F16     : VOPC_Real_gfx10<0x0cd>;
953 defm V_CMP_GE_F16     : VOPC_Real_gfx10<0x0ce>;
954 defm V_CMP_O_F16      : VOPC_Real_gfx10<0x0cf>;
955 defm V_CMPX_F_F16     : VOPCX_Real_gfx10<0x0d8>;
956 defm V_CMPX_LT_F16    : VOPCX_Real_gfx10<0x0d9>;
957 defm V_CMPX_EQ_F16    : VOPCX_Real_gfx10<0x0da>;
958 defm V_CMPX_LE_F16    : VOPCX_Real_gfx10<0x0db>;
959 defm V_CMPX_GT_F16    : VOPCX_Real_gfx10<0x0dc>;
960 defm V_CMPX_LG_F16    : VOPCX_Real_gfx10<0x0dd>;
961 defm V_CMPX_GE_F16    : VOPCX_Real_gfx10<0x0de>;
962 defm V_CMPX_O_F16     : VOPCX_Real_gfx10<0x0df>;
963 defm V_CMP_U_F16      : VOPC_Real_gfx10<0x0e8>;
964 defm V_CMP_NGE_F16    : VOPC_Real_gfx10<0x0e9>;
965 defm V_CMP_NLG_F16    : VOPC_Real_gfx10<0x0ea>;
966 defm V_CMP_NGT_F16    : VOPC_Real_gfx10<0x0eb>;
967 defm V_CMP_NLE_F16    : VOPC_Real_gfx10<0x0ec>;
968 defm V_CMP_NEQ_F16    : VOPC_Real_gfx10<0x0ed>;
969 defm V_CMP_NLT_F16    : VOPC_Real_gfx10<0x0ee>;
970 defm V_CMP_TRU_F16    : VOPC_Real_gfx10<0x0ef>;
971 defm V_CMPX_U_F16     : VOPCX_Real_gfx10<0x0f8>;
972 defm V_CMPX_NGE_F16   : VOPCX_Real_gfx10<0x0f9>;
973 defm V_CMPX_NLG_F16   : VOPCX_Real_gfx10<0x0fa>;
974 defm V_CMPX_NGT_F16   : VOPCX_Real_gfx10<0x0fb>;
975 defm V_CMPX_NLE_F16   : VOPCX_Real_gfx10<0x0fc>;
976 defm V_CMPX_NEQ_F16   : VOPCX_Real_gfx10<0x0fd>;
977 defm V_CMPX_NLT_F16   : VOPCX_Real_gfx10<0x0fe>;
978 defm V_CMPX_TRU_F16   : VOPCX_Real_gfx10<0x0ff>;
980 //===----------------------------------------------------------------------===//
981 // GFX6, GFX7, GFX10.
982 //===----------------------------------------------------------------------===//
984 let AssemblerPredicate = isGFX6GFX7 in {
985   multiclass VOPC_Real_gfx6_gfx7<bits<9> op> {
986     let DecoderNamespace = "GFX6GFX7" in {
987       def _e32_gfx6_gfx7 :
988         VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.SI>,
989         VOPCe<op{7-0}>;
990       def _e64_gfx6_gfx7 :
991         VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.SI>,
992         VOP3a_gfx6_gfx7<op, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> {
993         // Encoding used for VOPC instructions encoded as VOP3 differs from
994         // VOP3e by destination name (sdst) as VOPC doesn't have vector dst.
995         bits<8> sdst;
996         let Inst{7-0} = sdst;
997       }
998     } // End DecoderNamespace = "GFX6GFX7"
1000     defm : VOPCInstAliases<NAME, "gfx6_gfx7">;
1001   }
1002 } // End AssemblerPredicate = isGFX6GFX7
1004 multiclass VOPC_Real_gfx6_gfx7_gfx10<bits<9> op> :
1005   VOPC_Real_gfx6_gfx7<op>, VOPC_Real_gfx10<op>;
1007 multiclass VOPCX_Real_gfx6_gfx7<bits<9> op> :
1008   VOPC_Real_gfx6_gfx7<op>;
1010 multiclass VOPCX_Real_gfx6_gfx7_gfx10 <bits<9> op> :
1011   VOPC_Real_gfx6_gfx7<op>, VOPCX_Real_gfx10<op>;
1013 defm V_CMP_F_F32      : VOPC_Real_gfx6_gfx7_gfx10<0x000>;
1014 defm V_CMP_LT_F32     : VOPC_Real_gfx6_gfx7_gfx10<0x001>;
1015 defm V_CMP_EQ_F32     : VOPC_Real_gfx6_gfx7_gfx10<0x002>;
1016 defm V_CMP_LE_F32     : VOPC_Real_gfx6_gfx7_gfx10<0x003>;
1017 defm V_CMP_GT_F32     : VOPC_Real_gfx6_gfx7_gfx10<0x004>;
1018 defm V_CMP_LG_F32     : VOPC_Real_gfx6_gfx7_gfx10<0x005>;
1019 defm V_CMP_GE_F32     : VOPC_Real_gfx6_gfx7_gfx10<0x006>;
1020 defm V_CMP_O_F32      : VOPC_Real_gfx6_gfx7_gfx10<0x007>;
1021 defm V_CMP_U_F32      : VOPC_Real_gfx6_gfx7_gfx10<0x008>;
1022 defm V_CMP_NGE_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x009>;
1023 defm V_CMP_NLG_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x00a>;
1024 defm V_CMP_NGT_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x00b>;
1025 defm V_CMP_NLE_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x00c>;
1026 defm V_CMP_NEQ_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x00d>;
1027 defm V_CMP_NLT_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x00e>;
1028 defm V_CMP_TRU_F32    : VOPC_Real_gfx6_gfx7_gfx10<0x00f>;
1029 defm V_CMPX_F_F32     : VOPCX_Real_gfx6_gfx7_gfx10<0x010>;
1030 defm V_CMPX_LT_F32    : VOPCX_Real_gfx6_gfx7_gfx10<0x011>;
1031 defm V_CMPX_EQ_F32    : VOPCX_Real_gfx6_gfx7_gfx10<0x012>;
1032 defm V_CMPX_LE_F32    : VOPCX_Real_gfx6_gfx7_gfx10<0x013>;
1033 defm V_CMPX_GT_F32    : VOPCX_Real_gfx6_gfx7_gfx10<0x014>;
1034 defm V_CMPX_LG_F32    : VOPCX_Real_gfx6_gfx7_gfx10<0x015>;
1035 defm V_CMPX_GE_F32    : VOPCX_Real_gfx6_gfx7_gfx10<0x016>;
1036 defm V_CMPX_O_F32     : VOPCX_Real_gfx6_gfx7_gfx10<0x017>;
1037 defm V_CMPX_U_F32     : VOPCX_Real_gfx6_gfx7_gfx10<0x018>;
1038 defm V_CMPX_NGE_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x019>;
1039 defm V_CMPX_NLG_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x01a>;
1040 defm V_CMPX_NGT_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x01b>;
1041 defm V_CMPX_NLE_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x01c>;
1042 defm V_CMPX_NEQ_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x01d>;
1043 defm V_CMPX_NLT_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x01e>;
1044 defm V_CMPX_TRU_F32   : VOPCX_Real_gfx6_gfx7_gfx10<0x01f>;
1045 defm V_CMP_F_F64      : VOPC_Real_gfx6_gfx7_gfx10<0x020>;
1046 defm V_CMP_LT_F64     : VOPC_Real_gfx6_gfx7_gfx10<0x021>;
1047 defm V_CMP_EQ_F64     : VOPC_Real_gfx6_gfx7_gfx10<0x022>;
1048 defm V_CMP_LE_F64     : VOPC_Real_gfx6_gfx7_gfx10<0x023>;
1049 defm V_CMP_GT_F64     : VOPC_Real_gfx6_gfx7_gfx10<0x024>;
1050 defm V_CMP_LG_F64     : VOPC_Real_gfx6_gfx7_gfx10<0x025>;
1051 defm V_CMP_GE_F64     : VOPC_Real_gfx6_gfx7_gfx10<0x026>;
1052 defm V_CMP_O_F64      : VOPC_Real_gfx6_gfx7_gfx10<0x027>;
1053 defm V_CMP_U_F64      : VOPC_Real_gfx6_gfx7_gfx10<0x028>;
1054 defm V_CMP_NGE_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x029>;
1055 defm V_CMP_NLG_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x02a>;
1056 defm V_CMP_NGT_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x02b>;
1057 defm V_CMP_NLE_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x02c>;
1058 defm V_CMP_NEQ_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x02d>;
1059 defm V_CMP_NLT_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x02e>;
1060 defm V_CMP_TRU_F64    : VOPC_Real_gfx6_gfx7_gfx10<0x02f>;
1061 defm V_CMPX_F_F64     : VOPCX_Real_gfx6_gfx7_gfx10<0x030>;
1062 defm V_CMPX_LT_F64    : VOPCX_Real_gfx6_gfx7_gfx10<0x031>;
1063 defm V_CMPX_EQ_F64    : VOPCX_Real_gfx6_gfx7_gfx10<0x032>;
1064 defm V_CMPX_LE_F64    : VOPCX_Real_gfx6_gfx7_gfx10<0x033>;
1065 defm V_CMPX_GT_F64    : VOPCX_Real_gfx6_gfx7_gfx10<0x034>;
1066 defm V_CMPX_LG_F64    : VOPCX_Real_gfx6_gfx7_gfx10<0x035>;
1067 defm V_CMPX_GE_F64    : VOPCX_Real_gfx6_gfx7_gfx10<0x036>;
1068 defm V_CMPX_O_F64     : VOPCX_Real_gfx6_gfx7_gfx10<0x037>;
1069 defm V_CMPX_U_F64     : VOPCX_Real_gfx6_gfx7_gfx10<0x038>;
1070 defm V_CMPX_NGE_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x039>;
1071 defm V_CMPX_NLG_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x03a>;
1072 defm V_CMPX_NGT_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x03b>;
1073 defm V_CMPX_NLE_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x03c>;
1074 defm V_CMPX_NEQ_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x03d>;
1075 defm V_CMPX_NLT_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x03e>;
1076 defm V_CMPX_TRU_F64   : VOPCX_Real_gfx6_gfx7_gfx10<0x03f>;
1077 defm V_CMPS_F_F32     : VOPC_Real_gfx6_gfx7<0x040>;
1078 defm V_CMPS_LT_F32    : VOPC_Real_gfx6_gfx7<0x041>;
1079 defm V_CMPS_EQ_F32    : VOPC_Real_gfx6_gfx7<0x042>;
1080 defm V_CMPS_LE_F32    : VOPC_Real_gfx6_gfx7<0x043>;
1081 defm V_CMPS_GT_F32    : VOPC_Real_gfx6_gfx7<0x044>;
1082 defm V_CMPS_LG_F32    : VOPC_Real_gfx6_gfx7<0x045>;
1083 defm V_CMPS_GE_F32    : VOPC_Real_gfx6_gfx7<0x046>;
1084 defm V_CMPS_O_F32     : VOPC_Real_gfx6_gfx7<0x047>;
1085 defm V_CMPS_U_F32     : VOPC_Real_gfx6_gfx7<0x048>;
1086 defm V_CMPS_NGE_F32   : VOPC_Real_gfx6_gfx7<0x049>;
1087 defm V_CMPS_NLG_F32   : VOPC_Real_gfx6_gfx7<0x04a>;
1088 defm V_CMPS_NGT_F32   : VOPC_Real_gfx6_gfx7<0x04b>;
1089 defm V_CMPS_NLE_F32   : VOPC_Real_gfx6_gfx7<0x04c>;
1090 defm V_CMPS_NEQ_F32   : VOPC_Real_gfx6_gfx7<0x04d>;
1091 defm V_CMPS_NLT_F32   : VOPC_Real_gfx6_gfx7<0x04e>;
1092 defm V_CMPS_TRU_F32   : VOPC_Real_gfx6_gfx7<0x04f>;
1093 defm V_CMPSX_F_F32    : VOPCX_Real_gfx6_gfx7<0x050>;
1094 defm V_CMPSX_LT_F32   : VOPCX_Real_gfx6_gfx7<0x051>;
1095 defm V_CMPSX_EQ_F32   : VOPCX_Real_gfx6_gfx7<0x052>;
1096 defm V_CMPSX_LE_F32   : VOPCX_Real_gfx6_gfx7<0x053>;
1097 defm V_CMPSX_GT_F32   : VOPCX_Real_gfx6_gfx7<0x054>;
1098 defm V_CMPSX_LG_F32   : VOPCX_Real_gfx6_gfx7<0x055>;
1099 defm V_CMPSX_GE_F32   : VOPCX_Real_gfx6_gfx7<0x056>;
1100 defm V_CMPSX_O_F32    : VOPCX_Real_gfx6_gfx7<0x057>;
1101 defm V_CMPSX_U_F32    : VOPCX_Real_gfx6_gfx7<0x058>;
1102 defm V_CMPSX_NGE_F32  : VOPCX_Real_gfx6_gfx7<0x059>;
1103 defm V_CMPSX_NLG_F32  : VOPCX_Real_gfx6_gfx7<0x05a>;
1104 defm V_CMPSX_NGT_F32  : VOPCX_Real_gfx6_gfx7<0x05b>;
1105 defm V_CMPSX_NLE_F32  : VOPCX_Real_gfx6_gfx7<0x05c>;
1106 defm V_CMPSX_NEQ_F32  : VOPCX_Real_gfx6_gfx7<0x05d>;
1107 defm V_CMPSX_NLT_F32  : VOPCX_Real_gfx6_gfx7<0x05e>;
1108 defm V_CMPSX_TRU_F32  : VOPCX_Real_gfx6_gfx7<0x05f>;
1109 defm V_CMPS_F_F64     : VOPC_Real_gfx6_gfx7<0x060>;
1110 defm V_CMPS_LT_F64    : VOPC_Real_gfx6_gfx7<0x061>;
1111 defm V_CMPS_EQ_F64    : VOPC_Real_gfx6_gfx7<0x062>;
1112 defm V_CMPS_LE_F64    : VOPC_Real_gfx6_gfx7<0x063>;
1113 defm V_CMPS_GT_F64    : VOPC_Real_gfx6_gfx7<0x064>;
1114 defm V_CMPS_LG_F64    : VOPC_Real_gfx6_gfx7<0x065>;
1115 defm V_CMPS_GE_F64    : VOPC_Real_gfx6_gfx7<0x066>;
1116 defm V_CMPS_O_F64     : VOPC_Real_gfx6_gfx7<0x067>;
1117 defm V_CMPS_U_F64     : VOPC_Real_gfx6_gfx7<0x068>;
1118 defm V_CMPS_NGE_F64   : VOPC_Real_gfx6_gfx7<0x069>;
1119 defm V_CMPS_NLG_F64   : VOPC_Real_gfx6_gfx7<0x06a>;
1120 defm V_CMPS_NGT_F64   : VOPC_Real_gfx6_gfx7<0x06b>;
1121 defm V_CMPS_NLE_F64   : VOPC_Real_gfx6_gfx7<0x06c>;
1122 defm V_CMPS_NEQ_F64   : VOPC_Real_gfx6_gfx7<0x06d>;
1123 defm V_CMPS_NLT_F64   : VOPC_Real_gfx6_gfx7<0x06e>;
1124 defm V_CMPS_TRU_F64   : VOPC_Real_gfx6_gfx7<0x06f>;
1125 defm V_CMPSX_F_F64    : VOPCX_Real_gfx6_gfx7<0x070>;
1126 defm V_CMPSX_LT_F64   : VOPCX_Real_gfx6_gfx7<0x071>;
1127 defm V_CMPSX_EQ_F64   : VOPCX_Real_gfx6_gfx7<0x072>;
1128 defm V_CMPSX_LE_F64   : VOPCX_Real_gfx6_gfx7<0x073>;
1129 defm V_CMPSX_GT_F64   : VOPCX_Real_gfx6_gfx7<0x074>;
1130 defm V_CMPSX_LG_F64   : VOPCX_Real_gfx6_gfx7<0x075>;
1131 defm V_CMPSX_GE_F64   : VOPCX_Real_gfx6_gfx7<0x076>;
1132 defm V_CMPSX_O_F64    : VOPCX_Real_gfx6_gfx7<0x077>;
1133 defm V_CMPSX_U_F64    : VOPCX_Real_gfx6_gfx7<0x078>;
1134 defm V_CMPSX_NGE_F64  : VOPCX_Real_gfx6_gfx7<0x079>;
1135 defm V_CMPSX_NLG_F64  : VOPCX_Real_gfx6_gfx7<0x07a>;
1136 defm V_CMPSX_NGT_F64  : VOPCX_Real_gfx6_gfx7<0x07b>;
1137 defm V_CMPSX_NLE_F64  : VOPCX_Real_gfx6_gfx7<0x07c>;
1138 defm V_CMPSX_NEQ_F64  : VOPCX_Real_gfx6_gfx7<0x07d>;
1139 defm V_CMPSX_NLT_F64  : VOPCX_Real_gfx6_gfx7<0x07e>;
1140 defm V_CMPSX_TRU_F64  : VOPCX_Real_gfx6_gfx7<0x07f>;
1141 defm V_CMP_F_I32      : VOPC_Real_gfx6_gfx7_gfx10<0x080>;
1142 defm V_CMP_LT_I32     : VOPC_Real_gfx6_gfx7_gfx10<0x081>;
1143 defm V_CMP_EQ_I32     : VOPC_Real_gfx6_gfx7_gfx10<0x082>;
1144 defm V_CMP_LE_I32     : VOPC_Real_gfx6_gfx7_gfx10<0x083>;
1145 defm V_CMP_GT_I32     : VOPC_Real_gfx6_gfx7_gfx10<0x084>;
1146 defm V_CMP_NE_I32     : VOPC_Real_gfx6_gfx7_gfx10<0x085>;
1147 defm V_CMP_GE_I32     : VOPC_Real_gfx6_gfx7_gfx10<0x086>;
1148 defm V_CMP_T_I32      : VOPC_Real_gfx6_gfx7_gfx10<0x087>;
1149 defm V_CMP_CLASS_F32  : VOPC_Real_gfx6_gfx7_gfx10<0x088>;
1150 defm V_CMPX_F_I32     : VOPCX_Real_gfx6_gfx7_gfx10<0x090>;
1151 defm V_CMPX_LT_I32    : VOPCX_Real_gfx6_gfx7_gfx10<0x091>;
1152 defm V_CMPX_EQ_I32    : VOPCX_Real_gfx6_gfx7_gfx10<0x092>;
1153 defm V_CMPX_LE_I32    : VOPCX_Real_gfx6_gfx7_gfx10<0x093>;
1154 defm V_CMPX_GT_I32    : VOPCX_Real_gfx6_gfx7_gfx10<0x094>;
1155 defm V_CMPX_NE_I32    : VOPCX_Real_gfx6_gfx7_gfx10<0x095>;
1156 defm V_CMPX_GE_I32    : VOPCX_Real_gfx6_gfx7_gfx10<0x096>;
1157 defm V_CMPX_T_I32     : VOPCX_Real_gfx6_gfx7_gfx10<0x097>;
1158 defm V_CMPX_CLASS_F32 : VOPCX_Real_gfx6_gfx7_gfx10<0x098>;
1159 defm V_CMP_F_I64      : VOPC_Real_gfx6_gfx7_gfx10<0x0a0>;
1160 defm V_CMP_LT_I64     : VOPC_Real_gfx6_gfx7_gfx10<0x0a1>;
1161 defm V_CMP_EQ_I64     : VOPC_Real_gfx6_gfx7_gfx10<0x0a2>;
1162 defm V_CMP_LE_I64     : VOPC_Real_gfx6_gfx7_gfx10<0x0a3>;
1163 defm V_CMP_GT_I64     : VOPC_Real_gfx6_gfx7_gfx10<0x0a4>;
1164 defm V_CMP_NE_I64     : VOPC_Real_gfx6_gfx7_gfx10<0x0a5>;
1165 defm V_CMP_GE_I64     : VOPC_Real_gfx6_gfx7_gfx10<0x0a6>;
1166 defm V_CMP_T_I64      : VOPC_Real_gfx6_gfx7_gfx10<0x0a7>;
1167 defm V_CMP_CLASS_F64  : VOPC_Real_gfx6_gfx7_gfx10<0x0a8>;
1168 defm V_CMPX_F_I64     : VOPCX_Real_gfx6_gfx7_gfx10<0x0b0>;
1169 defm V_CMPX_LT_I64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0b1>;
1170 defm V_CMPX_EQ_I64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0b2>;
1171 defm V_CMPX_LE_I64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0b3>;
1172 defm V_CMPX_GT_I64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0b4>;
1173 defm V_CMPX_NE_I64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0b5>;
1174 defm V_CMPX_GE_I64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0b6>;
1175 defm V_CMPX_T_I64     : VOPCX_Real_gfx6_gfx7_gfx10<0x0b7>;
1176 defm V_CMPX_CLASS_F64 : VOPCX_Real_gfx6_gfx7_gfx10<0x0b8>;
1177 defm V_CMP_F_U32      : VOPC_Real_gfx6_gfx7_gfx10<0x0c0>;
1178 defm V_CMP_LT_U32     : VOPC_Real_gfx6_gfx7_gfx10<0x0c1>;
1179 defm V_CMP_EQ_U32     : VOPC_Real_gfx6_gfx7_gfx10<0x0c2>;
1180 defm V_CMP_LE_U32     : VOPC_Real_gfx6_gfx7_gfx10<0x0c3>;
1181 defm V_CMP_GT_U32     : VOPC_Real_gfx6_gfx7_gfx10<0x0c4>;
1182 defm V_CMP_NE_U32     : VOPC_Real_gfx6_gfx7_gfx10<0x0c5>;
1183 defm V_CMP_GE_U32     : VOPC_Real_gfx6_gfx7_gfx10<0x0c6>;
1184 defm V_CMP_T_U32      : VOPC_Real_gfx6_gfx7_gfx10<0x0c7>;
1185 defm V_CMPX_F_U32     : VOPCX_Real_gfx6_gfx7_gfx10<0x0d0>;
1186 defm V_CMPX_LT_U32    : VOPCX_Real_gfx6_gfx7_gfx10<0x0d1>;
1187 defm V_CMPX_EQ_U32    : VOPCX_Real_gfx6_gfx7_gfx10<0x0d2>;
1188 defm V_CMPX_LE_U32    : VOPCX_Real_gfx6_gfx7_gfx10<0x0d3>;
1189 defm V_CMPX_GT_U32    : VOPCX_Real_gfx6_gfx7_gfx10<0x0d4>;
1190 defm V_CMPX_NE_U32    : VOPCX_Real_gfx6_gfx7_gfx10<0x0d5>;
1191 defm V_CMPX_GE_U32    : VOPCX_Real_gfx6_gfx7_gfx10<0x0d6>;
1192 defm V_CMPX_T_U32     : VOPCX_Real_gfx6_gfx7_gfx10<0x0d7>;
1193 defm V_CMP_F_U64      : VOPC_Real_gfx6_gfx7_gfx10<0x0e0>;
1194 defm V_CMP_LT_U64     : VOPC_Real_gfx6_gfx7_gfx10<0x0e1>;
1195 defm V_CMP_EQ_U64     : VOPC_Real_gfx6_gfx7_gfx10<0x0e2>;
1196 defm V_CMP_LE_U64     : VOPC_Real_gfx6_gfx7_gfx10<0x0e3>;
1197 defm V_CMP_GT_U64     : VOPC_Real_gfx6_gfx7_gfx10<0x0e4>;
1198 defm V_CMP_NE_U64     : VOPC_Real_gfx6_gfx7_gfx10<0x0e5>;
1199 defm V_CMP_GE_U64     : VOPC_Real_gfx6_gfx7_gfx10<0x0e6>;
1200 defm V_CMP_T_U64      : VOPC_Real_gfx6_gfx7_gfx10<0x0e7>;
1201 defm V_CMPX_F_U64     : VOPCX_Real_gfx6_gfx7_gfx10<0x0f0>;
1202 defm V_CMPX_LT_U64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0f1>;
1203 defm V_CMPX_EQ_U64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0f2>;
1204 defm V_CMPX_LE_U64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0f3>;
1205 defm V_CMPX_GT_U64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0f4>;
1206 defm V_CMPX_NE_U64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0f5>;
1207 defm V_CMPX_GE_U64    : VOPCX_Real_gfx6_gfx7_gfx10<0x0f6>;
1208 defm V_CMPX_T_U64     : VOPCX_Real_gfx6_gfx7_gfx10<0x0f7>;
1210 //===----------------------------------------------------------------------===//
1211 // GFX8, GFX9 (VI).
1212 //===----------------------------------------------------------------------===//
1214 multiclass VOPC_Real_vi <bits<10> op> {
1215   let AssemblerPredicates = [isGFX8GFX9], DecoderNamespace = "GFX8" in {
1216     def _e32_vi :
1217       VOPC_Real<!cast<VOPC_Pseudo>(NAME#"_e32"), SIEncodingFamily.VI>,
1218       VOPCe<op{7-0}>;
1220     def _e64_vi :
1221       VOP3_Real<!cast<VOP3_Pseudo>(NAME#"_e64"), SIEncodingFamily.VI>,
1222       VOP3a_vi <op, !cast<VOP3_Pseudo>(NAME#"_e64").Pfl> {
1223       // Encoding used for VOPC instructions encoded as VOP3
1224       // Differs from VOP3e by destination name (sdst) as VOPC doesn't have vector dst
1225       bits<8> sdst;
1226       let Inst{7-0} = sdst;
1227     }
1228   }
1230   def _sdwa_vi :
1231     VOP_SDWA_Real <!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>,
1232     VOPC_SDWAe <op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>;
1234   def _sdwa_gfx9 :
1235     VOP_SDWA9_Real <!cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa")>,
1236     VOPC_SDWA9e <op{7-0}, !cast<VOPC_SDWA_Pseudo>(NAME#"_sdwa").Pfl>;
1238   let AssemblerPredicate = isGFX8GFX9 in {
1239     defm : VOPCInstAliases<NAME, "vi">;
1240   }
1243 defm V_CMP_CLASS_F32  : VOPC_Real_vi <0x10>;
1244 defm V_CMPX_CLASS_F32 : VOPC_Real_vi <0x11>;
1245 defm V_CMP_CLASS_F64  : VOPC_Real_vi <0x12>;
1246 defm V_CMPX_CLASS_F64 : VOPC_Real_vi <0x13>;
1247 defm V_CMP_CLASS_F16  : VOPC_Real_vi <0x14>;
1248 defm V_CMPX_CLASS_F16 : VOPC_Real_vi <0x15>;
1250 defm V_CMP_F_F16      : VOPC_Real_vi <0x20>;
1251 defm V_CMP_LT_F16     : VOPC_Real_vi <0x21>;
1252 defm V_CMP_EQ_F16     : VOPC_Real_vi <0x22>;
1253 defm V_CMP_LE_F16     : VOPC_Real_vi <0x23>;
1254 defm V_CMP_GT_F16     : VOPC_Real_vi <0x24>;
1255 defm V_CMP_LG_F16     : VOPC_Real_vi <0x25>;
1256 defm V_CMP_GE_F16     : VOPC_Real_vi <0x26>;
1257 defm V_CMP_O_F16      : VOPC_Real_vi <0x27>;
1258 defm V_CMP_U_F16      : VOPC_Real_vi <0x28>;
1259 defm V_CMP_NGE_F16    : VOPC_Real_vi <0x29>;
1260 defm V_CMP_NLG_F16    : VOPC_Real_vi <0x2a>;
1261 defm V_CMP_NGT_F16    : VOPC_Real_vi <0x2b>;
1262 defm V_CMP_NLE_F16    : VOPC_Real_vi <0x2c>;
1263 defm V_CMP_NEQ_F16    : VOPC_Real_vi <0x2d>;
1264 defm V_CMP_NLT_F16    : VOPC_Real_vi <0x2e>;
1265 defm V_CMP_TRU_F16    : VOPC_Real_vi <0x2f>;
1267 defm V_CMPX_F_F16     : VOPC_Real_vi <0x30>;
1268 defm V_CMPX_LT_F16    : VOPC_Real_vi <0x31>;
1269 defm V_CMPX_EQ_F16    : VOPC_Real_vi <0x32>;
1270 defm V_CMPX_LE_F16    : VOPC_Real_vi <0x33>;
1271 defm V_CMPX_GT_F16    : VOPC_Real_vi <0x34>;
1272 defm V_CMPX_LG_F16    : VOPC_Real_vi <0x35>;
1273 defm V_CMPX_GE_F16    : VOPC_Real_vi <0x36>;
1274 defm V_CMPX_O_F16     : VOPC_Real_vi <0x37>;
1275 defm V_CMPX_U_F16     : VOPC_Real_vi <0x38>;
1276 defm V_CMPX_NGE_F16   : VOPC_Real_vi <0x39>;
1277 defm V_CMPX_NLG_F16   : VOPC_Real_vi <0x3a>;
1278 defm V_CMPX_NGT_F16   : VOPC_Real_vi <0x3b>;
1279 defm V_CMPX_NLE_F16   : VOPC_Real_vi <0x3c>;
1280 defm V_CMPX_NEQ_F16   : VOPC_Real_vi <0x3d>;
1281 defm V_CMPX_NLT_F16   : VOPC_Real_vi <0x3e>;
1282 defm V_CMPX_TRU_F16   : VOPC_Real_vi <0x3f>;
1284 defm V_CMP_F_F32      : VOPC_Real_vi <0x40>;
1285 defm V_CMP_LT_F32     : VOPC_Real_vi <0x41>;
1286 defm V_CMP_EQ_F32     : VOPC_Real_vi <0x42>;
1287 defm V_CMP_LE_F32     : VOPC_Real_vi <0x43>;
1288 defm V_CMP_GT_F32     : VOPC_Real_vi <0x44>;
1289 defm V_CMP_LG_F32     : VOPC_Real_vi <0x45>;
1290 defm V_CMP_GE_F32     : VOPC_Real_vi <0x46>;
1291 defm V_CMP_O_F32      : VOPC_Real_vi <0x47>;
1292 defm V_CMP_U_F32      : VOPC_Real_vi <0x48>;
1293 defm V_CMP_NGE_F32    : VOPC_Real_vi <0x49>;
1294 defm V_CMP_NLG_F32    : VOPC_Real_vi <0x4a>;
1295 defm V_CMP_NGT_F32    : VOPC_Real_vi <0x4b>;
1296 defm V_CMP_NLE_F32    : VOPC_Real_vi <0x4c>;
1297 defm V_CMP_NEQ_F32    : VOPC_Real_vi <0x4d>;
1298 defm V_CMP_NLT_F32    : VOPC_Real_vi <0x4e>;
1299 defm V_CMP_TRU_F32    : VOPC_Real_vi <0x4f>;
1301 defm V_CMPX_F_F32     : VOPC_Real_vi <0x50>;
1302 defm V_CMPX_LT_F32    : VOPC_Real_vi <0x51>;
1303 defm V_CMPX_EQ_F32    : VOPC_Real_vi <0x52>;
1304 defm V_CMPX_LE_F32    : VOPC_Real_vi <0x53>;
1305 defm V_CMPX_GT_F32    : VOPC_Real_vi <0x54>;
1306 defm V_CMPX_LG_F32    : VOPC_Real_vi <0x55>;
1307 defm V_CMPX_GE_F32    : VOPC_Real_vi <0x56>;
1308 defm V_CMPX_O_F32     : VOPC_Real_vi <0x57>;
1309 defm V_CMPX_U_F32     : VOPC_Real_vi <0x58>;
1310 defm V_CMPX_NGE_F32   : VOPC_Real_vi <0x59>;
1311 defm V_CMPX_NLG_F32   : VOPC_Real_vi <0x5a>;
1312 defm V_CMPX_NGT_F32   : VOPC_Real_vi <0x5b>;
1313 defm V_CMPX_NLE_F32   : VOPC_Real_vi <0x5c>;
1314 defm V_CMPX_NEQ_F32   : VOPC_Real_vi <0x5d>;
1315 defm V_CMPX_NLT_F32   : VOPC_Real_vi <0x5e>;
1316 defm V_CMPX_TRU_F32   : VOPC_Real_vi <0x5f>;
1318 defm V_CMP_F_F64      : VOPC_Real_vi <0x60>;
1319 defm V_CMP_LT_F64     : VOPC_Real_vi <0x61>;
1320 defm V_CMP_EQ_F64     : VOPC_Real_vi <0x62>;
1321 defm V_CMP_LE_F64     : VOPC_Real_vi <0x63>;
1322 defm V_CMP_GT_F64     : VOPC_Real_vi <0x64>;
1323 defm V_CMP_LG_F64     : VOPC_Real_vi <0x65>;
1324 defm V_CMP_GE_F64     : VOPC_Real_vi <0x66>;
1325 defm V_CMP_O_F64      : VOPC_Real_vi <0x67>;
1326 defm V_CMP_U_F64      : VOPC_Real_vi <0x68>;
1327 defm V_CMP_NGE_F64    : VOPC_Real_vi <0x69>;
1328 defm V_CMP_NLG_F64    : VOPC_Real_vi <0x6a>;
1329 defm V_CMP_NGT_F64    : VOPC_Real_vi <0x6b>;
1330 defm V_CMP_NLE_F64    : VOPC_Real_vi <0x6c>;
1331 defm V_CMP_NEQ_F64    : VOPC_Real_vi <0x6d>;
1332 defm V_CMP_NLT_F64    : VOPC_Real_vi <0x6e>;
1333 defm V_CMP_TRU_F64    : VOPC_Real_vi <0x6f>;
1335 defm V_CMPX_F_F64     : VOPC_Real_vi <0x70>;
1336 defm V_CMPX_LT_F64    : VOPC_Real_vi <0x71>;
1337 defm V_CMPX_EQ_F64    : VOPC_Real_vi <0x72>;
1338 defm V_CMPX_LE_F64    : VOPC_Real_vi <0x73>;
1339 defm V_CMPX_GT_F64    : VOPC_Real_vi <0x74>;
1340 defm V_CMPX_LG_F64    : VOPC_Real_vi <0x75>;
1341 defm V_CMPX_GE_F64    : VOPC_Real_vi <0x76>;
1342 defm V_CMPX_O_F64     : VOPC_Real_vi <0x77>;
1343 defm V_CMPX_U_F64     : VOPC_Real_vi <0x78>;
1344 defm V_CMPX_NGE_F64   : VOPC_Real_vi <0x79>;
1345 defm V_CMPX_NLG_F64   : VOPC_Real_vi <0x7a>;
1346 defm V_CMPX_NGT_F64   : VOPC_Real_vi <0x7b>;
1347 defm V_CMPX_NLE_F64   : VOPC_Real_vi <0x7c>;
1348 defm V_CMPX_NEQ_F64   : VOPC_Real_vi <0x7d>;
1349 defm V_CMPX_NLT_F64   : VOPC_Real_vi <0x7e>;
1350 defm V_CMPX_TRU_F64   : VOPC_Real_vi <0x7f>;
1352 defm V_CMP_F_I16      : VOPC_Real_vi <0xa0>;
1353 defm V_CMP_LT_I16     : VOPC_Real_vi <0xa1>;
1354 defm V_CMP_EQ_I16     : VOPC_Real_vi <0xa2>;
1355 defm V_CMP_LE_I16     : VOPC_Real_vi <0xa3>;
1356 defm V_CMP_GT_I16     : VOPC_Real_vi <0xa4>;
1357 defm V_CMP_NE_I16     : VOPC_Real_vi <0xa5>;
1358 defm V_CMP_GE_I16     : VOPC_Real_vi <0xa6>;
1359 defm V_CMP_T_I16      : VOPC_Real_vi <0xa7>;
1361 defm V_CMP_F_U16      : VOPC_Real_vi <0xa8>;
1362 defm V_CMP_LT_U16     : VOPC_Real_vi <0xa9>;
1363 defm V_CMP_EQ_U16     : VOPC_Real_vi <0xaa>;
1364 defm V_CMP_LE_U16     : VOPC_Real_vi <0xab>;
1365 defm V_CMP_GT_U16     : VOPC_Real_vi <0xac>;
1366 defm V_CMP_NE_U16     : VOPC_Real_vi <0xad>;
1367 defm V_CMP_GE_U16     : VOPC_Real_vi <0xae>;
1368 defm V_CMP_T_U16      : VOPC_Real_vi <0xaf>;
1370 defm V_CMPX_F_I16 : VOPC_Real_vi <0xb0>;
1371 defm V_CMPX_LT_I16 : VOPC_Real_vi <0xb1>;
1372 defm V_CMPX_EQ_I16 : VOPC_Real_vi <0xb2>;
1373 defm V_CMPX_LE_I16 : VOPC_Real_vi <0xb3>;
1374 defm V_CMPX_GT_I16 : VOPC_Real_vi <0xb4>;
1375 defm V_CMPX_NE_I16 : VOPC_Real_vi <0xb5>;
1376 defm V_CMPX_GE_I16 : VOPC_Real_vi <0xb6>;
1377 defm V_CMPX_T_I16 : VOPC_Real_vi <0xb7>;
1379 defm V_CMPX_F_U16 : VOPC_Real_vi <0xb8>;
1380 defm V_CMPX_LT_U16 : VOPC_Real_vi <0xb9>;
1381 defm V_CMPX_EQ_U16 : VOPC_Real_vi <0xba>;
1382 defm V_CMPX_LE_U16 : VOPC_Real_vi <0xbb>;
1383 defm V_CMPX_GT_U16 : VOPC_Real_vi <0xbc>;
1384 defm V_CMPX_NE_U16 : VOPC_Real_vi <0xbd>;
1385 defm V_CMPX_GE_U16 : VOPC_Real_vi <0xbe>;
1386 defm V_CMPX_T_U16 : VOPC_Real_vi <0xbf>;
1388 defm V_CMP_F_I32      : VOPC_Real_vi <0xc0>;
1389 defm V_CMP_LT_I32     : VOPC_Real_vi <0xc1>;
1390 defm V_CMP_EQ_I32     : VOPC_Real_vi <0xc2>;
1391 defm V_CMP_LE_I32     : VOPC_Real_vi <0xc3>;
1392 defm V_CMP_GT_I32     : VOPC_Real_vi <0xc4>;
1393 defm V_CMP_NE_I32     : VOPC_Real_vi <0xc5>;
1394 defm V_CMP_GE_I32     : VOPC_Real_vi <0xc6>;
1395 defm V_CMP_T_I32      : VOPC_Real_vi <0xc7>;
1397 defm V_CMPX_F_I32     : VOPC_Real_vi <0xd0>;
1398 defm V_CMPX_LT_I32    : VOPC_Real_vi <0xd1>;
1399 defm V_CMPX_EQ_I32    : VOPC_Real_vi <0xd2>;
1400 defm V_CMPX_LE_I32    : VOPC_Real_vi <0xd3>;
1401 defm V_CMPX_GT_I32    : VOPC_Real_vi <0xd4>;
1402 defm V_CMPX_NE_I32    : VOPC_Real_vi <0xd5>;
1403 defm V_CMPX_GE_I32    : VOPC_Real_vi <0xd6>;
1404 defm V_CMPX_T_I32     : VOPC_Real_vi <0xd7>;
1406 defm V_CMP_F_I64      : VOPC_Real_vi <0xe0>;
1407 defm V_CMP_LT_I64     : VOPC_Real_vi <0xe1>;
1408 defm V_CMP_EQ_I64     : VOPC_Real_vi <0xe2>;
1409 defm V_CMP_LE_I64     : VOPC_Real_vi <0xe3>;
1410 defm V_CMP_GT_I64     : VOPC_Real_vi <0xe4>;
1411 defm V_CMP_NE_I64     : VOPC_Real_vi <0xe5>;
1412 defm V_CMP_GE_I64     : VOPC_Real_vi <0xe6>;
1413 defm V_CMP_T_I64      : VOPC_Real_vi <0xe7>;
1415 defm V_CMPX_F_I64     : VOPC_Real_vi <0xf0>;
1416 defm V_CMPX_LT_I64    : VOPC_Real_vi <0xf1>;
1417 defm V_CMPX_EQ_I64    : VOPC_Real_vi <0xf2>;
1418 defm V_CMPX_LE_I64    : VOPC_Real_vi <0xf3>;
1419 defm V_CMPX_GT_I64    : VOPC_Real_vi <0xf4>;
1420 defm V_CMPX_NE_I64    : VOPC_Real_vi <0xf5>;
1421 defm V_CMPX_GE_I64    : VOPC_Real_vi <0xf6>;
1422 defm V_CMPX_T_I64     : VOPC_Real_vi <0xf7>;
1424 defm V_CMP_F_U32      : VOPC_Real_vi <0xc8>;
1425 defm V_CMP_LT_U32     : VOPC_Real_vi <0xc9>;
1426 defm V_CMP_EQ_U32     : VOPC_Real_vi <0xca>;
1427 defm V_CMP_LE_U32     : VOPC_Real_vi <0xcb>;
1428 defm V_CMP_GT_U32     : VOPC_Real_vi <0xcc>;
1429 defm V_CMP_NE_U32     : VOPC_Real_vi <0xcd>;
1430 defm V_CMP_GE_U32     : VOPC_Real_vi <0xce>;
1431 defm V_CMP_T_U32      : VOPC_Real_vi <0xcf>;
1433 defm V_CMPX_F_U32     : VOPC_Real_vi <0xd8>;
1434 defm V_CMPX_LT_U32    : VOPC_Real_vi <0xd9>;
1435 defm V_CMPX_EQ_U32    : VOPC_Real_vi <0xda>;
1436 defm V_CMPX_LE_U32    : VOPC_Real_vi <0xdb>;
1437 defm V_CMPX_GT_U32    : VOPC_Real_vi <0xdc>;
1438 defm V_CMPX_NE_U32    : VOPC_Real_vi <0xdd>;
1439 defm V_CMPX_GE_U32    : VOPC_Real_vi <0xde>;
1440 defm V_CMPX_T_U32     : VOPC_Real_vi <0xdf>;
1442 defm V_CMP_F_U64      : VOPC_Real_vi <0xe8>;
1443 defm V_CMP_LT_U64     : VOPC_Real_vi <0xe9>;
1444 defm V_CMP_EQ_U64     : VOPC_Real_vi <0xea>;
1445 defm V_CMP_LE_U64     : VOPC_Real_vi <0xeb>;
1446 defm V_CMP_GT_U64     : VOPC_Real_vi <0xec>;
1447 defm V_CMP_NE_U64     : VOPC_Real_vi <0xed>;
1448 defm V_CMP_GE_U64     : VOPC_Real_vi <0xee>;
1449 defm V_CMP_T_U64      : VOPC_Real_vi <0xef>;
1451 defm V_CMPX_F_U64     : VOPC_Real_vi <0xf8>;
1452 defm V_CMPX_LT_U64    : VOPC_Real_vi <0xf9>;
1453 defm V_CMPX_EQ_U64    : VOPC_Real_vi <0xfa>;
1454 defm V_CMPX_LE_U64    : VOPC_Real_vi <0xfb>;
1455 defm V_CMPX_GT_U64    : VOPC_Real_vi <0xfc>;
1456 defm V_CMPX_NE_U64    : VOPC_Real_vi <0xfd>;
1457 defm V_CMPX_GE_U64    : VOPC_Real_vi <0xfe>;
1458 defm V_CMPX_T_U64     : VOPC_Real_vi <0xff>;