llvm.org GIT mirror llvm / 826addd
[X86] Remove the _alt forms of XOP VPCOM instructions. Use a combination of custom printing and custom parsing to achieve the same result and more Previously we had a regular form of the instruction used when the immediate was 0-7. And _alt form that allowed the full 8 bit immediate. Codegen would always use the 0-7 form since the immediate was always checked to be in range. Assembly parsing would use the 0-7 form when a mnemonic like vpcomtrueb was used. If the immediate was specified directly the _alt form was used. The disassembler would prefer to use the 0-7 form instruction when the immediate was in range and the _alt form otherwise. This way disassembly would print the most readable form when possible. The assembly parsing for things like vpcomtrueb relied on splitting the mnemonic into 3 pieces. A "vpcom" prefix, an immediate representing the "true", and a suffix of "b". The tablegenerated printing code would similarly print a "vpcom" prefix, decode the immediate into a string, and then print "b". The _alt form on the other hand parsed and printed like any other instruction with no specialness. With this patch we drop to one form and solve the disassembly printing issue by doing custom printing when the immediate is 0-7. The parsing code has been tweaked to turn "vpcomtrueb" into "vpcomb" and then the immediate for the "true" is inserted either before or after the other operands depending on at&t or intel syntax. I'd rather not do the custom printing, but I tried using an InstAlias for each possible mnemonic for all 8 immediates for all 16 combinations of element size, signedness, and memory/register. The code emitted into printAliasInstr ended up checking the number of operands, the register class of each operand, and the immediate for all 256 aliases. This was repeated for both the at&t and intel printer. Despite a lot of common checks between all of the aliases, when compiled with clang at least this commonality was not well optimized. Nor do all the checks seem necessary. Since I want to do a similar thing for vcmpps/pd/ss/sd which have 32 immediate values and 3 encoding flavors, 3 register sizes, etc. This didn't seem to scale well for clang binary size. So custom printing seemed a better trade off. I also considered just using the InstAlias for the matching and not the printing. But that seemed like it would add a lot of extra rows to the matcher table. Especially given that the 32 immediates for vpcmpps have 46 strings associated with them. Differential Revision: https://reviews.llvm.org/D59398 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356343 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 1 year, 4 months ago
13 changed file(s) with 213 addition(s) and 135 deletion(s). Raw diff Collapse all Expand all
24132413 }
24142414 }
24152415
2416 unsigned ComparisonCode = ~0U;
2417
24162418 // FIXME: Hack to recognize vpcom{ub,uw,ud,uq,b,w,d,q}.
24172419 if (PatchedName.startswith("vpcom") &&
2418 (PatchedName.endswith("b") || PatchedName.endswith("w") ||
2419 PatchedName.endswith("d") || PatchedName.endswith("q"))) {
2420 unsigned CCIdx = PatchedName.drop_back().back() == 'u' ? 2 : 1;
2421 unsigned ComparisonCode = StringSwitch(
2422 PatchedName.slice(5, PatchedName.size() - CCIdx))
2420 (PatchedName.back() == 'b' || PatchedName.back() == 'w' ||
2421 PatchedName.back() == 'd' || PatchedName.back() == 'q')) {
2422 unsigned SuffixSize = PatchedName.drop_back().back() == 'u' ? 2 : 1;
2423 unsigned CC = StringSwitch(
2424 PatchedName.slice(5, PatchedName.size() - SuffixSize))
24232425 .Case("lt", 0x0)
24242426 .Case("le", 0x1)
24252427 .Case("gt", 0x2)
24292431 .Case("false", 0x6)
24302432 .Case("true", 0x7)
24312433 .Default(~0U);
2432 if (ComparisonCode != ~0U) {
2433 Operands.push_back(X86Operand::CreateToken("vpcom", NameLoc));
2434
2435 const MCExpr *ImmOp = MCConstantExpr::create(ComparisonCode,
2436 getParser().getContext());
2437 Operands.push_back(X86Operand::CreateImm(ImmOp, NameLoc, NameLoc));
2438
2439 PatchedName = PatchedName.substr(PatchedName.size() - CCIdx);
2434 if (CC != ~0U) {
2435 switch (PatchedName.back()) {
2436 default: llvm_unreachable("Unexpected character!");
2437 case 'b': PatchedName = SuffixSize == 2 ? "vpcomub" : "vpcomb"; break;
2438 case 'w': PatchedName = SuffixSize == 2 ? "vpcomuw" : "vpcomw"; break;
2439 case 'd': PatchedName = SuffixSize == 2 ? "vpcomud" : "vpcomd"; break;
2440 case 'q': PatchedName = SuffixSize == 2 ? "vpcomuq" : "vpcomq"; break;
2441 }
2442 // Set up the immediate to push into the operands later.
2443 ComparisonCode = CC;
24402444 }
24412445 }
24422446
25092513
25102514 Operands.push_back(X86Operand::CreateToken(PatchedName, NameLoc));
25112515
2516 // Push the immediate if we extracted one from the mnemonic.
2517 if (ComparisonCode != ~0U && !isParsingIntelSyntax()) {
2518 const MCExpr *ImmOp = MCConstantExpr::create(ComparisonCode,
2519 getParser().getContext());
2520 Operands.push_back(X86Operand::CreateImm(ImmOp, NameLoc, NameLoc));
2521 }
2522
25122523 // This does the actual operand parsing. Don't parse any more if we have a
25132524 // prefix juxtaposed with an operation like "lock incl 4(%rax)", because we
25142525 // just want to parse the "lock" as the first instruction and the "incl" as
25412552 (getLexer().is(AsmToken::LCurly) || getLexer().is(AsmToken::RCurly));
25422553 if (getLexer().isNot(AsmToken::EndOfStatement) && !CurlyAsEndOfStatement)
25432554 return TokError("unexpected token in argument list");
2555 }
2556
2557 // Push the immediate if we extracted one from the mnemonic.
2558 if (ComparisonCode != ~0U && isParsingIntelSyntax()) {
2559 const MCExpr *ImmOp = MCConstantExpr::create(ComparisonCode,
2560 getParser().getContext());
2561 Operands.push_back(X86Operand::CreateImm(ImmOp, NameLoc, NameLoc));
25442562 }
25452563
25462564 // Consume the EndOfStatement or the prefix separator Slash
458458 case X86::CMPSDrr: NewOpc = X86::CMPSDrr_alt; break;
459459 case X86::CMPSSrm: NewOpc = X86::CMPSSrm_alt; break;
460460 case X86::CMPSSrr: NewOpc = X86::CMPSSrr_alt; break;
461 case X86::VPCOMBri: NewOpc = X86::VPCOMBri_alt; break;
462 case X86::VPCOMBmi: NewOpc = X86::VPCOMBmi_alt; break;
463 case X86::VPCOMWri: NewOpc = X86::VPCOMWri_alt; break;
464 case X86::VPCOMWmi: NewOpc = X86::VPCOMWmi_alt; break;
465 case X86::VPCOMDri: NewOpc = X86::VPCOMDri_alt; break;
466 case X86::VPCOMDmi: NewOpc = X86::VPCOMDmi_alt; break;
467 case X86::VPCOMQri: NewOpc = X86::VPCOMQri_alt; break;
468 case X86::VPCOMQmi: NewOpc = X86::VPCOMQmi_alt; break;
469 case X86::VPCOMUBri: NewOpc = X86::VPCOMUBri_alt; break;
470 case X86::VPCOMUBmi: NewOpc = X86::VPCOMUBmi_alt; break;
471 case X86::VPCOMUWri: NewOpc = X86::VPCOMUWri_alt; break;
472 case X86::VPCOMUWmi: NewOpc = X86::VPCOMUWmi_alt; break;
473 case X86::VPCOMUDri: NewOpc = X86::VPCOMUDri_alt; break;
474 case X86::VPCOMUDmi: NewOpc = X86::VPCOMUDmi_alt; break;
475 case X86::VPCOMUQri: NewOpc = X86::VPCOMUQri_alt; break;
476 case X86::VPCOMUQmi: NewOpc = X86::VPCOMUQmi_alt; break;
477461 }
478462 // Switch opcode to the one that doesn't get special printing.
479463 mcInst.setOpcode(NewOpc);
6666 OS << "\tdata32";
6767 }
6868 // Try to print any aliases first.
69 else if (!printAliasInstr(MI, OS))
69 else if (!printAliasInstr(MI, OS) &&
70 !printVecCompareInstr(MI, OS))
7071 printInstruction(MI, OS);
7172
7273 // Next always print the annotation.
7374 printAnnotation(OS, Annot);
75 }
76
77 bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
78 raw_ostream &OS) {
79 if (MI->getNumOperands() == 0 ||
80 !MI->getOperand(MI->getNumOperands() - 1).isImm())
81 return false;
82
83 unsigned Imm = MI->getOperand(MI->getNumOperands() - 1).getImm();
84
85 const MCInstrDesc &Desc = MII.get(MI->getOpcode());
86
87 // Custom print the vector compare instructions to get the immediate
88 // translated into the mnemonic.
89 switch (MI->getOpcode()) {
90 case X86::VPCOMBmi: case X86::VPCOMBri:
91 case X86::VPCOMDmi: case X86::VPCOMDri:
92 case X86::VPCOMQmi: case X86::VPCOMQri:
93 case X86::VPCOMUBmi: case X86::VPCOMUBri:
94 case X86::VPCOMUDmi: case X86::VPCOMUDri:
95 case X86::VPCOMUQmi: case X86::VPCOMUQri:
96 case X86::VPCOMUWmi: case X86::VPCOMUWri:
97 case X86::VPCOMWmi: case X86::VPCOMWri:
98 if (Imm >= 0 && Imm <= 7) {
99 printVPCOMMnemonic(MI, OS);
100
101 if ((Desc.TSFlags & X86II::FormMask) == X86II::MRMSrcMem)
102 printi128mem(MI, 2, OS);
103 else
104 printOperand(MI, 2, OS);
105
106 OS << ", ";
107 printOperand(MI, 1, OS);
108 OS << ", ";
109 printOperand(MI, 0, OS);
110 return true;
111 }
112 break;
113 }
114
115 return false;
74116 }
75117
76118 void X86ATTInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
2525 void printRegName(raw_ostream &OS, unsigned RegNo) const override;
2626 void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
2727 const MCSubtargetInfo &STI) override;
28 bool printVecCompareInstr(const MCInst *MI, raw_ostream &OS);
2829
2930 // Autogenerated by tblgen, returns true if we successfully printed an
3031 // alias.
6363 }
6464 }
6565
66 void X86InstPrinterCommon::printXOPCC(const MCInst *MI, unsigned Op,
67 raw_ostream &O) {
68 int64_t Imm = MI->getOperand(Op).getImm();
66 void X86InstPrinterCommon::printVPCOMMnemonic(const MCInst *MI,
67 raw_ostream &OS) {
68 OS << "vpcom";
69
70 int64_t Imm = MI->getOperand(MI->getNumOperands() - 1).getImm();
6971 switch (Imm) {
70 default: llvm_unreachable("Invalid xopcc argument!");
71 case 0: O << "lt"; break;
72 case 1: O << "le"; break;
73 case 2: O << "gt"; break;
74 case 3: O << "ge"; break;
75 case 4: O << "eq"; break;
76 case 5: O << "neq"; break;
77 case 6: O << "false"; break;
78 case 7: O << "true"; break;
72 default: llvm_unreachable("Invalid vpcom argument!");
73 case 0: OS << "lt"; break;
74 case 1: OS << "le"; break;
75 case 2: OS << "gt"; break;
76 case 3: OS << "ge"; break;
77 case 4: OS << "eq"; break;
78 case 5: OS << "neq"; break;
79 case 6: OS << "false"; break;
80 case 7: OS << "true"; break;
81 }
82
83 switch (MI->getOpcode()) {
84 default: llvm_unreachable("Unexpected opcode!");
85 case X86::VPCOMBmi: case X86::VPCOMBri: OS << "b\t"; break;
86 case X86::VPCOMDmi: case X86::VPCOMDri: OS << "d\t"; break;
87 case X86::VPCOMQmi: case X86::VPCOMQri: OS << "q\t"; break;
88 case X86::VPCOMUBmi: case X86::VPCOMUBri: OS << "ub\t"; break;
89 case X86::VPCOMUDmi: case X86::VPCOMUDri: OS << "ud\t"; break;
90 case X86::VPCOMUQmi: case X86::VPCOMUQri: OS << "uq\t"; break;
91 case X86::VPCOMUWmi: case X86::VPCOMUWri: OS << "uw\t"; break;
92 case X86::VPCOMWmi: case X86::VPCOMWri: OS << "w\t"; break;
7993 }
8094 }
8195
2323
2424 virtual void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) = 0;
2525 void printSSEAVXCC(const MCInst *MI, unsigned Op, raw_ostream &OS);
26 void printXOPCC(const MCInst *MI, unsigned Op, raw_ostream &OS);
26 void printVPCOMMnemonic(const MCInst *MI, raw_ostream &OS);
2727 void printRoundingControl(const MCInst *MI, unsigned Op, raw_ostream &O);
2828 void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &O);
2929 protected:
4444 if (MI->getOpcode() == X86::DATA16_PREFIX &&
4545 STI.getFeatureBits()[X86::Mode16Bit]) {
4646 OS << "\tdata32";
47 } else if (!printAliasInstr(MI, OS))
47 } else if (!printAliasInstr(MI, OS) &&
48 !printVecCompareInstr(MI, OS))
4849 printInstruction(MI, OS);
4950
5051 // Next always print the annotation.
5354 // If verbose assembly is enabled, we can print some informative comments.
5455 if (CommentStream)
5556 EmitAnyX86InstComments(MI, *CommentStream, MII);
57 }
58
59 bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS) {
60 if (MI->getNumOperands() == 0 ||
61 !MI->getOperand(MI->getNumOperands() - 1).isImm())
62 return false;
63
64 unsigned Imm = MI->getOperand(MI->getNumOperands() - 1).getImm();
65
66 const MCInstrDesc &Desc = MII.get(MI->getOpcode());
67
68 // Custom print the vector compare instructions to get the immediate
69 // translated into the mnemonic.
70 switch (MI->getOpcode()) {
71 case X86::VPCOMBmi: case X86::VPCOMBri:
72 case X86::VPCOMDmi: case X86::VPCOMDri:
73 case X86::VPCOMQmi: case X86::VPCOMQri:
74 case X86::VPCOMUBmi: case X86::VPCOMUBri:
75 case X86::VPCOMUDmi: case X86::VPCOMUDri:
76 case X86::VPCOMUQmi: case X86::VPCOMUQri:
77 case X86::VPCOMUWmi: case X86::VPCOMUWri:
78 case X86::VPCOMWmi: case X86::VPCOMWri:
79 if (Imm >= 0 && Imm <= 7) {
80 printVPCOMMnemonic(MI, OS);
81 printOperand(MI, 0, OS);
82 OS << ", ";
83 printOperand(MI, 1, OS);
84 OS << ", ";
85 if ((Desc.TSFlags & X86II::FormMask) == X86II::MRMSrcMem)
86 printi128mem(MI, 2, OS);
87 else
88 printOperand(MI, 2, OS);
89 return true;
90 }
91 break;
92 }
93
94 return false;
5695 }
5796
5897 void X86IntelInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
2626 void printRegName(raw_ostream &OS, unsigned RegNo) const override;
2727 void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
2828 const MCSubtargetInfo &STI) override;
29 bool printVecCompareInstr(const MCInst *MI, raw_ostream &OS);
2930
3031 // Autogenerated by tblgen, returns true if we successfully printed an
3132 // alias.
613613
614614 def AVX512ICC : Operand {
615615 let PrintMethod = "printSSEAVXCC";
616 let OperandType = "OPERAND_IMMEDIATE";
617 }
618
619 def XOPCC : Operand {
620 let PrintMethod = "printXOPCC";
621616 let OperandType = "OPERAND_IMMEDIATE";
622617 }
623618
245245 let ExeDomain = SSEPackedInt in { // SSE integer instructions
246246 let isCommutable = 1 in
247247 def ri : IXOPi8
248 (ins VR128:$src1, VR128:$src2, XOPCC:$cc),
249 !strconcat("vpcom${cc}", Suffix,
250 "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
248 (ins VR128:$src1, VR128:$src2, u8imm:$cc),
249 !strconcat("vpcom", Suffix,
250 "\t{$cc, $src2, $src1, $dst|$dst, $src1, $src2, $cc}"),
251251 [(set VR128:$dst,
252252 (vt128 (OpNode (vt128 VR128:$src1), (vt128 VR128:$src2),
253253 imm:$cc)))]>,
254254 XOP_4V, Sched<[sched]>;
255255 def mi : IXOPi8
256 (ins VR128:$src1, i128mem:$src2, XOPCC:$cc),
257 !strconcat("vpcom${cc}", Suffix,
258 "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
256 (ins VR128:$src1, i128mem:$src2, u8imm:$cc),
257 !strconcat("vpcom", Suffix,
258 "\t{$cc, $src2, $src1, $dst|$dst, $src1, $src2, $cc}"),
259259 [(set VR128:$dst,
260260 (vt128 (OpNode (vt128 VR128:$src1),
261261 (vt128 (load addr:$src2)),
262262 imm:$cc)))]>,
263263 XOP_4V, Sched<[sched.Folded, sched.ReadAfterFold]>;
264 let isAsmParserOnly = 1, hasSideEffects = 0 in {
265 def ri_alt : IXOPi8
266 (ins VR128:$src1, VR128:$src2, u8imm:$src3),
267 !strconcat("vpcom", Suffix,
268 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
269 []>, XOP_4V, Sched<[sched]>, NotMemoryFoldable;
270 let mayLoad = 1 in
271 def mi_alt : IXOPi8
272 (ins VR128:$src1, i128mem:$src2, u8imm:$src3),
273 !strconcat("vpcom", Suffix,
274 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
275 []>, XOP_4V, Sched<[sched.Folded, sched.ReadAfterFold]>,
276 NotMemoryFoldable;
277 }
278264 }
279265
280266 def : Pat<(OpNode (load addr:$src2),
238238 # CHECK-NEXT: 2 2 0.50 vpcmov %ymm0, %ymm1, %ymm2, %ymm3
239239 # CHECK-NEXT: 2 7 1.00 * vpcmov (%rax), %ymm0, %ymm1, %ymm3
240240 # CHECK-NEXT: 2 7 1.00 * vpcmov %ymm0, (%rax), %ymm1, %ymm3
241 # CHECK-NEXT: 1 2 0.50 vpcomb $0, %xmm0, %xmm1, %xmm3
242 # CHECK-NEXT: 1 7 0.50 * vpcomb $0, (%rax), %xmm0, %xmm3
243 # CHECK-NEXT: 1 2 0.50 vpcomd $0, %xmm0, %xmm1, %xmm3
244 # CHECK-NEXT: 1 7 0.50 * vpcomd $0, (%rax), %xmm0, %xmm3
245 # CHECK-NEXT: 1 2 0.50 vpcomq $0, %xmm0, %xmm1, %xmm3
246 # CHECK-NEXT: 1 7 0.50 * vpcomq $0, (%rax), %xmm0, %xmm3
247 # CHECK-NEXT: 1 2 0.50 vpcomub $0, %xmm0, %xmm1, %xmm3
248 # CHECK-NEXT: 1 7 0.50 * vpcomub $0, (%rax), %xmm0, %xmm3
249 # CHECK-NEXT: 1 2 0.50 vpcomud $0, %xmm0, %xmm1, %xmm3
250 # CHECK-NEXT: 1 7 0.50 * vpcomud $0, (%rax), %xmm0, %xmm3
251 # CHECK-NEXT: 1 2 0.50 vpcomuq $0, %xmm0, %xmm1, %xmm3
252 # CHECK-NEXT: 1 7 0.50 * vpcomuq $0, (%rax), %xmm0, %xmm3
253 # CHECK-NEXT: 1 2 0.50 vpcomuw $0, %xmm0, %xmm1, %xmm3
254 # CHECK-NEXT: 1 7 0.50 * vpcomuw $0, (%rax), %xmm0, %xmm3
255 # CHECK-NEXT: 1 2 0.50 vpcomw $0, %xmm0, %xmm1, %xmm3
256 # CHECK-NEXT: 1 7 0.50 * vpcomw $0, (%rax), %xmm0, %xmm3
241 # CHECK-NEXT: 1 2 0.50 vpcomltb %xmm0, %xmm1, %xmm3
242 # CHECK-NEXT: 1 7 0.50 * vpcomltb (%rax), %xmm0, %xmm3
243 # CHECK-NEXT: 1 2 0.50 vpcomltd %xmm0, %xmm1, %xmm3
244 # CHECK-NEXT: 1 7 0.50 * vpcomltd (%rax), %xmm0, %xmm3
245 # CHECK-NEXT: 1 2 0.50 vpcomltq %xmm0, %xmm1, %xmm3
246 # CHECK-NEXT: 1 7 0.50 * vpcomltq (%rax), %xmm0, %xmm3
247 # CHECK-NEXT: 1 2 0.50 vpcomltub %xmm0, %xmm1, %xmm3
248 # CHECK-NEXT: 1 7 0.50 * vpcomltub (%rax), %xmm0, %xmm3
249 # CHECK-NEXT: 1 2 0.50 vpcomltud %xmm0, %xmm1, %xmm3
250 # CHECK-NEXT: 1 7 0.50 * vpcomltud (%rax), %xmm0, %xmm3
251 # CHECK-NEXT: 1 2 0.50 vpcomltuq %xmm0, %xmm1, %xmm3
252 # CHECK-NEXT: 1 7 0.50 * vpcomltuq (%rax), %xmm0, %xmm3
253 # CHECK-NEXT: 1 2 0.50 vpcomltuw %xmm0, %xmm1, %xmm3
254 # CHECK-NEXT: 1 7 0.50 * vpcomltuw (%rax), %xmm0, %xmm3
255 # CHECK-NEXT: 1 2 0.50 vpcomltw %xmm0, %xmm1, %xmm3
256 # CHECK-NEXT: 1 7 0.50 * vpcomltw (%rax), %xmm0, %xmm3
257257 # CHECK-NEXT: 1 3 2.00 vpermil2pd $0, %xmm0, %xmm1, %xmm2, %xmm3
258258 # CHECK-NEXT: 1 8 2.00 * vpermil2pd $0, (%rax), %xmm0, %xmm1, %xmm3
259259 # CHECK-NEXT: 1 8 2.00 * vpermil2pd $0, %xmm0, (%rax), %xmm1, %xmm3
417417 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcmov %ymm0, %ymm1, %ymm2, %ymm3
418418 # CHECK-NEXT: 1.00 1.00 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 1.00 1.00 - - vpcmov (%rax), %ymm0, %ymm1, %ymm3
419419 # CHECK-NEXT: 1.00 1.00 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 1.00 1.00 - - vpcmov %ymm0, (%rax), %ymm1, %ymm3
420 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomb $0, %xmm0, %xmm1, %xmm3
421 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomb $0, (%rax), %xmm0, %xmm3
422 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomd $0, %xmm0, %xmm1, %xmm3
423 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomd $0, (%rax), %xmm0, %xmm3
424 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomq $0, %xmm0, %xmm1, %xmm3
425 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomq $0, (%rax), %xmm0, %xmm3
426 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomub $0, %xmm0, %xmm1, %xmm3
427 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomub $0, (%rax), %xmm0, %xmm3
428 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomud $0, %xmm0, %xmm1, %xmm3
429 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomud $0, (%rax), %xmm0, %xmm3
430 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomuq $0, %xmm0, %xmm1, %xmm3
431 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomuq $0, (%rax), %xmm0, %xmm3
432 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomuw $0, %xmm0, %xmm1, %xmm3
433 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomuw $0, (%rax), %xmm0, %xmm3
434 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomw $0, %xmm0, %xmm1, %xmm3
435 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomw $0, (%rax), %xmm0, %xmm3
420 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltb %xmm0, %xmm1, %xmm3
421 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltb (%rax), %xmm0, %xmm3
422 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltd %xmm0, %xmm1, %xmm3
423 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltd (%rax), %xmm0, %xmm3
424 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltq %xmm0, %xmm1, %xmm3
425 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltq (%rax), %xmm0, %xmm3
426 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltub %xmm0, %xmm1, %xmm3
427 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltub (%rax), %xmm0, %xmm3
428 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltud %xmm0, %xmm1, %xmm3
429 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltud (%rax), %xmm0, %xmm3
430 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltuq %xmm0, %xmm1, %xmm3
431 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltuq (%rax), %xmm0, %xmm3
432 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltuw %xmm0, %xmm1, %xmm3
433 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltuw (%rax), %xmm0, %xmm3
434 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - vpcomltw %xmm0, %xmm1, %xmm3
435 # CHECK-NEXT: 0.50 0.50 - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - 0.50 0.50 - - vpcomltw (%rax), %xmm0, %xmm3
436436 # CHECK-NEXT: - - - - - - - - 2.00 2.00 - - - - 0.50 0.50 - - - - - - - vpermil2pd $0, %xmm0, %xmm1, %xmm2, %xmm3
437437 # CHECK-NEXT: 0.50 0.50 - - - - - - 2.00 2.00 - - - - 0.50 0.50 - - - 0.50 0.50 - - vpermil2pd $0, (%rax), %xmm0, %xmm1, %xmm3
438438 # CHECK-NEXT: 0.50 0.50 - - - - - - 2.00 2.00 - - - - 0.50 0.50 - - - 0.50 0.50 - - vpermil2pd $0, %xmm0, (%rax), %xmm1, %xmm3
238238 # CHECK-NEXT: 1 1 1.00 vpcmov %ymm0, %ymm1, %ymm2, %ymm3
239239 # CHECK-NEXT: 2 8 1.00 * vpcmov (%rax), %ymm0, %ymm1, %ymm3
240240 # CHECK-NEXT: 2 8 1.00 * vpcmov %ymm0, (%rax), %ymm1, %ymm3
241 # CHECK-NEXT: 1 1 0.50 vpcomb $0, %xmm0, %xmm1, %xmm3
242 # CHECK-NEXT: 2 7 0.50 * vpcomb $0, (%rax), %xmm0, %xmm3
243 # CHECK-NEXT: 1 1 0.50 vpcomd $0, %xmm0, %xmm1, %xmm3
244 # CHECK-NEXT: 2 7 0.50 * vpcomd $0, (%rax), %xmm0, %xmm3
245 # CHECK-NEXT: 1 1 0.50 vpcomq $0, %xmm0, %xmm1, %xmm3
246 # CHECK-NEXT: 2 7 0.50 * vpcomq $0, (%rax), %xmm0, %xmm3
247 # CHECK-NEXT: 1 1 0.50 vpcomub $0, %xmm0, %xmm1, %xmm3
248 # CHECK-NEXT: 2 7 0.50 * vpcomub $0, (%rax), %xmm0, %xmm3
249 # CHECK-NEXT: 1 1 0.50 vpcomud $0, %xmm0, %xmm1, %xmm3
250 # CHECK-NEXT: 2 7 0.50 * vpcomud $0, (%rax), %xmm0, %xmm3
251 # CHECK-NEXT: 1 1 0.50 vpcomuq $0, %xmm0, %xmm1, %xmm3
252 # CHECK-NEXT: 2 7 0.50 * vpcomuq $0, (%rax), %xmm0, %xmm3
253 # CHECK-NEXT: 1 1 0.50 vpcomuw $0, %xmm0, %xmm1, %xmm3
254 # CHECK-NEXT: 2 7 0.50 * vpcomuw $0, (%rax), %xmm0, %xmm3
255 # CHECK-NEXT: 1 1 0.50 vpcomw $0, %xmm0, %xmm1, %xmm3
256 # CHECK-NEXT: 2 7 0.50 * vpcomw $0, (%rax), %xmm0, %xmm3
241 # CHECK-NEXT: 1 1 0.50 vpcomltb %xmm0, %xmm1, %xmm3
242 # CHECK-NEXT: 2 7 0.50 * vpcomltb (%rax), %xmm0, %xmm3
243 # CHECK-NEXT: 1 1 0.50 vpcomltd %xmm0, %xmm1, %xmm3
244 # CHECK-NEXT: 2 7 0.50 * vpcomltd (%rax), %xmm0, %xmm3
245 # CHECK-NEXT: 1 1 0.50 vpcomltq %xmm0, %xmm1, %xmm3
246 # CHECK-NEXT: 2 7 0.50 * vpcomltq (%rax), %xmm0, %xmm3
247 # CHECK-NEXT: 1 1 0.50 vpcomltub %xmm0, %xmm1, %xmm3
248 # CHECK-NEXT: 2 7 0.50 * vpcomltub (%rax), %xmm0, %xmm3
249 # CHECK-NEXT: 1 1 0.50 vpcomltud %xmm0, %xmm1, %xmm3
250 # CHECK-NEXT: 2 7 0.50 * vpcomltud (%rax), %xmm0, %xmm3
251 # CHECK-NEXT: 1 1 0.50 vpcomltuq %xmm0, %xmm1, %xmm3
252 # CHECK-NEXT: 2 7 0.50 * vpcomltuq (%rax), %xmm0, %xmm3
253 # CHECK-NEXT: 1 1 0.50 vpcomltuw %xmm0, %xmm1, %xmm3
254 # CHECK-NEXT: 2 7 0.50 * vpcomltuw (%rax), %xmm0, %xmm3
255 # CHECK-NEXT: 1 1 0.50 vpcomltw %xmm0, %xmm1, %xmm3
256 # CHECK-NEXT: 2 7 0.50 * vpcomltw (%rax), %xmm0, %xmm3
257257 # CHECK-NEXT: 1 1 1.00 vpermil2pd $0, %xmm0, %xmm1, %xmm2, %xmm3
258258 # CHECK-NEXT: 2 7 1.00 * vpermil2pd $0, (%rax), %xmm0, %xmm1, %xmm3
259259 # CHECK-NEXT: 2 7 1.00 * vpermil2pd $0, %xmm0, (%rax), %xmm1, %xmm3
402402 # CHECK-NEXT: - - - - - 1.00 - - vpcmov %ymm0, %ymm1, %ymm2, %ymm3
403403 # CHECK-NEXT: - - - - - 1.00 0.50 0.50 vpcmov (%rax), %ymm0, %ymm1, %ymm3
404404 # CHECK-NEXT: - - - - - 1.00 0.50 0.50 vpcmov %ymm0, (%rax), %ymm1, %ymm3
405 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomb $0, %xmm0, %xmm1, %xmm3
406 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomb $0, (%rax), %xmm0, %xmm3
407 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomd $0, %xmm0, %xmm1, %xmm3
408 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomd $0, (%rax), %xmm0, %xmm3
409 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomq $0, %xmm0, %xmm1, %xmm3
410 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomq $0, (%rax), %xmm0, %xmm3
411 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomub $0, %xmm0, %xmm1, %xmm3
412 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomub $0, (%rax), %xmm0, %xmm3
413 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomud $0, %xmm0, %xmm1, %xmm3
414 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomud $0, (%rax), %xmm0, %xmm3
415 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomuq $0, %xmm0, %xmm1, %xmm3
416 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomuq $0, (%rax), %xmm0, %xmm3
417 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomuw $0, %xmm0, %xmm1, %xmm3
418 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomuw $0, (%rax), %xmm0, %xmm3
419 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomw $0, %xmm0, %xmm1, %xmm3
420 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomw $0, (%rax), %xmm0, %xmm3
405 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltb %xmm0, %xmm1, %xmm3
406 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltb (%rax), %xmm0, %xmm3
407 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltd %xmm0, %xmm1, %xmm3
408 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltd (%rax), %xmm0, %xmm3
409 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltq %xmm0, %xmm1, %xmm3
410 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltq (%rax), %xmm0, %xmm3
411 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltub %xmm0, %xmm1, %xmm3
412 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltub (%rax), %xmm0, %xmm3
413 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltud %xmm0, %xmm1, %xmm3
414 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltud (%rax), %xmm0, %xmm3
415 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltuq %xmm0, %xmm1, %xmm3
416 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltuq (%rax), %xmm0, %xmm3
417 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltuw %xmm0, %xmm1, %xmm3
418 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltuw (%rax), %xmm0, %xmm3
419 # CHECK-NEXT: - - - 0.50 - 0.50 - - vpcomltw %xmm0, %xmm1, %xmm3
420 # CHECK-NEXT: - - - 0.50 - 0.50 0.50 0.50 vpcomltw (%rax), %xmm0, %xmm3
421421 # CHECK-NEXT: - - - - - 1.00 - - vpermil2pd $0, %xmm0, %xmm1, %xmm2, %xmm3
422422 # CHECK-NEXT: - - - - - 1.00 0.50 0.50 vpermil2pd $0, (%rax), %xmm0, %xmm1, %xmm3
423423 # CHECK-NEXT: - - - - - 1.00 0.50 0.50 vpermil2pd $0, %xmm0, (%rax), %xmm1, %xmm3
848848 TYPE("i16imm_pcrel", TYPE_REL)
849849 TYPE("i32imm_pcrel", TYPE_REL)
850850 TYPE("SSECC", TYPE_IMM3)
851 TYPE("XOPCC", TYPE_IMM3)
852851 TYPE("AVXCC", TYPE_IMM5)
853852 TYPE("AVX512ICC", TYPE_AVX512ICC)
854853 TYPE("AVX512RC", TYPE_IMM)
931930 }
932931 ENCODING("i32i8imm", ENCODING_IB)
933932 ENCODING("SSECC", ENCODING_IB)
934 ENCODING("XOPCC", ENCODING_IB)
935933 ENCODING("AVXCC", ENCODING_IB)
936934 ENCODING("AVX512ICC", ENCODING_IB)
937935 ENCODING("AVX512RC", ENCODING_IRC)