@@ -1101,11 +1101,6 @@ bool NVPTXDAGToDAGISel::tryLoad(SDNode *N) {
1101
1101
if (PlainLoad && PlainLoad->isIndexed ())
1102
1102
return false ;
1103
1103
1104
- const EVT LoadedEVT = LD->getMemoryVT ();
1105
- if (!LoadedEVT.isSimple ())
1106
- return false ;
1107
- const MVT LoadedVT = LoadedEVT.getSimpleVT ();
1108
-
1109
1104
// Address Space Setting
1110
1105
const auto CodeAddrSpace = getAddrSpace (LD);
1111
1106
if (canLowerToLDG (*LD, *Subtarget, CodeAddrSpace))
@@ -1115,7 +1110,7 @@ bool NVPTXDAGToDAGISel::tryLoad(SDNode *N) {
1115
1110
SDValue Chain = N->getOperand (0 );
1116
1111
const auto [Ordering, Scope] = insertMemoryInstructionFence (DL, Chain, LD);
1117
1112
1118
- const unsigned FromTypeWidth = LoadedVT .getSizeInBits ();
1113
+ const unsigned FromTypeWidth = LD-> getMemoryVT () .getSizeInBits ();
1119
1114
1120
1115
// Vector Setting
1121
1116
const unsigned FromType =
@@ -1169,9 +1164,6 @@ static unsigned getStoreVectorNumElts(SDNode *N) {
1169
1164
1170
1165
bool NVPTXDAGToDAGISel::tryLoadVector (SDNode *N) {
1171
1166
MemSDNode *LD = cast<MemSDNode>(N);
1172
- const EVT MemEVT = LD->getMemoryVT ();
1173
- if (!MemEVT.isSimple ())
1174
- return false ;
1175
1167
1176
1168
// Address Space Setting
1177
1169
const auto CodeAddrSpace = getAddrSpace (LD);
@@ -1241,10 +1233,6 @@ bool NVPTXDAGToDAGISel::tryLoadVector(SDNode *N) {
1241
1233
}
1242
1234
1243
1235
bool NVPTXDAGToDAGISel::tryLDG (MemSDNode *LD) {
1244
- const EVT LoadedEVT = LD->getMemoryVT ();
1245
- if (!LoadedEVT.isSimple ())
1246
- return false ;
1247
-
1248
1236
SDLoc DL (LD);
1249
1237
1250
1238
unsigned ExtensionType;
@@ -1361,10 +1349,6 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
1361
1349
if (PlainStore && PlainStore->isIndexed ())
1362
1350
return false ;
1363
1351
1364
- const EVT StoreVT = ST->getMemoryVT ();
1365
- if (!StoreVT.isSimple ())
1366
- return false ;
1367
-
1368
1352
// Address Space Setting
1369
1353
const auto CodeAddrSpace = getAddrSpace (ST);
1370
1354
@@ -1373,7 +1357,7 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
1373
1357
const auto [Ordering, Scope] = insertMemoryInstructionFence (DL, Chain, ST);
1374
1358
1375
1359
// Vector Setting
1376
- const unsigned ToTypeWidth = StoreVT. getSimpleVT ().getSizeInBits ();
1360
+ const unsigned ToTypeWidth = ST-> getMemoryVT ().getSizeInBits ();
1377
1361
1378
1362
// Create the machine instruction DAG
1379
1363
SDValue Value = PlainStore ? PlainStore->getValue () : AtomicStore->getVal ();
@@ -1410,8 +1394,7 @@ bool NVPTXDAGToDAGISel::tryStore(SDNode *N) {
1410
1394
1411
1395
bool NVPTXDAGToDAGISel::tryStoreVector (SDNode *N) {
1412
1396
MemSDNode *ST = cast<MemSDNode>(N);
1413
- const EVT StoreVT = ST->getMemoryVT ();
1414
- assert (StoreVT.isSimple () && " Store value is not simple" );
1397
+ const unsigned TotalWidth = ST->getMemoryVT ().getSizeInBits ();
1415
1398
1416
1399
// Address Space Setting
1417
1400
const auto CodeAddrSpace = getAddrSpace (ST);
@@ -1424,10 +1407,6 @@ bool NVPTXDAGToDAGISel::tryStoreVector(SDNode *N) {
1424
1407
SDValue Chain = ST->getChain ();
1425
1408
const auto [Ordering, Scope] = insertMemoryInstructionFence (DL, Chain, ST);
1426
1409
1427
- // Type Setting: toType + toTypeWidth
1428
- // - for integer type, always use 'u'
1429
- const unsigned TotalWidth = StoreVT.getSimpleVT ().getSizeInBits ();
1430
-
1431
1410
const unsigned NumElts = getStoreVectorNumElts (ST);
1432
1411
1433
1412
SmallVector<SDValue, 16 > Ops;
0 commit comments