Skip to content

Commit d0381d2

Browse files
committed
[X86][NFC] Remove dead code for "_REV" instructions
Those "_REV" instructions should not appear before encoding optimization, while macro fusion is done before encoding optimization. Partial reland of 8bbf100 BOLT has dropped macro-op fusion alignment optimization in llvm#97358, which unblocks the reland.
1 parent 344228e commit d0381d2

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,21 @@ classifyFirstOpcodeInMacroFusion(unsigned Opcode) {
150150
case X86::AND16ri8:
151151
case X86::AND16rm:
152152
case X86::AND16rr:
153-
case X86::AND16rr_REV:
154153
case X86::AND32i32:
155154
case X86::AND32ri:
156155
case X86::AND32ri8:
157156
case X86::AND32rm:
158157
case X86::AND32rr:
159-
case X86::AND32rr_REV:
160158
case X86::AND64i32:
161159
case X86::AND64ri32:
162160
case X86::AND64ri8:
163161
case X86::AND64rm:
164162
case X86::AND64rr:
165-
case X86::AND64rr_REV:
166163
case X86::AND8i8:
167164
case X86::AND8ri:
168165
case X86::AND8ri8:
169166
case X86::AND8rm:
170167
case X86::AND8rr:
171-
case X86::AND8rr_REV:
172168
return FirstMacroFusionInstKind::And;
173169
// CMP
174170
case X86::CMP16i16:
@@ -177,79 +173,67 @@ classifyFirstOpcodeInMacroFusion(unsigned Opcode) {
177173
case X86::CMP16ri8:
178174
case X86::CMP16rm:
179175
case X86::CMP16rr:
180-
case X86::CMP16rr_REV:
181176
case X86::CMP32i32:
182177
case X86::CMP32mr:
183178
case X86::CMP32ri:
184179
case X86::CMP32ri8:
185180
case X86::CMP32rm:
186181
case X86::CMP32rr:
187-
case X86::CMP32rr_REV:
188182
case X86::CMP64i32:
189183
case X86::CMP64mr:
190184
case X86::CMP64ri32:
191185
case X86::CMP64ri8:
192186
case X86::CMP64rm:
193187
case X86::CMP64rr:
194-
case X86::CMP64rr_REV:
195188
case X86::CMP8i8:
196189
case X86::CMP8mr:
197190
case X86::CMP8ri:
198191
case X86::CMP8ri8:
199192
case X86::CMP8rm:
200193
case X86::CMP8rr:
201-
case X86::CMP8rr_REV:
202194
return FirstMacroFusionInstKind::Cmp;
203195
// ADD
204196
case X86::ADD16i16:
205197
case X86::ADD16ri:
206198
case X86::ADD16ri8:
207199
case X86::ADD16rm:
208200
case X86::ADD16rr:
209-
case X86::ADD16rr_REV:
210201
case X86::ADD32i32:
211202
case X86::ADD32ri:
212203
case X86::ADD32ri8:
213204
case X86::ADD32rm:
214205
case X86::ADD32rr:
215-
case X86::ADD32rr_REV:
216206
case X86::ADD64i32:
217207
case X86::ADD64ri32:
218208
case X86::ADD64ri8:
219209
case X86::ADD64rm:
220210
case X86::ADD64rr:
221-
case X86::ADD64rr_REV:
222211
case X86::ADD8i8:
223212
case X86::ADD8ri:
224213
case X86::ADD8ri8:
225214
case X86::ADD8rm:
226215
case X86::ADD8rr:
227-
case X86::ADD8rr_REV:
228216
// SUB
229217
case X86::SUB16i16:
230218
case X86::SUB16ri:
231219
case X86::SUB16ri8:
232220
case X86::SUB16rm:
233221
case X86::SUB16rr:
234-
case X86::SUB16rr_REV:
235222
case X86::SUB32i32:
236223
case X86::SUB32ri:
237224
case X86::SUB32ri8:
238225
case X86::SUB32rm:
239226
case X86::SUB32rr:
240-
case X86::SUB32rr_REV:
241227
case X86::SUB64i32:
242228
case X86::SUB64ri32:
243229
case X86::SUB64ri8:
244230
case X86::SUB64rm:
245231
case X86::SUB64rr:
246-
case X86::SUB64rr_REV:
247232
case X86::SUB8i8:
248233
case X86::SUB8ri:
249234
case X86::SUB8ri8:
250235
case X86::SUB8rm:
251236
case X86::SUB8rr:
252-
case X86::SUB8rr_REV:
253237
return FirstMacroFusionInstKind::AddSub;
254238
// INC
255239
case X86::INC16r:

0 commit comments

Comments
 (0)