@@ -263,8 +263,8 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
263
263
{ X86::DIV64r, X86::DIV64m, 1 , 0 },
264
264
{ X86::DIV8r, X86::DIV8m, 1 , 0 },
265
265
{ X86::EXTRACTPSrr, X86::EXTRACTPSmr, 0 , 16 },
266
- { X86::FsMOVAPDrr, X86::MOVSDmr | TB_NOT_REVERSABLE , 0 , 0 },
267
- { X86::FsMOVAPSrr, X86::MOVSSmr | TB_NOT_REVERSABLE , 0 , 0 },
266
+ { X86::FsMOVAPDrr, X86::MOVSDmr, 0 , 0 },
267
+ { X86::FsMOVAPSrr, X86::MOVSSmr, 0 , 0 },
268
268
{ X86::IDIV16r, X86::IDIV16m, 1 , 0 },
269
269
{ X86::IDIV32r, X86::IDIV32m, 1 , 0 },
270
270
{ X86::IDIV64r, X86::IDIV64m, 1 , 0 },
@@ -323,22 +323,18 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
323
323
};
324
324
325
325
for (unsigned i = 0 , e = array_lengthof (OpTbl0); i != e; ++i) {
326
- unsigned RegOp = OpTbl0[i][0 ];
327
- unsigned MemOp = OpTbl0[i][1 ] & ~TB_FLAGS;
328
- unsigned FoldedLoad = OpTbl0[i][2 ];
329
- unsigned Align = OpTbl0[i][3 ];
326
+ unsigned RegOp = OpTbl0[i][0 ];
327
+ unsigned MemOp = OpTbl0[i][1 ];
328
+ unsigned Align = OpTbl0[i][3 ];
330
329
assert (!RegOp2MemOpTable0.count (RegOp) && " Duplicated entries?" );
331
- RegOp2MemOpTable0[RegOp] = std::make_pair (MemOp, Align);
332
-
333
- // If this is not a reversable operation (because there is a many->one)
334
- // mapping, don't insert the reverse of the operation into MemOp2RegOpTable.
335
- if (OpTbl0[i][1 ] & TB_NOT_REVERSABLE)
336
- continue ;
337
-
330
+ RegOp2MemOpTable0[RegOp] = std::make_pair (MemOp,Align);
331
+ unsigned FoldedLoad = OpTbl0[i][2 ];
338
332
// Index 0, folded load or store.
339
333
unsigned AuxInfo = 0 | (FoldedLoad << 4 ) | ((FoldedLoad^1 ) << 5 );
340
- assert (!MemOp2RegOpTable.count (MemOp) && " Duplicated entries?" );
341
- MemOp2RegOpTable[MemOp] = std::make_pair (RegOp, AuxInfo);
334
+ if (RegOp != X86::FsMOVAPDrr && RegOp != X86::FsMOVAPSrr) {
335
+ assert (!MemOp2RegOpTable.count (MemOp) && " Duplicated entries?" );
336
+ MemOp2RegOpTable[MemOp] = std::make_pair (RegOp, AuxInfo);
337
+ }
342
338
}
343
339
344
340
static const unsigned OpTbl1[][3 ] = {
@@ -356,8 +352,8 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
356
352
{ X86::CVTTSD2SIrr, X86::CVTTSD2SIrm, 0 },
357
353
{ X86::CVTTSS2SI64rr, X86::CVTTSS2SI64rm, 0 },
358
354
{ X86::CVTTSS2SIrr, X86::CVTTSS2SIrm, 0 },
359
- { X86::FsMOVAPDrr, X86::MOVSDrm | TB_NOT_REVERSABLE , 0 },
360
- { X86::FsMOVAPSrr, X86::MOVSSrm | TB_NOT_REVERSABLE , 0 },
355
+ { X86::FsMOVAPDrr, X86::MOVSDrm, 0 },
356
+ { X86::FsMOVAPSrr, X86::MOVSSrm, 0 },
361
357
{ X86::IMUL16rri, X86::IMUL16rmi, 0 },
362
358
{ X86::IMUL16rri8, X86::IMUL16rmi8, 0 },
363
359
{ X86::IMUL32rri, X86::IMUL32rmi, 0 },
@@ -453,20 +449,17 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
453
449
454
450
for (unsigned i = 0 , e = array_lengthof (OpTbl1); i != e; ++i) {
455
451
unsigned RegOp = OpTbl1[i][0 ];
456
- unsigned MemOp = OpTbl1[i][1 ] & ~TB_FLAGS ;
452
+ unsigned MemOp = OpTbl1[i][1 ];
457
453
unsigned Align = OpTbl1[i][2 ];
458
454
assert (!RegOp2MemOpTable1.count (RegOp) && " Duplicate entries" );
459
- RegOp2MemOpTable1[RegOp] = std::make_pair (MemOp, Align);
460
-
461
- // If this is not a reversable operation (because there is a many->one)
462
- // mapping, don't insert the reverse of the operation into MemOp2RegOpTable.
463
- if (OpTbl1[i][1 ] & TB_NOT_REVERSABLE)
464
- continue ;
455
+ RegOp2MemOpTable1[RegOp] = std::make_pair (MemOp,Align);
465
456
466
457
// Index 1, folded load
467
458
unsigned AuxInfo = 1 | (1 << 4 );
468
- assert (!MemOp2RegOpTable.count (MemOp) && " Duplicate entries" );
469
- MemOp2RegOpTable[MemOp] = std::make_pair (RegOp, AuxInfo);
459
+ if (RegOp != X86::FsMOVAPDrr && RegOp != X86::FsMOVAPSrr) {
460
+ assert (!MemOp2RegOpTable.count (MemOp) && " Duplicate entries" );
461
+ MemOp2RegOpTable[MemOp] = std::make_pair (RegOp, AuxInfo);
462
+ }
470
463
}
471
464
472
465
static const unsigned OpTbl2[][3 ] = {
@@ -678,6 +671,7 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
678
671
assert (!RegOp2MemOpTable2.count (RegOp) && " Duplicate entry!" );
679
672
RegOp2MemOpTable2[RegOp] = std::make_pair (MemOp, Align);
680
673
674
+
681
675
// If this is not a reversable operation (because there is a many->one)
682
676
// mapping, don't insert the reverse of the operation into MemOp2RegOpTable.
683
677
if (OpTbl2[i][1 ] & TB_NOT_REVERSABLE)
0 commit comments