Skip to content

Commit 92d7aca

Browse files
authored
[X86] Add missing immediate qualifier to the (V)CMPSS/D instructions (#84496)
Matches (V)CMPPS/D and makes it easier to algorithmically recreate the instruction name in various analysis scripts I'm working on
1 parent 4fdf10f commit 92d7aca

13 files changed

+265
-265
lines changed

llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
8989
// Custom print the vector compare instructions to get the immediate
9090
// translated into the mnemonic.
9191
switch (MI->getOpcode()) {
92-
case X86::CMPPDrmi: case X86::CMPPDrri:
93-
case X86::CMPPSrmi: case X86::CMPPSrri:
94-
case X86::CMPSDrm: case X86::CMPSDrr:
95-
case X86::CMPSDrm_Int: case X86::CMPSDrr_Int:
96-
case X86::CMPSSrm: case X86::CMPSSrr:
97-
case X86::CMPSSrm_Int: case X86::CMPSSrr_Int:
92+
case X86::CMPPDrmi: case X86::CMPPDrri:
93+
case X86::CMPPSrmi: case X86::CMPPSrri:
94+
case X86::CMPSDrmi: case X86::CMPSDrri:
95+
case X86::CMPSDrmi_Int: case X86::CMPSDrri_Int:
96+
case X86::CMPSSrmi: case X86::CMPSSrri:
97+
case X86::CMPSSrmi_Int: case X86::CMPSSrri_Int:
9898
if (Imm >= 0 && Imm <= 7) {
9999
OS << '\t';
100100
printCMPMnemonic(MI, /*IsVCMP*/false, OS);
@@ -117,56 +117,56 @@ bool X86ATTInstPrinter::printVecCompareInstr(const MCInst *MI,
117117
}
118118
break;
119119

120-
case X86::VCMPPDrmi: case X86::VCMPPDrri:
121-
case X86::VCMPPDYrmi: case X86::VCMPPDYrri:
122-
case X86::VCMPPDZ128rmi: case X86::VCMPPDZ128rri:
123-
case X86::VCMPPDZ256rmi: case X86::VCMPPDZ256rri:
124-
case X86::VCMPPDZrmi: case X86::VCMPPDZrri:
125-
case X86::VCMPPSrmi: case X86::VCMPPSrri:
126-
case X86::VCMPPSYrmi: case X86::VCMPPSYrri:
127-
case X86::VCMPPSZ128rmi: case X86::VCMPPSZ128rri:
128-
case X86::VCMPPSZ256rmi: case X86::VCMPPSZ256rri:
129-
case X86::VCMPPSZrmi: case X86::VCMPPSZrri:
130-
case X86::VCMPSDrm: case X86::VCMPSDrr:
131-
case X86::VCMPSDZrm: case X86::VCMPSDZrr:
132-
case X86::VCMPSDrm_Int: case X86::VCMPSDrr_Int:
133-
case X86::VCMPSDZrm_Int: case X86::VCMPSDZrr_Int:
134-
case X86::VCMPSSrm: case X86::VCMPSSrr:
135-
case X86::VCMPSSZrm: case X86::VCMPSSZrr:
136-
case X86::VCMPSSrm_Int: case X86::VCMPSSrr_Int:
137-
case X86::VCMPSSZrm_Int: case X86::VCMPSSZrr_Int:
138-
case X86::VCMPPDZ128rmik: case X86::VCMPPDZ128rrik:
139-
case X86::VCMPPDZ256rmik: case X86::VCMPPDZ256rrik:
140-
case X86::VCMPPDZrmik: case X86::VCMPPDZrrik:
141-
case X86::VCMPPSZ128rmik: case X86::VCMPPSZ128rrik:
142-
case X86::VCMPPSZ256rmik: case X86::VCMPPSZ256rrik:
143-
case X86::VCMPPSZrmik: case X86::VCMPPSZrrik:
144-
case X86::VCMPSDZrm_Intk: case X86::VCMPSDZrr_Intk:
145-
case X86::VCMPSSZrm_Intk: case X86::VCMPSSZrr_Intk:
146-
case X86::VCMPPDZ128rmbi: case X86::VCMPPDZ128rmbik:
147-
case X86::VCMPPDZ256rmbi: case X86::VCMPPDZ256rmbik:
148-
case X86::VCMPPDZrmbi: case X86::VCMPPDZrmbik:
149-
case X86::VCMPPSZ128rmbi: case X86::VCMPPSZ128rmbik:
150-
case X86::VCMPPSZ256rmbi: case X86::VCMPPSZ256rmbik:
151-
case X86::VCMPPSZrmbi: case X86::VCMPPSZrmbik:
152-
case X86::VCMPPDZrrib: case X86::VCMPPDZrribk:
153-
case X86::VCMPPSZrrib: case X86::VCMPPSZrribk:
154-
case X86::VCMPSDZrrb_Int: case X86::VCMPSDZrrb_Intk:
155-
case X86::VCMPSSZrrb_Int: case X86::VCMPSSZrrb_Intk:
156-
case X86::VCMPPHZ128rmi: case X86::VCMPPHZ128rri:
157-
case X86::VCMPPHZ256rmi: case X86::VCMPPHZ256rri:
158-
case X86::VCMPPHZrmi: case X86::VCMPPHZrri:
159-
case X86::VCMPSHZrm: case X86::VCMPSHZrr:
160-
case X86::VCMPSHZrm_Int: case X86::VCMPSHZrr_Int:
161-
case X86::VCMPPHZ128rmik: case X86::VCMPPHZ128rrik:
162-
case X86::VCMPPHZ256rmik: case X86::VCMPPHZ256rrik:
163-
case X86::VCMPPHZrmik: case X86::VCMPPHZrrik:
164-
case X86::VCMPSHZrm_Intk: case X86::VCMPSHZrr_Intk:
165-
case X86::VCMPPHZ128rmbi: case X86::VCMPPHZ128rmbik:
166-
case X86::VCMPPHZ256rmbi: case X86::VCMPPHZ256rmbik:
167-
case X86::VCMPPHZrmbi: case X86::VCMPPHZrmbik:
168-
case X86::VCMPPHZrrib: case X86::VCMPPHZrribk:
169-
case X86::VCMPSHZrrb_Int: case X86::VCMPSHZrrb_Intk:
120+
case X86::VCMPPDrmi: case X86::VCMPPDrri:
121+
case X86::VCMPPDYrmi: case X86::VCMPPDYrri:
122+
case X86::VCMPPDZ128rmi: case X86::VCMPPDZ128rri:
123+
case X86::VCMPPDZ256rmi: case X86::VCMPPDZ256rri:
124+
case X86::VCMPPDZrmi: case X86::VCMPPDZrri:
125+
case X86::VCMPPSrmi: case X86::VCMPPSrri:
126+
case X86::VCMPPSYrmi: case X86::VCMPPSYrri:
127+
case X86::VCMPPSZ128rmi: case X86::VCMPPSZ128rri:
128+
case X86::VCMPPSZ256rmi: case X86::VCMPPSZ256rri:
129+
case X86::VCMPPSZrmi: case X86::VCMPPSZrri:
130+
case X86::VCMPSDrmi: case X86::VCMPSDrri:
131+
case X86::VCMPSDZrmi: case X86::VCMPSDZrri:
132+
case X86::VCMPSDrmi_Int: case X86::VCMPSDrri_Int:
133+
case X86::VCMPSDZrmi_Int: case X86::VCMPSDZrri_Int:
134+
case X86::VCMPSSrmi: case X86::VCMPSSrri:
135+
case X86::VCMPSSZrmi: case X86::VCMPSSZrri:
136+
case X86::VCMPSSrmi_Int: case X86::VCMPSSrri_Int:
137+
case X86::VCMPSSZrmi_Int: case X86::VCMPSSZrri_Int:
138+
case X86::VCMPPDZ128rmik: case X86::VCMPPDZ128rrik:
139+
case X86::VCMPPDZ256rmik: case X86::VCMPPDZ256rrik:
140+
case X86::VCMPPDZrmik: case X86::VCMPPDZrrik:
141+
case X86::VCMPPSZ128rmik: case X86::VCMPPSZ128rrik:
142+
case X86::VCMPPSZ256rmik: case X86::VCMPPSZ256rrik:
143+
case X86::VCMPPSZrmik: case X86::VCMPPSZrrik:
144+
case X86::VCMPSDZrmi_Intk: case X86::VCMPSDZrri_Intk:
145+
case X86::VCMPSSZrmi_Intk: case X86::VCMPSSZrri_Intk:
146+
case X86::VCMPPDZ128rmbi: case X86::VCMPPDZ128rmbik:
147+
case X86::VCMPPDZ256rmbi: case X86::VCMPPDZ256rmbik:
148+
case X86::VCMPPDZrmbi: case X86::VCMPPDZrmbik:
149+
case X86::VCMPPSZ128rmbi: case X86::VCMPPSZ128rmbik:
150+
case X86::VCMPPSZ256rmbi: case X86::VCMPPSZ256rmbik:
151+
case X86::VCMPPSZrmbi: case X86::VCMPPSZrmbik:
152+
case X86::VCMPPDZrrib: case X86::VCMPPDZrribk:
153+
case X86::VCMPPSZrrib: case X86::VCMPPSZrribk:
154+
case X86::VCMPSDZrrib_Int: case X86::VCMPSDZrrib_Intk:
155+
case X86::VCMPSSZrrib_Int: case X86::VCMPSSZrrib_Intk:
156+
case X86::VCMPPHZ128rmi: case X86::VCMPPHZ128rri:
157+
case X86::VCMPPHZ256rmi: case X86::VCMPPHZ256rri:
158+
case X86::VCMPPHZrmi: case X86::VCMPPHZrri:
159+
case X86::VCMPSHZrmi: case X86::VCMPSHZrri:
160+
case X86::VCMPSHZrmi_Int: case X86::VCMPSHZrri_Int:
161+
case X86::VCMPPHZ128rmik: case X86::VCMPPHZ128rrik:
162+
case X86::VCMPPHZ256rmik: case X86::VCMPPHZ256rrik:
163+
case X86::VCMPPHZrmik: case X86::VCMPPHZrrik:
164+
case X86::VCMPSHZrmi_Intk: case X86::VCMPSHZrri_Intk:
165+
case X86::VCMPPHZ128rmbi: case X86::VCMPPHZ128rmbik:
166+
case X86::VCMPPHZ256rmbi: case X86::VCMPPHZ256rmbik:
167+
case X86::VCMPPHZrmbi: case X86::VCMPPHZrmbik:
168+
case X86::VCMPPHZrrib: case X86::VCMPPHZrribk:
169+
case X86::VCMPSHZrrib_Int: case X86::VCMPSHZrrib_Intk:
170170
if (Imm >= 0 && Imm <= 31) {
171171
OS << '\t';
172172
printCMPMnemonic(MI, /*IsVCMP*/true, OS);

llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ bool X86::optimizeInstFromVEX3ToVEX2(MCInst &MI, const MCInstrDesc &Desc) {
5252
case X86::VCMPPDYrri:
5353
case X86::VCMPPSrri:
5454
case X86::VCMPPSYrri:
55-
case X86::VCMPSDrr:
56-
case X86::VCMPSSrr: {
55+
case X86::VCMPSDrri:
56+
case X86::VCMPSSrri: {
5757
switch (MI.getOperand(3).getImm() & 0x7) {
5858
default:
5959
return false;

llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -272,24 +272,24 @@ void X86InstPrinterCommon::printCMPMnemonic(const MCInst *MI, bool IsVCmp,
272272
case X86::VCMPPSZrrib: case X86::VCMPPSZrribk:
273273
OS << "ps\t";
274274
break;
275-
case X86::CMPSDrm: case X86::CMPSDrr:
276-
case X86::CMPSDrm_Int: case X86::CMPSDrr_Int:
277-
case X86::VCMPSDrm: case X86::VCMPSDrr:
278-
case X86::VCMPSDrm_Int: case X86::VCMPSDrr_Int:
279-
case X86::VCMPSDZrm: case X86::VCMPSDZrr:
280-
case X86::VCMPSDZrm_Int: case X86::VCMPSDZrr_Int:
281-
case X86::VCMPSDZrm_Intk: case X86::VCMPSDZrr_Intk:
282-
case X86::VCMPSDZrrb_Int: case X86::VCMPSDZrrb_Intk:
275+
case X86::CMPSDrmi: case X86::CMPSDrri:
276+
case X86::CMPSDrmi_Int: case X86::CMPSDrri_Int:
277+
case X86::VCMPSDrmi: case X86::VCMPSDrri:
278+
case X86::VCMPSDrmi_Int: case X86::VCMPSDrri_Int:
279+
case X86::VCMPSDZrmi: case X86::VCMPSDZrri:
280+
case X86::VCMPSDZrmi_Int: case X86::VCMPSDZrri_Int:
281+
case X86::VCMPSDZrmi_Intk: case X86::VCMPSDZrri_Intk:
282+
case X86::VCMPSDZrrib_Int: case X86::VCMPSDZrrib_Intk:
283283
OS << "sd\t";
284284
break;
285-
case X86::CMPSSrm: case X86::CMPSSrr:
286-
case X86::CMPSSrm_Int: case X86::CMPSSrr_Int:
287-
case X86::VCMPSSrm: case X86::VCMPSSrr:
288-
case X86::VCMPSSrm_Int: case X86::VCMPSSrr_Int:
289-
case X86::VCMPSSZrm: case X86::VCMPSSZrr:
290-
case X86::VCMPSSZrm_Int: case X86::VCMPSSZrr_Int:
291-
case X86::VCMPSSZrm_Intk: case X86::VCMPSSZrr_Intk:
292-
case X86::VCMPSSZrrb_Int: case X86::VCMPSSZrrb_Intk:
285+
case X86::CMPSSrmi: case X86::CMPSSrri:
286+
case X86::CMPSSrmi_Int: case X86::CMPSSrri_Int:
287+
case X86::VCMPSSrmi: case X86::VCMPSSrri:
288+
case X86::VCMPSSrmi_Int: case X86::VCMPSSrri_Int:
289+
case X86::VCMPSSZrmi: case X86::VCMPSSZrri:
290+
case X86::VCMPSSZrmi_Int: case X86::VCMPSSZrri_Int:
291+
case X86::VCMPSSZrmi_Intk: case X86::VCMPSSZrri_Intk:
292+
case X86::VCMPSSZrrib_Int: case X86::VCMPSSZrrib_Intk:
293293
OS << "ss\t";
294294
break;
295295
case X86::VCMPPHZ128rmi: case X86::VCMPPHZ128rri:
@@ -304,10 +304,10 @@ void X86InstPrinterCommon::printCMPMnemonic(const MCInst *MI, bool IsVCmp,
304304
case X86::VCMPPHZrrib: case X86::VCMPPHZrribk:
305305
OS << "ph\t";
306306
break;
307-
case X86::VCMPSHZrm: case X86::VCMPSHZrr:
308-
case X86::VCMPSHZrm_Int: case X86::VCMPSHZrr_Int:
309-
case X86::VCMPSHZrrb_Int: case X86::VCMPSHZrrb_Intk:
310-
case X86::VCMPSHZrm_Intk: case X86::VCMPSHZrr_Intk:
307+
case X86::VCMPSHZrmi: case X86::VCMPSHZrri:
308+
case X86::VCMPSHZrmi_Int: case X86::VCMPSHZrri_Int:
309+
case X86::VCMPSHZrrib_Int: case X86::VCMPSHZrrib_Intk:
310+
case X86::VCMPSHZrmi_Intk: case X86::VCMPSHZrri_Intk:
311311
OS << "sh\t";
312312
break;
313313
}

llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS
6969
// Custom print the vector compare instructions to get the immediate
7070
// translated into the mnemonic.
7171
switch (MI->getOpcode()) {
72-
case X86::CMPPDrmi: case X86::CMPPDrri:
73-
case X86::CMPPSrmi: case X86::CMPPSrri:
74-
case X86::CMPSDrm: case X86::CMPSDrr:
75-
case X86::CMPSDrm_Int: case X86::CMPSDrr_Int:
76-
case X86::CMPSSrm: case X86::CMPSSrr:
77-
case X86::CMPSSrm_Int: case X86::CMPSSrr_Int:
72+
case X86::CMPPDrmi: case X86::CMPPDrri:
73+
case X86::CMPPSrmi: case X86::CMPPSrri:
74+
case X86::CMPSDrmi: case X86::CMPSDrri:
75+
case X86::CMPSDrmi_Int: case X86::CMPSDrri_Int:
76+
case X86::CMPSSrmi: case X86::CMPSSrri:
77+
case X86::CMPSSrmi_Int: case X86::CMPSSrri_Int:
7878
if (Imm >= 0 && Imm <= 7) {
7979
OS << '\t';
8080
printCMPMnemonic(MI, /*IsVCMP*/false, OS);
@@ -96,56 +96,56 @@ bool X86IntelInstPrinter::printVecCompareInstr(const MCInst *MI, raw_ostream &OS
9696
}
9797
break;
9898

99-
case X86::VCMPPDrmi: case X86::VCMPPDrri:
100-
case X86::VCMPPDYrmi: case X86::VCMPPDYrri:
101-
case X86::VCMPPDZ128rmi: case X86::VCMPPDZ128rri:
102-
case X86::VCMPPDZ256rmi: case X86::VCMPPDZ256rri:
103-
case X86::VCMPPDZrmi: case X86::VCMPPDZrri:
104-
case X86::VCMPPSrmi: case X86::VCMPPSrri:
105-
case X86::VCMPPSYrmi: case X86::VCMPPSYrri:
106-
case X86::VCMPPSZ128rmi: case X86::VCMPPSZ128rri:
107-
case X86::VCMPPSZ256rmi: case X86::VCMPPSZ256rri:
108-
case X86::VCMPPSZrmi: case X86::VCMPPSZrri:
109-
case X86::VCMPSDrm: case X86::VCMPSDrr:
110-
case X86::VCMPSDZrm: case X86::VCMPSDZrr:
111-
case X86::VCMPSDrm_Int: case X86::VCMPSDrr_Int:
112-
case X86::VCMPSDZrm_Int: case X86::VCMPSDZrr_Int:
113-
case X86::VCMPSSrm: case X86::VCMPSSrr:
114-
case X86::VCMPSSZrm: case X86::VCMPSSZrr:
115-
case X86::VCMPSSrm_Int: case X86::VCMPSSrr_Int:
116-
case X86::VCMPSSZrm_Int: case X86::VCMPSSZrr_Int:
117-
case X86::VCMPPDZ128rmik: case X86::VCMPPDZ128rrik:
118-
case X86::VCMPPDZ256rmik: case X86::VCMPPDZ256rrik:
119-
case X86::VCMPPDZrmik: case X86::VCMPPDZrrik:
120-
case X86::VCMPPSZ128rmik: case X86::VCMPPSZ128rrik:
121-
case X86::VCMPPSZ256rmik: case X86::VCMPPSZ256rrik:
122-
case X86::VCMPPSZrmik: case X86::VCMPPSZrrik:
123-
case X86::VCMPSDZrm_Intk: case X86::VCMPSDZrr_Intk:
124-
case X86::VCMPSSZrm_Intk: case X86::VCMPSSZrr_Intk:
125-
case X86::VCMPPDZ128rmbi: case X86::VCMPPDZ128rmbik:
126-
case X86::VCMPPDZ256rmbi: case X86::VCMPPDZ256rmbik:
127-
case X86::VCMPPDZrmbi: case X86::VCMPPDZrmbik:
128-
case X86::VCMPPSZ128rmbi: case X86::VCMPPSZ128rmbik:
129-
case X86::VCMPPSZ256rmbi: case X86::VCMPPSZ256rmbik:
130-
case X86::VCMPPSZrmbi: case X86::VCMPPSZrmbik:
131-
case X86::VCMPPDZrrib: case X86::VCMPPDZrribk:
132-
case X86::VCMPPSZrrib: case X86::VCMPPSZrribk:
133-
case X86::VCMPSDZrrb_Int: case X86::VCMPSDZrrb_Intk:
134-
case X86::VCMPSSZrrb_Int: case X86::VCMPSSZrrb_Intk:
135-
case X86::VCMPPHZ128rmi: case X86::VCMPPHZ128rri:
136-
case X86::VCMPPHZ256rmi: case X86::VCMPPHZ256rri:
137-
case X86::VCMPPHZrmi: case X86::VCMPPHZrri:
138-
case X86::VCMPSHZrm: case X86::VCMPSHZrr:
139-
case X86::VCMPSHZrm_Int: case X86::VCMPSHZrr_Int:
140-
case X86::VCMPPHZ128rmik: case X86::VCMPPHZ128rrik:
141-
case X86::VCMPPHZ256rmik: case X86::VCMPPHZ256rrik:
142-
case X86::VCMPPHZrmik: case X86::VCMPPHZrrik:
143-
case X86::VCMPSHZrm_Intk: case X86::VCMPSHZrr_Intk:
144-
case X86::VCMPPHZ128rmbi: case X86::VCMPPHZ128rmbik:
145-
case X86::VCMPPHZ256rmbi: case X86::VCMPPHZ256rmbik:
146-
case X86::VCMPPHZrmbi: case X86::VCMPPHZrmbik:
147-
case X86::VCMPPHZrrib: case X86::VCMPPHZrribk:
148-
case X86::VCMPSHZrrb_Int: case X86::VCMPSHZrrb_Intk:
99+
case X86::VCMPPDrmi: case X86::VCMPPDrri:
100+
case X86::VCMPPDYrmi: case X86::VCMPPDYrri:
101+
case X86::VCMPPDZ128rmi: case X86::VCMPPDZ128rri:
102+
case X86::VCMPPDZ256rmi: case X86::VCMPPDZ256rri:
103+
case X86::VCMPPDZrmi: case X86::VCMPPDZrri:
104+
case X86::VCMPPSrmi: case X86::VCMPPSrri:
105+
case X86::VCMPPSYrmi: case X86::VCMPPSYrri:
106+
case X86::VCMPPSZ128rmi: case X86::VCMPPSZ128rri:
107+
case X86::VCMPPSZ256rmi: case X86::VCMPPSZ256rri:
108+
case X86::VCMPPSZrmi: case X86::VCMPPSZrri:
109+
case X86::VCMPSDrmi: case X86::VCMPSDrri:
110+
case X86::VCMPSDZrmi: case X86::VCMPSDZrri:
111+
case X86::VCMPSDrmi_Int: case X86::VCMPSDrri_Int:
112+
case X86::VCMPSDZrmi_Int: case X86::VCMPSDZrri_Int:
113+
case X86::VCMPSSrmi: case X86::VCMPSSrri:
114+
case X86::VCMPSSZrmi: case X86::VCMPSSZrri:
115+
case X86::VCMPSSrmi_Int: case X86::VCMPSSrri_Int:
116+
case X86::VCMPSSZrmi_Int: case X86::VCMPSSZrri_Int:
117+
case X86::VCMPPDZ128rmik: case X86::VCMPPDZ128rrik:
118+
case X86::VCMPPDZ256rmik: case X86::VCMPPDZ256rrik:
119+
case X86::VCMPPDZrmik: case X86::VCMPPDZrrik:
120+
case X86::VCMPPSZ128rmik: case X86::VCMPPSZ128rrik:
121+
case X86::VCMPPSZ256rmik: case X86::VCMPPSZ256rrik:
122+
case X86::VCMPPSZrmik: case X86::VCMPPSZrrik:
123+
case X86::VCMPSDZrmi_Intk: case X86::VCMPSDZrri_Intk:
124+
case X86::VCMPSSZrmi_Intk: case X86::VCMPSSZrri_Intk:
125+
case X86::VCMPPDZ128rmbi: case X86::VCMPPDZ128rmbik:
126+
case X86::VCMPPDZ256rmbi: case X86::VCMPPDZ256rmbik:
127+
case X86::VCMPPDZrmbi: case X86::VCMPPDZrmbik:
128+
case X86::VCMPPSZ128rmbi: case X86::VCMPPSZ128rmbik:
129+
case X86::VCMPPSZ256rmbi: case X86::VCMPPSZ256rmbik:
130+
case X86::VCMPPSZrmbi: case X86::VCMPPSZrmbik:
131+
case X86::VCMPPDZrrib: case X86::VCMPPDZrribk:
132+
case X86::VCMPPSZrrib: case X86::VCMPPSZrribk:
133+
case X86::VCMPSDZrrib_Int: case X86::VCMPSDZrrib_Intk:
134+
case X86::VCMPSSZrrib_Int: case X86::VCMPSSZrrib_Intk:
135+
case X86::VCMPPHZ128rmi: case X86::VCMPPHZ128rri:
136+
case X86::VCMPPHZ256rmi: case X86::VCMPPHZ256rri:
137+
case X86::VCMPPHZrmi: case X86::VCMPPHZrri:
138+
case X86::VCMPSHZrmi: case X86::VCMPSHZrri:
139+
case X86::VCMPSHZrmi_Int: case X86::VCMPSHZrri_Int:
140+
case X86::VCMPPHZ128rmik: case X86::VCMPPHZ128rrik:
141+
case X86::VCMPPHZ256rmik: case X86::VCMPPHZ256rrik:
142+
case X86::VCMPPHZrmik: case X86::VCMPPHZrrik:
143+
case X86::VCMPSHZrmi_Intk: case X86::VCMPSHZrri_Intk:
144+
case X86::VCMPPHZ128rmbi: case X86::VCMPPHZ128rmbik:
145+
case X86::VCMPPHZ256rmbi: case X86::VCMPPHZ256rmbik:
146+
case X86::VCMPPHZrmbi: case X86::VCMPPHZrmbik:
147+
case X86::VCMPPHZrrib: case X86::VCMPPHZrribk:
148+
case X86::VCMPSHZrrib_Int: case X86::VCMPSHZrrib_Intk:
149149
if (Imm >= 0 && Imm <= 31) {
150150
OS << '\t';
151151
printCMPMnemonic(MI, /*IsVCMP*/true, OS);

llvm/lib/Target/X86/X86FastISel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,7 @@ bool X86FastISel::X86FastEmitSSESelect(MVT RetVT, const Instruction *I) {
21982198
const TargetRegisterClass *VK1 = &X86::VK1RegClass;
21992199

22002200
unsigned CmpOpcode =
2201-
(RetVT == MVT::f32) ? X86::VCMPSSZrr : X86::VCMPSDZrr;
2201+
(RetVT == MVT::f32) ? X86::VCMPSSZrri : X86::VCMPSDZrri;
22022202
Register CmpReg = fastEmitInst_rri(CmpOpcode, VK1, CmpLHSReg, CmpRHSReg,
22032203
CC);
22042204

@@ -2228,7 +2228,7 @@ bool X86FastISel::X86FastEmitSSESelect(MVT RetVT, const Instruction *I) {
22282228
// instructions as the AND/ANDN/OR sequence due to register moves, so
22292229
// don't bother.
22302230
unsigned CmpOpcode =
2231-
(RetVT == MVT::f32) ? X86::VCMPSSrr : X86::VCMPSDrr;
2231+
(RetVT == MVT::f32) ? X86::VCMPSSrri : X86::VCMPSDrri;
22322232
unsigned BlendOpcode =
22332233
(RetVT == MVT::f32) ? X86::VBLENDVPSrr : X86::VBLENDVPDrr;
22342234

@@ -2242,8 +2242,8 @@ bool X86FastISel::X86FastEmitSSESelect(MVT RetVT, const Instruction *I) {
22422242
} else {
22432243
// Choose the SSE instruction sequence based on data type (float or double).
22442244
static const uint16_t OpcTable[2][4] = {
2245-
{ X86::CMPSSrr, X86::ANDPSrr, X86::ANDNPSrr, X86::ORPSrr },
2246-
{ X86::CMPSDrr, X86::ANDPDrr, X86::ANDNPDrr, X86::ORPDrr }
2245+
{ X86::CMPSSrri, X86::ANDPSrr, X86::ANDNPSrr, X86::ORPSrr },
2246+
{ X86::CMPSDrri, X86::ANDPDrr, X86::ANDNPDrr, X86::ORPDrr }
22472247
};
22482248

22492249
const uint16_t *Opc = nullptr;

0 commit comments

Comments
 (0)